From owner-freebsd-hackers Mon Jan 8 15: 1:22 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 0865737B6A1 for ; Mon, 8 Jan 2001 15:01:05 -0800 (PST) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id f08Mx8G49662; Mon, 8 Jan 2001 14:59:08 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010107211159.C1400@rjlhome.sco.com> Date: Mon, 08 Jan 2001 15:01:09 -0800 (PST) From: John Baldwin To: Robert Lipe Subject: RE: kthread_exit & zombification Cc: freebsd-hackers@FreeBSD.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 08-Jan-01 Robert Lipe wrote: > Hi, Gang. > > In 4.1.1, I have a pretty simple need for a kernel thread or two, but > 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. > But that's a secondary problem; the primary one is that I am missing > whatever it takes to get a ticket for the resulting kernel thread to go > to Byte Heaven. > > After a couple of load/unload cycles, I see: kthreads are children of the swapper (pid 0), which doesn't harvest zombies. 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. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message