From owner-freebsd-current Fri Mar 30 16:13:55 2001 Delivered-To: freebsd-current@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id E192237B71F; Fri, 30 Mar 2001 16:13:50 -0800 (PST) (envelope-from mjacob@feral.com) Received: from beppo (beppo [192.67.166.79]) by feral.com (8.9.3/8.9.3) with ESMTP id QAA20270; Fri, 30 Mar 2001 16:13:56 -0800 Date: Fri, 30 Mar 2001 16:13:50 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: John Baldwin Cc: current@FreeBSD.ORG Subject: RE: hmm.... spinlocks.. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 30 Mar 2001, John Baldwin wrote: > > On 30-Mar-01 Matthew Jacob wrote: > > > > > > pic_initialize(): > > lint0: 0x00010700 lint1: 0x00010400 TPR: 0x00000010 SVR: 0x000001ff > > kernel trap 12 with interrupts disabled > > panic: spin lock sched lock held by 0xc7ba8a60 for > 5 seconds > > cpuid = 0; lapic.id = 00000000 > > Debugger("panic") > > > > CPU0 stopping CPUs: 0x00000002... stopped. > > Stopped at Debugger+0x45: pushl %ebx > > db> t > > Debugger(c02e3759) at Debugger+0x45 > > panic(c02e2d60,c02fb929,c7ba8a60,c7ba7b80,fffea000) at panic+0xd0 > > _mtx_lock_spin(c0357400,0,80246,c02e3a48,2fb) at _mtx_lock_spin+0x6e > > wakeup(c3709378,c3709378,c0eec000,c0f71400,c3709454) at wakeup+0x67 > > bufdone(c3709378,c7fbff40,c0131efb,c3709378,c0f71400) at bufdone+0x385 > > bufdonebio(c3709378) at bufdonebio+0xe > > dadone(c0f5d100,c0f71400) at dadone+0x1f7 > > camisr(c032a834) at camisr+0x231 > > ithread_loop(c0b2f080,c7fbffa8) at ithread_loop+0x247 > > fork_exit(c019898c,c0b2f080,c7fbffa8) at fork_exit+0x83 > > fork_trampoline() at fork_trampoline+0x8 > > Did you get a crashdump (probably not.) If you look at sched_lock, one of the > words will be a pointer to the process owning the lock in question. > Unfortunately it's not the first word anymore (something I may change in the > future). On the alpha it would be 'sched_lock+48'. The pointer there points > to the process owning the lock (and you can look up the process via ps). If > you have a crash dump then I have some gdb macros that make it easy to get a > backtrace of that process. If not, then, well, it gets harder. :-P Hmm, it > might be nice to be able to ask ddb to give a backtrace of any arbitrary > process. Maybe I'll add a new command for that.. > > The trick is that we want to know who grabbed sched_lock where and then started > spinning with it. Using KTR with KTR_LOCK turned on and using the 'show ktr' > command in ddb could also be used to see which process was the last to grab > sched_lock and where it was grabbed. If it happens again, I''ll try. This was, btw, i386. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message