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

Matthew Dillon dillon at apollo.backplane.com
Sat May 28 11:15:33 PDT 2011


:commit 9458c398c0b97d30032a6541f8ab452cd93f5a86
:Author: YONETANI Tomokazu <y0netan1 at 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 at backplane.com>





More information about the Commits mailing list