NetBSD-Bugs archive

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

kern/41133: Connecting an USB mass storage device locks up the kernel



>Number:         41133
>Category:       kern
>Synopsis:       Connecting an USB mass storage device locks up the kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 03 22:20:04 +0000 2009
>Originator:     Matthias Scheler
>Release:        NetBSD 5.0_RC3 2009-0-331 sources
>Organization:
Matthias Scheler                                  http://zhadum.org.uk/
>Environment:
System: NetBSD colwyn.zhadum.org.uk 5.0_RC3 NetBSD 5.0_RC3 (COLWYN.64) #0: Tue 
Mar 31 18:09:57 BST 2009 
tron%colwyn.zhadum.org.uk@localhost:/src/sys/compile/COLWYN.64 amd64
Architecture: x86_64
Machine: amd64
>Description:
For the second time my NetBSD/amd64 Dual Core system locked up completely
when I connected a USB mass storage device. This is what I got out of
the locked up kernel via the serial console:

db{0}> bt
breakpoint() at netbsd:breakpoint+0x5
comintr() at netbsd:comintr+0x53a
Xintr_ioapic_edge1() at netbsd:Xintr_ioapic_edge1+0xef
--- interrupt ---
uvm_pglistalloc() at netbsd:uvm_pglistalloc+0x391
_bus_dmamem_alloc_range() at netbsd:_bus_dmamem_alloc_range+0x42
_bus_dmamem_alloc() at netbsd:_bus_dmamem_alloc+0x49
usb_block_allocmem() at netbsd:usb_block_allocmem+0xe4
usb_allocmem() at netbsd:usb_allocmem+0x45
uhci_alloc_std() at netbsd:uhci_alloc_std+0x58
uhci_allocm() at netbsd:uhci_allocm+0x88
usbd_alloc_buffer() at netbsd:usbd_alloc_buffer+0x20
umass_attach() at netbsd:umass_attach+0x2f4
config_attach_loc() at netbsd:config_attach_loc+0x14a
usbd_attachinterfaces() at netbsd:usbd_attachinterfaces+0x1f2
usbd_probe_and_attach() at netbsd:usbd_probe_and_attach+0x9c
usbd_new_device() at netbsd:usbd_new_device+0x390
uhub_explore() at netbsd:uhub_explore+0x1e0
usb_discover() at netbsd:usb_discover+0x37
usb_event_thread() at netbsd:usb_event_thread+0x3e

Backtrace of the second CPU:

db{0}> bt
x86_pause() at netbsd:x86_pause
_kernel_lock() at netbsd:_kernel_lock+0xc7
tcp_usrreq_wrapper() at netbsd:tcp_usrreq_wrapper+0x39
sosend() at netbsd:sosend+0x4e4
soo_write() at netbsd:soo_write+0x2d
dofilewrite() at netbsd:dofilewrite+0x81
sys_write() at netbsd:sys_write+0x72
syscall() at netbsd:syscall+0x9d

This problem only occurs occassional and is not (easy) reproducable.
After rebooting the machine the USB card reader attached fine:

umass0: detached
umass0 at uhub1 port 1 configuration 1 interface 0
umass0: Generic USB Storage Device, rev 1.10/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 4 luns per target
sd0 at scsibus0 target 0 lun 0: <Generic, USB Storage-SMC, 0180> disk removable
sd0: drive offline
sd0(umass0:0:0:0):  Check Condition on CDB: 0x00 00 00 00 00 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Medium Not Present

sd0: unable to open device, error = 19
sd1 at scsibus0 target 0 lun 1: <Generic, USB Storage-CFC, 0180> disk removable
sd1: fabricating a geometry
sd1: 3847 MB, 3847 cyl, 64 head, 32 sec, 512 bytes/sect x 7880545 sectors
sd1: fabricating a geometry
sd2 at scsibus0 target 0 lun 2: <Generic, USB Storage-MMC, 0180> disk removable
sd2: drive offline
sd2(umass0:0:0:2):  Check Condition on CDB: 0x00 40 00 00 00 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Medium Not Present

sd2: unable to open device, error = 19
sd3 at scsibus0 target 0 lun 3: <Generic, USB Storage-MSC, 0180> disk removable
sd3: drive offline
sd3(umass0:0:0:3):  Check Condition on CDB: 0x00 60 00 00 00 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Medium Not Present

sd3: unable to open device, error = 19

It is not related to the USB device because it happend with an
Onto IDE hard disk enclosure the last time.

>How-To-Repeat:
Connect a USB mass storage to a running system. If you are unlucky it will
lock up.

>Fix:
Not known.



Home | Main Index | Thread Index | Old Index