Date: Mon, 17 Jun 2002 11:47:13 +0200 From: Andy Sporner <sporner@nentec.de> To: freebsd-hackers <freebsd-hackers@FreeBSD.ORG> Subject: Kernel Panic using kproc_exit() on FreeBSD 5.0-20020302-PREVIEW Message-ID: <3D0DB021.4080102@nentec.de> References: <F32bek2lisuJnOVHKgG00003ca2@hotmail.com> <3D099F31.8F0F0702@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Hackers,
First of all...
>
>Knuth's books: Collect them all! Be the first on your block!
>
This is funny--mainly because I have one of these-- it was the bible in
college
(I think the one I have is "Data structures and Algorithms")
Now to the real question:
I have some logic to stop a daemon thread running in a module:
------------SNIP
#include "modtcp.h"
#include <sys/kthread.h>
static struct proc *modtcpproc;
static void modtcpd(void);
static struct kproc_desc kp = {
"modtcpd",
modtcpd,
&modtcpproc
};
extern int should_die;
SYSINIT(modtcpd, SI_SUB_KTHREAD_BUF, SI_ORDER_FIRST, kproc_start, &kp)
static void modtcpd(void)
{
tsleep(0x0dead0001, 0, "General Wait", 400);
kthread_exit(0);
}
---------------------SNIP ENDS
This is not the actual usage that I have for the daemon, but I wanted to
reduce the problem set so that I can get the minimal amount of code
to produce the same failure.
After the sleep concludes and 'kthread_exit()' runs, the following
occurs...
panic: mutex Giant not owned at ../../../kern/kern_exit.c"131
Debuger("panic")
Stopped at Debugger+0x40: xorl %eax,%eax
Is this a bug in the kernel or???
Thanks!
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?3D0DB021.4080102>
