Subject: Re: port-i386/37637: MP kernel hangs before starting init
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Bernd Ernesti <pr200709@veego.de>
List: netbsd-bugs
Date: 12/31/2007 20:00:08
The following reply was made to PR port-i386/37637; it has been noted by GNATS.
From: Bernd Ernesti <pr200709@veego.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-i386/37637: MP kernel hangs before starting init
Date: Mon, 31 Dec 2007 20:58:30 +0100
On Mon, Dec 31, 2007 at 10:00:07AM +0000, Andrew Doran wrote:
> On Sun, Dec 30, 2007 at 10:55:02AM +0000, Bernd Ernesti wrote:
>
> > Adding two prinfts around
> > for (pdev = pdevinit; pdev->pdev_attach != NULL; pdev++)
> > (*pdev->pdev_attach)(pdev->pdev_count);
> > shows that it really stops here.
>
> Ok, can you do a printf("%x\n", pdev->pdev_attach) on each iteration through
> the loop? Using nm to match the address you can then find which driver is
> causing the boot to hang.
Hmm, that wouldn't work:
/src/sys/kern/init_main.c:499: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'void (*)(int)'
I changed it to:
printf("%x\n", (int32_t)pdev->pdev_attach);
And got this (the corresponding nm values are at the end):
[..]
audio0 at auich0: full duplex, independent
Before pseudo-devices attachments (this is a printf without DELAY before the loop)
c03e36c0
c0113680
crypto: assign driver 0, flags 2
crypto: driver 0 registers alg 1 flags 0 maxoplen 0
crypto: driver 0 registers alg 2 flags 0 maxoplen 0
crypto: driver 0 registers alg 3 flags 0 maxoplen 0
crypto: driver 0 registers alg 4 flags 0 maxoplen 0
crypto: driver 0 registers alg 5 flags 0 maxoplen 0
crypto: driver 0 registers alg 17 flags 0 maxoplen 0
crypto: driver 0 registers alg 6 flags 0 maxoplen 0
crypto: driver 0 registers alg 7 flags 0 maxoplen 0
crypto: driver 0 registers alg 15 flags 0 maxoplen 0
crypto: driver 0 registers alg 8 flags 0 maxoplen 0
crypto: driver 0 registers alg 16 flags 0 maxoplen 0
crypto: driver 0 registers alg 9 flags 0 maxoplen 0
crypto: driver 0 registers alg 10 flags 0 maxoplen 0
crypto: driver 0 registers alg 13 flags 0 maxoplen 0
crypto: driver 0 registers alg 14 flags 0 maxoplen 0
crypto: driver 0 registers alg 11 flags 0 maxoplen 0
crypto: driver 0 registers alg 18 flags 0 maxoplen 0
c03c0330
c03c0de0
Kernel lock error: _kernel_lock: spinout
lock address : 0x00000000c08aaa80 type : spin
shared holds : 0 exclusive: 1
shares wanted: 0 exclusive: 1
current cpu : 1 last held: 0
current lwp : 0x00000000cc36f600 last held: 0x00000000c08382e0
last locked : 0x00000000c03d80ca unlocked : 0x00000000c04091b7
initialized : 0x00000000c03d7f69
curcpu holds : 0 wanted by: 0x00000000cc36f600
c03c3b60
panic: c03d22a0
LOCKDEBUGc0472030
Stopped in pid 0.30 (system) at netbsd:breakpoint+0x1: ret
db{1}> bt
breakpoint(c07c8a03,c07c458c,c06b5637,c07c452b,c08b7be0) at netbsd:breakpoint+0x1
lockdebug_abort1(c07c452b,1,ffea185,5,0) at netbsd:lockdebug_abort1+0x6b
lockdebug_abort(c08aaa80,c0837b84,c06b5637,c07c452b,0) at netbsd:lockdebug_abort+0x74
_kernel_lock(1,cc36f600,0,c01002bd,0) at netbsd:_kernel_lock+0x244
Corresponding values from nm:
c03e36c0 T cpuctlattach
c0113680 T swcryptoattach
c03c0330 T bioattach
c03c0de0 T ccdattach
c03c3b60 T cgdattach
c03d22a0 T vndattach
c0472030 T bpfilterattach
Bernd