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

Re: git: kernel: Don't disturb about-to-be reaped zombies.


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 28 May 2011 11:14:56 -0700 (PDT)

:commit 9458c398c0b97d30032a6541f8ab452cd93f5a86
:Author: YONETANI Tomokazu <y0netan1@dragonflybsd.org>
:Date:   Fri May 27 22:27:39 2011 +0900
:
:    kernel: Don't disturb about-to-be reaped zombies.
:    
:    Processes in zombproc with p_nthreads == 0 are about to be reaped,
:    so just leave them in peace.
:    
:    Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1996>
:
:Summary of changes:
: sys/kern/kern_proc.c |    5 +++++
: 1 files changed, 5 insertions(+), 0 deletions(-)
:
:http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9458c398c0b97d30032a6541f8ab452cd93f5a86
:
:-- 
:DragonFly BSD source repository

    I'm not sure about that.  nthreads == 0 should just mean that the
    process's threads have all exited, not that the zombie process is
    about to be reaped by a wait*() call.  It will probably be reaped
    soon, but not necessarily... it depends on when the user process
    actually calls wait*().

    What we might have to do instead is add another process flag, say
    PREAPING, which would be set in kern_wait() somewhere around line
    838 (just after it gets p->p_token).  Even then we might want it
    to show up in the ps in case it gets stuck during the exit, so it
    isn't an invisible stuck process.

	`				-Matt
					Matthew Dillon 
					<dillon@backplane.com>



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