From 81b18e513c41e0e025fc785a16df2c1a63e9551c Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 24 Jan 2009 23:13:46 -0800 Subject: [PATCH] Fix another process stuck-during-exit bug - stuck due to signal. Fix a bug where an exiting process becomes a zombie, entering the SZOMB state, but then receives a stop signal before it can be reaped. If this occurs the process was incorrectly placed in SSTOP and then later made SACTIVE again, preventing it from being reaped. Symptoms were: process shows up in ps in a DEL state but does not show up in kgdb's 'info thread' list. Process is the zombie list and is still a child of init, but it's state is SACTIVE instead of SZOMB and p_xstat (last signal taken) is SIGSTOP or SIGTSTP. --- sys/kern/kern_sig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 732890feb5..b28e66ff62 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1277,7 +1277,7 @@ proc_stop(struct proc *p) struct lwp *lp; /* If somebody raced us, be happy with it */ - if (p->p_stat == SSTOP) + if (p->p_stat == SSTOP || p->p_stat == SZOMB) return; crit_enter(); -- 2.11.4.GIT