Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Aug 1999 13:13:43 -0700 (PDT)
From:      anderson@cs.duke.edu
To:        freebsd-gnats-submit@freebsd.org
Subject:   kern/13164: kthread_exit stops, but doesn't release process context
Message-ID:  <19990815201343.F045C1538B@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         13164
>Category:       kern
>Synopsis:       kthread_exit stops, but doesn't release process context
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 15 13:20:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Darrell Anderson
>Release:        FreeBSD 4.0-CURRENT (TPZX) #1: Thu Aug 12 18:43:35 EDT 1999
>Organization:
Duke University Dept. of Computer Science
>Environment:
FreeBSD flapjack.cs.duke.edu 4.0-CURRENT FreeBSD 4.0-CURRENT #1: Thu Aug 12 18:43:35 EDT 1999     anderson@treefrog.cs.duke.edu:/usr/project/ari1/users/anderson/projects/freebsd/sys/compile/TPZX  i386

>Description:
calling kthread_exit leaves the kthread_create'd processes in zombie state.

If those dead threads were created by a kernel module and the module is
unloaded, "w" (more specifically kern_proc.c line 452) can crash the system
when it tries to examine the dead thread's wait channel that points off
into unloaded module vacuum.


>How-To-Repeat:
create a kernel thread with "kthread_create" and have it "kthread_exit."
the process context lingers.
>Fix:
I've added "RFNOWAIT" to the kthread_create fork1 flags.  This
causes the threads to adopt init as their parent and go away cleanly after
a kthread_exit.

>Release-Note:
>Audit-Trail:
>Unformatted:
 


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




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