NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/45705: KASSERT(KERNEL_LOCKED_P()) failed in src/sys/dev/usb/usbdi.c
>Number: 45705
>Category: kern
>Synopsis: KASSERT(KERNEL_LOCKED_P()) failed in src/sys/dev/usb/usbdi.c
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Dec 10 20:41:27 +0000 2011
>Originator: Izumi Tsutsui
>Release: NetBSD 5.99.58
>Organization:
>Environment:
System: NetBSD 5.99.58 updated around 201112101700Z
Architecture: i386
Machine: i386
>Description:
I've built a bootable USB memory image but GENERIC kernel in it get KASSERT
right after mountroot():
panic: kernel diagnostic assertion "KERNEL_LOCKED_P()" failed: file \
"/work/src/sys/dev/usb/usbdi.c", line 264
A GENERIC kernel with commented out KASSERT()s in usbdi.c works
on the same environment.
Here is full log message with trace (via serial console):
---
:
11607209+561092+450360 [587584+575957]=0xd26744
Loading /stand/i386/5.99.58/modules/ffs/ffs.kmod
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011
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 5.99.58 (GENERIC) #0: Sun Dec 11 02:34:28 JST 2011
tsutsui@mirage:/work/src/sys/arch/i386/compile/obj.i386/GENERIC
total memory = 2047 MB
avail memory = 2000 MB
cprng kernel: WARNING insufficient entropy at creation.
RTC BIOS diagnostic error 0x18<memory_size,fixed_disk>
mainbus0 (root)
cpu0 at mainbus0 apid 0: Intel(R) Pentium(R) 4 CPU 2.80GHz, id 0xf34
cpu1 at mainbus0 apid 1: Intel(R) Pentium(R) 4 CPU 2.80GHz, id 0xf34
ioapic0 at mainbus0 apid 2
acpi0 at mainbus0: Intel ACPICA 20110623
acpibut0 at acpi0 (VBTN, PNP0C0C): ACPI Power Button
MEM (PNP0C01) at acpi0 not configured
npx1 at acpi0 (FPU, PNP0C04): io 0xf0-0xff irq 13
pcppi1 at acpi0 (SPK, PNP0800): io 0x61
midi0 at pcppi1: PC speaker
sysbeep0 at pcppi1
attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x5f irq 0
FDC (PNP0700) at acpi0 not configured
pckbc1 at acpi0 (KBD, PNP0303) (kbd port): io 0x60,0x64 irq 1
COMA (PNP0501) at acpi0 not configured
PRT (PNP0401) at acpi0 not configured
MBIO (PNP0C01) at acpi0 not configured
apm0 at acpi0: Power Management spec V1.2
attimer1: attached to pcppi1
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0 mux 1
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0: vendor 0x8086 product 0x2570 (rev. 0x02)
agp0 at pchb0: aperture at 0xd0000000, size 0x10000000
ppb0 at pci0 dev 1 function 0: vendor 0x8086 product 0x2571 (rev. 0x02)
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0: vendor 0x1002 product 0x95c6 (rev. 0x00)
wsdisplay0 at vga1 kbdmux 1
pckbd_enable: command error
radeondrm0 at vga1: ATI Radeon HD 3450
radeondrm0: AGP at 0xd0000000 256MB
radeondrm0: Initialized radeon 1.29.0 20080613
hdaudio0 at pci1 dev 0 function 1: HD Audio Controller
hdaudio0: interrupting at ioapic0 pin 17
hdafg0 at hdaudio0: ATI R6xx HDMI
hdafg0: HDMI00 2ch: Digital Out [Jack]
hdafg0: 2ch/0ch 48000Hz PCM16 AC3
uhci0 at pci0 dev 29 function 0: vendor 0x8086 product 0x24d2 (rev. 0x02)
uhci0: interrupting at ioapic0 pin 16
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 29 function 1: vendor 0x8086 product 0x24d4 (rev. 0x02)
uhci1: interrupting at ioapic0 pin 19
usb1 at uhci1: USB revision 1.0
uhci2 at pci0 dev 29 function 2: vendor 0x8086 product 0x24d7 (rev. 0x02)
uhci2: interrupting at ioapic0 pin 18
usb2 at uhci2: USB revision 1.0
uhci3 at pci0 dev 29 function 3: vendor 0x8086 product 0x24de (rev. 0x02)
uhci3: interrupting at ioapic0 pin 16
usb3 at uhci3: USB revision 1.0
ehci0 at pci0 dev 29 function 7: vendor 0x8086 product 0x24dd (rev. 0x02)
ehci0: interrupting at ioapic0 pin 23
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
usb4 at ehci0: USB revision 2.0
ppb1 at pci0 dev 30 function 0: vendor 0x8086 product 0x244e (rev. 0xc2)
pci2 at ppb1 bus 2
wm0 at pci2 dev 12 function 0: Intel i82540EM 1000BASE-T Ethernet, rev. 2
wm0: interrupting at ioapic0 pin 18
wm0: Ethernet address xx:xx:xx:xx:xx:xx
makphy0 at wm0 phy 1: Marvell 88E1011 Gigabit PHY, rev. 3
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
1000baseT-FDX, auto
ichlpcib0 at pci0 dev 31 function 0: vendor 0x8086 product 0x24d0 (rev. 0x02)
ichlpcib0: 24-bit timer
gpio0 at ichlpcib0: 64 pins
piixide0 at pci0 dev 31 function 1: Intel 82801EB IDE Controller (ICH5) (rev.
0x02)
piixide0: primary channel ignored (disabled)
piixide0: secondary channel interrupting at ioapic0 pin 15
atabus0 at piixide0 channel 1
piixide1 at pci0 dev 31 function 2: Intel 82801EB Serial ATA Controller (rev.
0x02)
piixide1: using ioapic0 pin 18 for native-PCI interrupt
atabus1 at piixide1 channel 0
atabus2 at piixide1 channel 1
ichsmb0 at pci0 dev 31 function 3: vendor 0x8086 product 0x24d3 (rev. 0x02)
ichsmb0: interrupting at ioapic0 pin 17
iic0 at ichsmb0: I2C bus
auich0 at pci0 dev 31 function 5: i82801EB (ICH5) AC-97 Audio
auich0: interrupting at ioapic0 pin 17
auich0: ac97: Analog Devices AD1981B codec; headphone, 20 bit DAC, no 3D stereo
auich0: ac97: ext id 0x601<AC97_22,AMAP,VRA>
isa0 at ichlpcib0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
acpicpu0 at cpu0: ACPI CPU
acpicpu1 at cpu1: ACPI CPU
audio0 at auich0: full duplex, playback, capture, mmap, independent
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
atapibus0 at atabus0: 2 targets
uhub0 at usb0: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1 at usb1: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2 at usb2: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3 at usb3: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub4 at usb4: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
cd0 at atapibus0 drive 0: <PHILIPS CD-RW/DVD-ROM CDD5263, , UD91> cdrom
removable
umass0 at uhub4 port 6 configuration 1 interface 0
umass0: JetFlash Mass Storage Device, rev 2.00/11.00, addr 2
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <JetFlash, Transcend 4GB, 1100> disk removable
sd0: 3864 MB, 7872 cyl, 16 head, 63 sec, 512 bytes/sect x 7913472 sectors
wd0 at atabus1 drive 0
wd0: <Hitachi HDS721616PLA380>
wd0: 153 GB, 319120 cyl, 16 head, 63 sec, 512 bytes/sect x 321672960 sectors
cprng sysctl: WARNING insufficient entropy at creation.
boot device: sd0
root on sd0a dumps on sd0b
panic: kernel diagnostic assertion "KERNEL_LOCKED_P()" failed: file
"/work/src/sys/dev/usb/usbdi.c", line 264
fatal breakpoint trap in supervisor mode
trap type 1 code 0 eip c0269af4 cs 8 eflags 282 cr2 0 ilevel 0
Stopped in pid 0.1 (system) at netbsd:breakpoint+0x4: popl %ebp
db{1}> tr
breakpoint(c0c04874,c0cc1e80,c0b5c0dc,c0e65994,a,0,c0b4beb8,cd82c840,c0e6598c,0)
at netbsd:breakpoint+0x4
vpanic(c0b5c0dc,c0e65994,c0e65a28,c07a4d3a,1,cd82c840,c0e659e8,c087d6ea,c0b5c0dc
,c0b5c2ab) at netbsd:vpanic+0x1e2
kern_assert(c0b5c0dc,c0b5c2ab,c0bfdafd,c0bfd808,108,c0e65a4c,0,0,0,1) at netbsd:
kern_assert+0x23
usbd_transfer(c31e7200,c31eb280,cd855e04,cd855e3c,1f,0,3a98,c086cc5c,cd855e04,0)
at netbsd:usbd_transfer+0x1cf
umass_setup_transfer(1f,0,c31e7200,c07a6358,c0c04874,5,0,0,c0cbfdb6,2) at netbsd
:umass_setup_transfer+0x68
umass_bbb_transfer(cd855e04,0,c314cf50,6,0,0,0,2710,c086e616,c314cebc) at netbsd
:umass_bbb_transfer+0x13a
umass_scsipi_request(c3202938,0,c314cebc,c3202700,c3202700,c314cebc,c314cebc,c07
40ca6,0,0) at netbsd:umass_scsipi_request+0x184
scsipi_run_queue(c314cebc,0,6,c07439ad,c314cf50,c0e65be6,6,c053cb94,c0cc0aa2,746
f6f62) at netbsd:scsipi_run_queue+0x17a
scsipi_execute_xs(c314cebc,c0e65be6,6,0,0,4,2710,0,180,1) at netbsd:scsipi_execu
te_xs+0xd0
scsipi_test_unit_ready(c3202700,180,c0e65c38,c0791774,c0cc0aa0,5,0,0,c0e65c74,0)
at netbsd:scsipi_test_unit_ready+0x77
sdopen(401,0,0,6000,0,0,0,ff800,0,e6b000) at netbsd:sdopen+0x162
sdsize(401,0,9,0,c0bb7664,0,3,0,c0cc4580,e6b000) at netbsd:sdsize+0x107
cpu_dumpconf(0,0,14,0,0,c04b72e0,0,0,c0cdb2a0,0) at netbsd:cpu_dumpconf+0x4d
main(0,0,0,0,0,0,0,0,0,0) at netbsd:main+0x457
db{1}>
---
Not sure if this also happens on wd0 or other disks like SCSI etc.
>How-To-Repeat:
Create bootable disk image for NetBSD/i386, put a GENERIC kernel there,
then boot it from USB memory.
>Fix:
Unknown. Acquire the kernel lock where appropriate?
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index