NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/39156: LOCKDEBUG yeilds "spin lock held" during early phase of autoconf



>Number:         39156
>Category:       kern
>Synopsis:       LOCKDEBUG yeilds "spin lock held" during early phase of 
>autoconf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 16 18:05:00 +0000 2008
>Originator:     Havard Eidnes
>Release:        NetBSD 4.99.70
>Organization:
        I try...
>Environment:
System: NetBSD ctd.urc.uninett.no 4.99.69 NetBSD 4.99.69 (CTD) #5: Wed Jul  9 
15:29:52 CEST 2008  
he%ctd.urc.uninett.no@localhost:/usr/obj/sys/arch/i386/compile/CTD i386
Architecture: i386
Machine: i386
>Description:
        Trying to boot a new kernel on this machine with LOCKDEBUG,
        DIAGNOSTIC and KMEMSTATS defined gives a "Mutex error" during
        probing of the CPUs.  This is the console log showing the
        backtrace:

booting hd0a:netbsd - starting in 0 
9941228+435332+648176 [466128+455372]=0xb66b64
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 4.99.70 (CTD) #6: Wed Jul 16 16:58:43 CEST 2008
        he%ctd.urc.uninett.no@localhost:/usr/obj/sys/arch/i386/compile/CTD
total memory = 2047 MB
avail memory = 2000 MB
Supermicro P4DP6 (0123456789)
mainbus0 (root)
ACPI Error (tbxfroot-0308): A valid RSDP was not found [20080321]
ACPI: unable to initialize ACPI tables: AE_NOT_FOUND
mainbus0: Intel MP Specification (Version 1.4) (         Kings Canyon)
cpu0 at mainbus0 apid 0Mutex error: lockdebug_barrier: spin lock held

lock address : 0x00000000c0b46ac0 type     :               spin
initialized  : 0x00000000c0413244
shared holds :                  0 exclusive:                  1
shares wanted:                  0 exclusive:                  0
current cpu  :                  0 last held:                  0
current lwp  : 0x00000000c0a961c0 last held: 0x00000000c0a961c0
last locked  : 0x00000000c04155a6 unlocked : 0x00000000c0415619
owner field  : 0x0000000000010600 wait/spin:                0/1

panic: LOCKDEBUG
fatal breakpoint trap in supervisor mode
trap type 1 code 0 eip c054f45c cs 8 eflags 246 cr2 c317200c ilevel 8
Stopped in pid 0.1 (system) at  netbsd:breakpoint+0x4:  popl    %ebp
db{0}> ps /l
 PID         LID S     FLAGS       STRUCT LWP *               NAME WAIT
>0            11 2       204           cc42a4e0             sysmon
              10 2       204           cc42a740           pmfevent
               9 2       204           cc42a9a0            cachegc
               8 2       204           cc42ac00              vrele
               7 2       204           cc427000            xcall/0
               6 1       204           cc427260          softser/0
               5 1       204           cc4274c0          softclk/0
               4 1       204           cc427720          softbio/0
               3 1       204           cc427980          softnet/0
               2 1       205           cc427be0             idle/0
           >   1 7       204           c0a961c0            swapper
db{0}> tra
breakpoint(c0a6d3b5,c0c6a5b0,c0a99bc0,c049eabf,8,1,0,0,c0c6a5b0,0) at 
netbsd:breakpoint+0x4
panic(c0a2af58,c0a26b0f,c081e57c,c0a2af71,10055a6,1000001,8,c0a961c0,c3172000,c0b49780)
 at netbsd:panic+0x1b8
lockdebug_abort1(c0a2af71,1,1,0,c0a99cd8,c0b312cc,0,c0c6a618,c07dfe86,c0b4b8e0) 
at netbsd:lockdebug_abort1+0xbb
rw_vector_enter(c0b2ff04,0,c0b312c0,c0c6a698,c07dfe86,c0c6a79c,c0c6a7c4,c040bfe2,c0b2ff00,c0b46fe4)
 at netbsd:rw_vector_enter+0x31a
vm_map_lock_read(c0b2ff00,c0b46fe4,0,c0c6a6c8,c0498585,c0b4b8ec,c0b46fe4,c0c6a6c8,c07dfe86,c0b4bf60)
 at netbsd:vm_map_lock_read+0x21
uvm_fault_internal(c0b2ff00,c3172000,2,0,c04980fb,c0b4b92c,c0b46ac0,0,c04155a6,0)
 at netbsd:uvm_fault_internal+0xa2
trap() at netbsd:trap+0x698
--- trap (number 6) ---
uvm_kmapent_alloc(c0b4be6c,c0b48aa0,c0c6a938,c04980fb,c0b4be6c,c0b48aa0,0,c046aa0e,0,c0a961c0)
 at netbsd:uvm_kmapent_alloc+0x70
uvm_map(c0b312c0,c0c6a9b8,1000,0,ffffffff,ffffffff,0,c01727,c046ad12,c0a961c0) 
at netbsd:uvm_map+0x63
uvm_km_alloc(c0b312c0,1000,0,400001,c0b4be6c,3ec0,c0c6aa32,1000,1000,c0b48c40) 
at netbsd:uvm_km_alloc+0x9d
malloc(9a0,c0a95700,1,0,0,30d4,246,c06c3420,246,0) at netbsd:malloc+0x3b1
i686_mtrr_init_first(690,c3121380,c3121280,10,c3125dc0,1008,c0c6aae8,c053834c,c0a99bc0,1008)
 at netbsd:i686_mtrr_init_first+0xa2
cpu_init(c0a99bc0,1008,10,c048ee1d,c0b1e480,cc42df20,c317891c,c0c6ab38,c3178800,c0a99bc0)
 at netbsd:cpu_init+0x12d
cpu_attach(c3178900,c3178800,c0c6ab38,c0c6ab44,c0c6ab38,0,c3178800,508,c0a95340,17)
 at netbsd:cpu_attach+0x43c
config_attach_loc(c3178900,c0a831d0,c0c6ab44,c0c6ab38,c0548b80,c048e440,0,1,c0822b50,0)
 at netbsd:config_attach_loc+0x173
mpbios_cpu(508,c0a95340,3,c049e865,8,5,0,ccd0559c,ccd05714,0) at 
netbsd:mpbios_cpu+0x6a
mpbios_scan(c3178900,c0c6ac14,c0c6ac18,c0b1e480,c09ea6e7,c0a4367e,0,c046c8ba,8,c048ee1d)
 at netbsd:mpbios_scan+0x618
mainbus_attach(0,c3178900,0,c048e63e,c09e745b,c09e745b,c3178900,0,c09e745b,c70000)
 at netbsd:mainbus_attach+0x326
config_attach_loc(0,c0a833b0,0,0,0,c70000,c0c6ac98,c048fbf4,0,c0a833b0) at 
netbsd:config_attach_loc+0x173
config_attach(0,c0a833b0,0,0,0,c044b040,c0c6acb8,c054f038,c09e745b,0) at 
netbsd:config_attach+0x2c
config_rootfound(c09e745b,0,0,0,c044b040,0,c0c6ace8,c048fd9d,c0b30aa4,1) at 
netbsd:config_rootfound+0x44
cpu_configure(c0b30aa4,1,c0c6ace8,c04d5621,100,0,c0c6ace8,c04f9583,c0b53a80,0) 
at netbsd:cpu_configure+0x28
configure(c0b2ff00,a,14,f9300,0,0,0,0,0,0) at netbsd:configure+0x3d
main(0,c01002cd,0,0,0,0,0,0,0,0) at netbsd:main+0x1b5
db{0}> reboot 4

The operating system has halted.
Please press any key to reboot.

rebooting...
        
        Witout LOCKDEBUG, I get

booting hd0a:netbsd (howto 0x1000)
9930012+435332+615344 [465536+454906]=0xb5b704
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 4.99.70 (CTD) #7: Wed Jul 16 19:27:00 CEST 2008
        he%ctd.urc.uninett.no@localhost:/usr/obj/sys/arch/i386/compile/CTD
total memory = 2047 MB
avail memory = 2000 MB
userconf: configure system autoconfiguration:
Supermicro P4DP6 (0123456789)
mainbus0 (root)
ACPI Error (tbxfroot-0308): A valid RSDP was not found [20080321]
ACPI: unable to initialize ACPI tables: AE_NOT_FOUND
mainbus0: Intel MP Specification (Version 1.4) (         Kings Canyon)
cpu0 at mainbus0 apid 0uvm_fault(0xc0b2cf00, 0xc3167000, 2) -> 0xe
fatal page fault in supervisor mode
trap type 6 code 3 eip c0415790 cs 8 eflags 10246 cr2 c316700c ilevel 8
kernel: supervisor trap page fault, code=0
Stopped in pid 0.1 (system) at  netbsd:uvm_kmapent_alloc+0x70:  movl    
%eax,0xc(%ebx)
db{0}> tra
uvm_kmapent_alloc(c0b2cf04,cccec27c,c0c5f928,c04135eb,c0b2cf04,cccec224,c0c5f938,c30f432c,0,0)
 at netbsd:uvm_kmapent_alloc+0x70
uvm_map(c0b2e2c0,c0c5f9b8,1000,0,ffffffff,ffffffff,0,c01727,c0b43fe4,cccec224) 
at netbsd:uvm_map+0x63
uvm_km_alloc(c0b2e2c0,1000,0,400001,c3140a00,3ec0,c0c5fa32,1000,1000,c0b45c40) 
at netbsd:uvm_km_alloc+0x9d
malloc(9a0,c0a92720,1,0,0,30d4,246,c06c1140,246,0) at netbsd:malloc+0x3b5
i686_mtrr_init_first(690,c3116380,c3116280,10,c311adc0,1008,c0c5fae8,c053607c,c0a96bc0,1008)
 at netbsd:i686_mtrr_init_first+0xa2
cpu_init(c0a96bc0,1008,10,c048de8d,c0b1b480,cc40df20,c316d91c,c0c5fb38,c316d800,c0a96bc0)
 at netbsd:cpu_init+0x12d
cpu_attach(c316d900,c316d800,c0c5fb38,c0c5fb44,c0c5fb38,0,c316d800,508,c0a92360,17)
 at netbsd:cpu_attach+0x43c
config_attach_loc(c316d900,c0a801f0,c0c5fb44,c0c5fb38,c0546910,c048d4b0,0,1,c08206f0,0)
 at netbsd:config_attach_loc+0x173
mpbios_cpu(508,c0a92360,3,c049c595,8,5,0,cccf259c,cccf2714,0) at 
netbsd:mpbios_cpu+0x6a
mpbios_scan(c316d900,c0c5fc14,c0c5fc18,cc40df01,cc40ef50,c0a40aa6,0,c033aebe,c0b1b480,c09e8287)
 at netbsd:mpbios_scan+0x618
mainbus_attach(0,c316d900,0,c048d6ae,c09e4ffb,c09e4ffb,c316d900,0,c09e4ffb,c65000)
 at netbsd:mainbus_attach+0x326
config_attach_loc(0,c0a803d0,0,0,0,c65000,c0c5fc98,c048ec64,0,c0a803d0) at 
netbsd:config_attach_loc+0x173
config_attach(0,c0a803d0,0,0,0,c044b1b0,c0c5fcb8,c054cdc8,c09e4ffb,0) at 
netbsd:config_attach+0x2c
config_rootfound(c09e4ffb,0,2,0,c044b1b0,0,c0c5fce8,c048ee0d,c0b2daa4,1) at 
netbsd:config_rootfound+0x44
cpu_configure(c0b2daa4,1,c0c5fce8,c04d3351,100,0,c0c5fce8,c04f72b3,c0b48a60,0) 
at netbsd:cpu_configure+0x28
configure(c0b2cf00,a,14,f9300,0,0,0,0,0,0) at netbsd:configure+0x3d
main(0,c01002cd,0,0,0,0,0,0,0,0) at netbsd:main+0x1b5
db{0}> 

        ...which isn't a whole lot better...

        
>How-To-Repeat:
        Try to boot a new kernel with LOCKDEBUG, and watch it crash
        and burn.

>Fix:
        Sorry, don't know.



Home | Main Index | Thread Index | Old Index