Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jan 2001 18:47:32 -0600
From:      Robert Lipe <robertlipe@usa.net>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: kthread_exit & zombification
Message-ID:  <20010108184732.N1400@rjlhome.sco.com>
In-Reply-To: <XFMail.010108150109.jhb@FreeBSD.org>; from jhb@FreeBSD.org on Mon, Jan 08, 2001 at 03:01:09PM -0800
References:  <20010107211159.C1400@rjlhome.sco.com> <XFMail.010108150109.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> 
> On 08-Jan-01 Robert Lipe wrote:

> > I'm having problems with kthread_exit().  The problem is that the thread
> > goes zombie after I kthread_exit in it, but it never gets reaped.  Since
> > I'm doing this during a MOD_UNLOAD phase, if I happen to do a `ps -ax'
> > after the module has been unmapped, a panic results becuase it's trying
> > to get the lwp name and wchan string from what is now unmapped memory.
> 
> kthreads are children of the swapper (pid 0), which doesn't harvest zombies. 

Bummer.  I can get past the zombies as they're merely unsightly.  Panics
are a drag. :-)

> Hmm, a fix was committed to kthread_exit() in -current in rev 1.8 of
> sys/kern/kern_kthread.c.  Actually, if you could test out both rev 1.8 and 1.9
> that would be good, as both need to be backported to -stable.

Only 1.8 seems to be be pertinent to 4.1.1.  I've stitched in the call
to proc_reparent() and life seems pretty good. `ps' no longer panics
and the lwp does indeed disappear from the ps listing instead of merely
going zombie.  This doesn't quite seem to jive with what you described
above, though.


Thanx!
RJL



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010108184732.N1400>