From owner-freebsd-current@FreeBSD.ORG Mon Apr 26 10:27:17 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A22116A4CF for ; Mon, 26 Apr 2004 10:27:17 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id F067943D49 for ; Mon, 26 Apr 2004 10:27:16 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i3QHRFQk006992; Mon, 26 Apr 2004 13:27:15 -0400 (EDT) Date: Mon, 26 Apr 2004 13:27:15 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Gavin Atkinson In-Reply-To: <20040426174558.Y36874@ury.york.ac.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: panic: Exit: Single threading fouled up X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2004 17:27:17 -0000 On Mon, 26 Apr 2004, Gavin Atkinson wrote: > > Hi, > > I've seen this panic twice now, once on a heavily loaded UP machine > running gnome at the time, and once on an SMP (hyperthreaded) machine > which was mostly idle as it was shutting down. Both running with ULE. > > FreeBSD buffy.york.ac.uk 5.2-CURRENT FreeBSD 5.2-CURRENT #7: Tue Apr 13 > 19:45:13 BST 2004 root@buffy.york.ac.uk:/usr/obj/usr/src/sys/GENERIC > i386 > > (the other machine - the idle one - is running a kernel from April 17th) > > panic: Exit: Single threading fouled up > at line 157 in file /usr/src/sys/kern/kern_exit.c > cpuid = 0; > Debugger("panic") > Stopped at Debugger+0x46: xchgl %ebx,in_Debugger.0 > db> trace > Debugger(c07bfacf) at Debugger+0x46 > __panic(c07bd400,9d,c07bd45d,c302ac08,9) at __panic+0x13d > exit1(c4005000,9,decaca10,c4005000,c2f0a000) at exit1+0x418 > sigexit(c4005000,9,c2f0aaa8,0,c07bfdc9) at sigexit+0xd7 > postsig(9) at postsig+0x171 > thread_export_context(c4005000,1,c2d00780,0,0) at > thread_export_context+0x116 > thread_userret(c4005000,decacd48) at thread_userret+0x1b9 > userret(c4005000,decacd48,0,3,0) at userret+0x58 > syscall(83c002f,819002f,bfa6002f,81ff200,8) at syscall+0x2d9 > Xint0x80_syscall() at Xint0x80_syscall+0x1d > --- syscall (32, FreeBSD ELF32, getsockname), eip = 0x2920cd8b, esp = > 0xbfacdd74, ebp = 0xbfacdda0 --- > db> sh locks > exclusive sleep mutex process lock r = 0 (0xc302ac74) locked @ > /usr/src/sys/kern/kern_exit.c:134 > > Unfortunately I have been unable to get a dump on either machine. Sadly, > it's not not reproducible. There looks to be a missing PROC_UNLOCK in kern/kern_sig.c::sigexit(). Does this patch help any? -- Dan Eischen Index: kern/kern_sig.c =================================================================== RCS file: /opt/FreeBSD/cvs/src/sys/kern/kern_sig.c,v retrieving revision 1.276 diff -u -r1.276 kern_sig.c --- kern/kern_sig.c 12 Apr 2004 15:56:05 -0000 1.276 +++ kern/kern_sig.c 26 Apr 2004 20:22:20 -0000 @@ -2413,8 +2413,8 @@ td->td_ucred ? td->td_ucred->cr_uid : -1, sig &~ WCOREFLAG, sig & WCOREFLAG ? " (core dumped)" : ""); - } else - PROC_UNLOCK(p); + } + PROC_UNLOCK(p); exit1(td, W_EXITCODE(0, sig)); /* NOTREACHED */ }