Subject: Re: mutex fault
To: Andrew Doran <ad@NetBSD.org>
From: Kazushi (Jam) Marukawa <jam@pobox.com>
List: tech-kern
Date: 12/09/2007 12:02:31
I ran netbsd-XEN3 with LOCKDEBUG, -O0 and -g enabled.
However, it crashed at the very eary stage.  I'm afraid this
is not what Andrew expected.

My kernel source is from 11/22 2007.  I'll try this again
with 11/27 or later kernel source since some problems of
LOCKDEBUG were fixd around 11/26.

Anyway, here is the log.

----
<...booting...>
Searching for RAID components...
boot device: wd0
root on wd0a dumps on wd0b
mountroot: trying lfs...
mountroot: trying ffs...
Mutex error: lockdebug_alloc: already initialized

lock address : 0x00000000c187e924 type     :     sleep/adaptive
shared holds :                  0 exclusive:                  0
shares wanted:                  0 exclusive:                  0
current cpu  :                  0 last held:                  0
current lwp  : 0x00000000c0ab5400 last held: 000000000000000000
last locked  : 000000000000000000 unlocked : 000000000000000000
initialized  : 0x00000000c052b2a5
owner field  : 000000000000000000 wait/spin:                0/0

Turnstile chain at 0xc0b5e7c0.
=> No active turnstile for this lock.

panic: LOCKDEBUG
fatal breakpoint trap in supervisor mode
trap type 1 code 0 eip c05dc719 cs 9 eflags 282 cr2 0 ilevel 0
Stopped in pid 0.1 (system) at  netbsd:breakpoint+0x1:  ret
db> trace
breakpoint(c08e615a,c0cdaa84,0,0,c0cdaa84) at netbsd:breakpoint+0x1
panic(c08e539c,c05291ab,c08e5058,c08e5068,0) at netbsd:panic+0xcc
lockdebug_abort1(cb185780,c0b68be0,c08e5058,c08e5068,1) at netbsd:lockdebug_abort1+0x6e
lockdebug_alloc(c187e924,c0ab50b8,c052b2a5,0,700) at netbsd:lockdebug_alloc+0x74
mutex_init(c187e924,1,0,0,c0ab5400) at netbsd:mutex_init+0x125
specificdata_init(ca97c100,c187e920,0,c187f000,1000) at netbsd:specificdata_init+0x2d
mount_initspecific(c187e000,c187e510,3ff,0,0) at netbsd:mount_initspecific+0x20
vfs_rootmountalloc(c08cec14,c08cec40,c0cdabb4,c0528c9f,0) at netbsd:vfs_rootmountalloc+0x1a2
ffs_mountroot(c0b69e74,c08cec14,fffffffe,c0ab5400,2) at netbsd:ffs_mountroot+0x47
vfs_mountroot(c0b5eb48,20,c08dcf66,64,0) at netbsd:vfs_mountroot+0x1b2
main(c01001df,c01001e7,0,0,0) at netbsd:main+0x2c0
db> 
----

Regards,
-- Kazushi
Speak softly and carry a +6 two-handed sword.