Date: Wed, 07 Feb 2001 16:40:13 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Andrea Campi <andrea@webcom.it> Cc: current@FreeBSD.org, "Crist J. Clark" <cjclark@reflexnet.net>, Jim Bloom <bloom@acm.org> Subject: Re: Kernel Panic from Yesterday's CVSup Message-ID: <XFMail.010207164013.jhb@FreeBSD.org> In-Reply-To: <20010207235459.B534@webcom.it>
next in thread | previous in thread | raw e-mail | index | archive | help
On 07-Feb-01 Andrea Campi wrote: > On Wed, Feb 07, 2001 at 02:20:43PM -0800, John Baldwin wrote: >> >> On 07-Feb-01 Andrea Campi wrote: >> > Running a kernel I got with this: >> > >> >> >> >> cvs co -D"2001-01-30" src/sys >> >> >> > >> > /ithread.c/1.10/Mon Dec 4 21:15:14 2000//D2001.01.29.23.00.00 >> > >> > I get: >> > >> > panic: malloc(M_WAITOK) in interrupt context >> > Debugger("panic") >> > Stopped at Debugger+0x45: pushl %ebx >> > db> trace >> > Debugger(c02119a3) at Debugger+0x45 >> > panic(....) >> > malloc(48,c0238100,0,c65feb80,0) at malloc+0x2a >> > exit1(c65feb80,0,0,c6623f78,c01fc852) at exit1+0x1b1 >> > kthread_suspend(0,c0279a40,0,c022d1ec,a2) at kthread_suspend >> > ithd_loop(0,c6623fa8) at ithd_loop+0x56 >> > fork_exit(c01fc7fc,0,c6623fa8) at fork_exit+0x8 >> > fork_trampoline() at fork_trampoline+0x8 >> > db> witness_list >> > "Giant" (0xc0279a40) locked at ../../i386/isa/ithread.c:162 >> >> Erm, ithd_loop() doesn't call kthread_suspend(). *sigh*. Something >> else is rather messed up here I'm afraid. > > So I thought... also, kthread_suspend() doesn't call exit1(), does it? > > > No matter what, ithd_loop() calls kthread_exit() which calls exit1() > which happily MALLOC's with M_WAITOK... > Something is messed up, indeed, but it seems to be a case of WISIWYG instead > of what I mean... ;-) > > > Also, I think this issue has been there longer but it might have been masked > by me not having INVARIANTS defined at times (am I correct to read the code > as > not panicing #ifndef INVARIANTS?). So I am going back before this revision: > > revision 1.78 > date: 2001/01/21 19:25:07; author: jake; state: Exp; lines: +3 -2 > Make intr_nesting_level per-process, rather than per-cpu. Setup > interrupt threads to run with it always >= 1, so that malloc can > detect M_WAITOK from "interrupt" context. This is also necessary > in order to context switch from sched_ithd() directly. Yes, the intr_nesting_level needs to be dropped before calling kthread_exit(). I have this fixed in a different manner locally. You can try that to see if it gets farther. However, your problems with lpr are a known problem and one that is in the process of being fixed. -- John Baldwin <jhb@FreeBSD.org> -- 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-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010207164013.jhb>