Subject: Re: kern/32162: [netbsd-3.0] kernel dead-lock in MP system
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Chuck Silvers <chuq@chuq.com>
List: netbsd-bugs
Date: 01/13/2006 15:40:01
The following reply was made to PR kern/32162; it has been noted by GNATS.

From: Chuck Silvers <chuq@chuq.com>
To: Andreas Wrede <andreas@planix.com>
Cc: Jason Thorpe <thorpej@shagadelic.org>,
	Manuel Bouyer <bouyer@antioche.eu.org>, gnats-bugs@NetBSD.org,
	kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
	netbsd-bugs@NetBSD.org
Subject: Re: kern/32162: [netbsd-3.0] kernel dead-lock in MP system
Date: Fri, 13 Jan 2006 07:37:02 -0800

 CPU 0 got a page-fault in pmap_activate(), and it's trying to print
 something on the console (before panicing).  the pty code is trying to
 call wakeup, which needs the sched_lock that is already held by the
 context-switch code that is calling pmap_activate().
 
 CPU 1 is waiting for sched_lock, which is held by CPU 0.
 
 looks like more memory corruption.
 
 -Chuck
 
 
 On Wed, Jan 11, 2006 at 10:07:55PM -0500, Andreas Wrede wrote:
 > Any idea what this is and what to do next?
 > 
 > cpu0: spinout
 > Stopped in pid 18.1 (aiodoned) at       netbsd:cpu_Debugger 
 > +0x4:        leave
 > db{0}> bt
 > cpu_Debugger(c067db95,0,c2bf7cdc,cd262b7c,c0713354) at  
 > netbsd:cpu_Debugger+0x4
 > __cpu_simple_lock(c0713a1c,0,c2993df4,c36b6100,cd262b7c) at  
 > netbsd:__cpu_simple_lock+0x93
 > printf_nolog(c06769f5,cd262b7c,c069ace4,cd262c30,a) at  
 > netbsd:printf_nolog+0x32
 > lock_printf(c069ace4,a080101,cd262c54,c033d966,c3874200) at  
 > netbsd:lock_printf+0x4c
 > _simple_lock(c0713354,c06cb1c0,440,c,c2b360c0) at netbsd:_simple_lock 
 > +0x235
 > selwakeup(c2b360c8,989680,0,66,cc2016c0) at netbsd:selwakeup+0x99
 > ptsstart(cc2016c0,0,c06cb840,7,cc2016c0) at netbsd:ptsstart+0x85
 > ttstart(cc2016c0,cc2016c0,9ac,1,0) at netbsd:ttstart+0x1e
 > tputchar(66,7,cc2016c0,cc2016c0,cbfbb024) at netbsd:tputchar+0x79
 > putchar(66,5,0,6,0) at netbsd:putchar+0x49
 > kprintf(c067f495,5,0,0,cd262de0) at netbsd:kprintf+0x5c
 > printf(c067f495,c067f385,cd262e60,1,1ebd4) at netbsd:printf+0x46
 > trap() at netbsd:trap+0x106
 > --- trap (number 6) ---
 > pmap_activate(cc20b8c4,cc2101d0,4c,0,c034cbf9) at netbsd:pmap_activate 
 > +0x39
 > mpidle(cc20b8c4,0,1d9,c0786ff0,c0789608) at netbsd:mpidle+0xcb
 > ltsleep(c0789600,204,c067744e,0,c0789608) at netbsd:ltsleep+0x4d0
 > uvm_aiodone_daemon(cc20b8c4,842000,84b000,0,c0100321) at  
 > netbsd:uvm_aiodone_daemon+0x15f
 
 
 > db{0}> machine cpu 1
 > using CPU 1
 > db{0}> bt
 > __cpu_simple_lock(c0713354,c035241b,c07620a8,297,10b) at  
 > netbsd:__cpu_simple_lock+0x6f
 > _simple_lock(c0713354,c06c8d00,47b,c,c21a303c) at netbsd:_simple_lock 
 > +0x7a
 > schedclock(cf1859e8,c2266a00,c355a788,c21c4838,ce453c78) at  
 > netbsd:schedclock+0x58
 > statclock(ce453cbc,c01f7f52,c21c4800,80,c066ea25) at netbsd:statclock 
 > +0xeb
 > hardclock(ce453cbc,3,c03902b8,ce453cb4,0) at netbsd:hardclock+0x5f3
 > lapic_clockintr(0,0,c0330010,30,1310010) at netbsd:lapic_clockintr+0x48
 > Xresume_lapic_ltimer() at netbsd:Xresume_lapic_ltimer+0x1b
 > --- interrupt ---
 > Xspllower(0,c06c6880,390,206,0) at netbsd:Xspllower+0xe
 > _lockmgr(c0764180,400006,0,c06d69c0,da4) at netbsd:_lockmgr+0x250
 > pmap_enter(cfcabc28,81fe000,37762000,3,22) at netbsd:pmap_enter+0x4d6
 > uvm_fault(ce8ec2b4,81fe000,0,2,2) at netbsd:uvm_fault+0x976
 > trap() at netbsd:trap+0x36f
 > --- trap (number 6) ---
 > 0xbdb685fc: