DragonFly commits List (threaded) for 2009-03
DragonFly BSD
DragonFly commits List (threaded) for 2009-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

DragonFly-2.3.0.374.gea59a master sys/kern kern_synch.c


From: Simon Schubert <corecode@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 9 Mar 2009 10:12:38 -0700 (PDT)

commit ea59a6970871b4b25090ac678008c87a3b0f35a9
Author: Simon Schubert <corecode@dragonflybsd.org>
Date:   Sat Mar 7 17:54:37 2009 +0100

    stay in tstop() as long as the process is stopped
    
    Under some conditions (mainly related to multi-threaded processes and
    tracing (gdb)), wakeups, scheduling and stops can lead to a race which
    will leave the process stopped and wait()ed, but the P_WAITED flag
    cleared.  This happens because a thread in tstop() might have been woken
    up, but not yet scheduled.  If the process in turn would get stopped
    again (another bug), the thread in tstop() would be counted as stopped,
    but would only be waiting to be scheduled to transition into LSRUN.
    
    Prevent this by checking for SSLEEP in tstop() before returning.

Summary of changes:
 sys/kern/kern_synch.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ea59a6970871b4b25090ac678008c87a3b0f35a9


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]