From owner-freebsd-hackers Mon Jun 17 2:47:28 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from gate.nentec.de (gate2.nentec.de [194.25.215.66]) by hub.freebsd.org (Postfix) with ESMTP id D580837B400 for ; Mon, 17 Jun 2002 02:47:20 -0700 (PDT) Received: from nenny.nentec.de (root@nenny.nentec.de [153.92.64.1]) by gate.nentec.de (8.11.3/8.9.3) with ESMTP id g5H9lJA22772 for ; Mon, 17 Jun 2002 11:47:19 +0200 Received: from nentec.de (andromeda.nentec.de [153.92.64.34]) by nenny.nentec.de (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id g5H9lDZ27207 for ; Mon, 17 Jun 2002 11:47:14 +0200 Message-ID: <3D0DB021.4080102@nentec.de> Date: Mon, 17 Jun 2002 11:47:13 +0200 From: Andy Sporner User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:0.9.8) Gecko/20020204 X-Accept-Language: de-at, de, en, en-us MIME-Version: 1.0 To: freebsd-hackers Subject: Kernel Panic using kproc_exit() on FreeBSD 5.0-20020302-PREVIEW References: <3D099F31.8F0F0702@mindspring.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS-perl11-milter (http://amavis.org/) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 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