Actions
Bug #611
openPanic after reconnecting USB keyboard
Status:
New
Priority:
Low
Assignee:
-
Category:
kernel
Start date:
2011-01-08
Due date:
% Done:
0%
Estimated time:
Difficulty:
Tags:
Gerrit CR:
External Bug:
Description
An oi_148 reports a panic after reconnecting a USB keyboard that had been disconnected for some time.::msgbuf
and $C
:
/pci@0,0/pci103c,1609@12/device@5/keyboard@0 (hid2) offline /pci@0,0/pci103c,1609@12/device@5/mouse@1 (hid3) offline /pci@0,0/pci103c,1609@12/device@5/keyboard@0 (hid2) offline /pci@0,0/pci103c,1609@12/device@5/mouse@1 (hid3) offline /pci@0,0/pci103c,1609@12/device@5 (usb_mid1) removed pcplusmp: ide (ata) instance 1 irq 0xf vector 0x42 ioapic 0x2 intin 0xf is bound to cpu 0 USB 2.0 device (usb46a,8) operating at low speed (USB 1.x) on USB 1.10 root hub: device@5, usb_mid1 at bus address 2 Cherry GmbH Slim Line Trackball Keyboard usb_mid1 is /pci@0,0/pci103c,1609@12/device@5 /pci@0,0/pci103c,1609@12/device@5 (usb_mid1) online USB 2.0 interface (usbif46a,8.config1.0) operating at low speed (USB 1.x) on USB 1.10 root hub: keyboard@0, hid2 at bus address 2 Cherry GmbH Slim Line Trackball Keyboard hid2 is /pci@0,0/pci103c,1609@12/device@5/keyboard@0 /pci@0,0/pci103c,1609@12/device@5/keyboard@0 (hid2) online USB 2.0 interface (usbif46a,8.config1.1) operating at low speed (USB 1.x) on USB 1.10 root hub: mouse@1, hid3 at bus address 2 Cherry GmbH Slim Line Trackball Keyboard hid3 is /pci@0,0/pci103c,1609@12/device@5/mouse@1 /pci@0,0/pci103c,1609@12/device@5/mouse@1 (hid3) online panic[cpu0]/thread=ffffff0001ecbc40: BAD TRAP: type=e (#pf Page fault) rp=ffffff0001ecb9d0 addr=88 occurred in module "genunix" due to a NULL pointer dereference sched: #pf Page fault Bad kernel fault at addr=0x88 pid=0, pc=0xfffffffffb9ee131, sp=0xffffff0001ecbac0, eflags=0x10246 cr0: 80050033<pg,wp,ne,et,mp,pe> cr4: 6f8<xmme,fxsr,pge,mce,pae,pse,de> cr2: 88 cr3: 3cbe000 cr8: c rdi: ffffff00ca6fe860 rsi: 7fffffff rdx: ffffff0001ecbc40 rcx: 0 r8: 0 r9: ffffff0001ecb8d0 rax: 0 rbx: 80 rbp: ffffff0001ecbaf0 r10: a30 r11: ffffff0001ecb820 r12: ffffff00ca6fbd48 r13: ffffff00ca6fe7b0 r14: ffffff00c3bad3c0 r15: ffffff00ca6fe860 fsb: 0 gsb: fffffffffbc304a0 ds: 4b es: 4b fs: 0 gs: 1c3 trp: e err: 0 rip: fffffffffb9ee131 cs: 30 rfl: 10246 rsp: ffffff0001ecbac0 ss: 38 ffffff0001ecb8b0 unix:die+dd () ffffff0001ecb9c0 unix:trap+1799 () ffffff0001ecb9d0 unix:cmntrap+e6 () ffffff0001ecbaf0 genunix:canputnext+69 () ffffff0001ecbb30 hid:hid_interrupt_pipe_callback+5d () ffffff0001ecbb70 usba:usba_req_normal_cb+155 () ffffff0001ecbbb0 usba:hcdi_soft_intr+51 () ffffff0001ecbbf0 unix:av_dispatch_softvect+5f () ffffff0001ecbc20 unix:dispatch_softint+34 () ffffff000220a640 unix:switch_sp_and_call+13 () ffffff000220a670 unix:dosoftint+59 () ffffff000220a6c0 unix:do_interrupt+114 () ffffff000220a6d0 unix:cmnint+ba () ffffff000220a800 genunix:insertq+7b () ffffff000220a820 genunix:qprocson+41 () ffffff000220a890 hid:hid_open+15f () ffffff000220a930 genunix:qattach+15e () ffffff000220aa20 genunix:stropen+488 () ffffff000220aad0 specfs:spec_open+1b3 () ffffff000220ab40 genunix:fop_open+bf () ffffff000220acf0 genunix:vn_openat+6ce () ffffff000220ae60 genunix:copen+49e () ffffff000220ae90 genunix:openat32+27 () ffffff000220aec0 genunix:open32+2e () ffffff000220af10 unix:brand_sys_syscall32+17a () syncing file systems... done dumping to /dev/zvol/dsk/rpool/dump, offset 65536, content: kernel NOTICE: ahci0: ahci_tran_reset_dport port 2 reset port ffffff0001ecbaf0 canputnext+0x69(ffffff00ca6fbd48) ffffff0001ecbb30 hid_interrupt_pipe_callback+0x5d(ffffff00ca1c0e60, ffffff00c4c36f00) ffffff0001ecbb70 usba_req_normal_cb+0x155(ffffff00c4c36e70) ffffff0001ecbbb0 hcdi_soft_intr+0x51(ffffff00c2c59b70, 0) ffffff0001ecbbf0 av_dispatch_softvect+0x5f(9) ffffff0001ecbc20 dispatch_softint+0x34(0, 0) ffffff000220a640 switch_sp_and_call+0x13() ffffff000220a670 dosoftint+0x59(ffffff000220a6d0) ffffff000220a6c0 do_interrupt+0x114(ffffff000220a6d0, ffffff00ca6fbd48) ffffff000220a6d0 _interrupt+0xba() ffffff000220a800 insertq+0x7b(ffffff00ca6fe7b0, ffffff00ca6fbd48) ffffff000220a820 qprocson+0x41(ffffff00ca6fbd48) ffffff000220a890 hid_open+0x15f(ffffff00ca6fbd48, ffffff000220aa78, 81, 0, ffffff00c6afb3b8) ffffff000220a930 qattach+0x15e(ffffff00ca714070, ffffff000220aa78, 81, ffffff00c6afb3b8, 0, 0) ffffff000220aa20 stropen+0x488(ffffff00ca70e100, ffffff000220aa78, 81, ffffff00c6afb3b8) ffffff000220aad0 spec_open+0x1b3(ffffff000220abc0, 81, ffffff00c6afb3b8, 0) ffffff000220ab40 fop_open+0xbf(ffffff000220abc0, 81, ffffff00c6afb3b8, 0) ffffff000220acf0 vn_openat+0x6ce(8047cbb, 0, 81, ab0, ffffff000220ad48, 0, 12, 0 , 4) ffffff000220ae60 copen+0x49e(ffd19553, 8047cbb, 81, 8047ab0) ffffff000220ae90 openat32+0x27(ffd19553, 8047cbb, 80, 8047ab0) ffffff000220aec0 open32+0x2e(8047cbb, 80, 8047ab0) ffffff000220af10 sys_syscall32+0xff()
::prtusb -v
:
INDEX DRIVER INST NODE VID.PID PRODUCT 1 ehci 0 pci103c,1609 0000.0000 No Product String Device Descriptor { bLength = 0x12 bDescriptorType = 0x1 bcdUSB = 0x200 bDeviceClass = 0x9 bDeviceSubClass = 0 bDeviceProtocol = 0x1 bMaxPacketSize0 = 0x40 idVendor = 0 idProduct = 0 bcdDevice = 0 iManufacturer = 0 iProduct = 0 iSerialNumber = 0 bNumConfigurations = 0x1 } -- Active Config Index 0 Configuration Descriptor { bLength = 0x9 bDescriptorType = 0x2 wTotalLength = 0x19 bNumInterfaces = 0x1 bConfigurationValue = 0x1 iConfiguration = 0x0 bmAttributes = 0x40 bMaxPower = 0x0 } Interface Descriptor { bLength = 0x9 bDescriptorType = 0x4 bInterfaceNumber = 0x0 bAlternateSetting = 0x0 bNumEndpoints = 0x1 bInterfaceClass = 0x9 bInterfaceSubClass = 0x1 bInterfaceProtocol = 0x0 iInterface = 0x0 } Endpoint Descriptor { bLength = 0x7 bDescriptorType = 0x5 bEndpointAddress = 0x81 bmAttributes = 0x3 wMaxPacketSize = 0x1 bInterval = 0xff } 2 ehci 1 pci103c,1609 0000.0000 No Product String Device Descriptor { bLength = 0x12 bDescriptorType = 0x1 bcdUSB = 0x200 bDeviceClass = 0x9 bDeviceSubClass = 0 bDeviceProtocol = 0x1 bMaxPacketSize0 = 0x40 idVendor = 0 idProduct = 0 bcdDevice = 0 iManufacturer = 0 iProduct = 0 iSerialNumber = 0 bNumConfigurations = 0x1 } -- Active Config Index 0 Configuration Descriptor { bLength = 0x9 bDescriptorType = 0x2 wTotalLength = 0x19 bNumInterfaces = 0x1 bConfigurationValue = 0x1 iConfiguration = 0x0 bmAttributes = 0x40 bMaxPower = 0x0 } Interface Descriptor { bLength = 0x9 bDescriptorType = 0x4 bInterfaceNumber = 0x0 bAlternateSetting = 0x0 bNumEndpoints = 0x1 bInterfaceClass = 0x9 bInterfaceSubClass = 0x1 bInterfaceProtocol = 0x0 iInterface = 0x0 } Endpoint Descriptor { bLength = 0x7 bDescriptorType = 0x5 bEndpointAddress = 0x81 bmAttributes = 0x3 wMaxPacketSize = 0x1 bInterval = 0xff } 3 ehci 2 pci103c,1609 0000.0000 No Product String Device Descriptor { bLength = 0x12 bDescriptorType = 0x1 bcdUSB = 0x200 bDeviceClass = 0x9 bDeviceSubClass = 0 bDeviceProtocol = 0x1 bMaxPacketSize0 = 0x40 idVendor = 0 idProduct = 0 bcdDevice = 0 iManufacturer = 0 iProduct = 0 iSerialNumber = 0 bNumConfigurations = 0x1 } -- Active Config Index 0 Configuration Descriptor { bLength = 0x9 bDescriptorType = 0x2 wTotalLength = 0x19 bNumInterfaces = 0x1 bConfigurationValue = 0x1 iConfiguration = 0x0 bmAttributes = 0x40 bMaxPower = 0x0 } Interface Descriptor { bLength = 0x9 bDescriptorType = 0x4 bInterfaceNumber = 0x0 bAlternateSetting = 0x0 bNumEndpoints = 0x1 bInterfaceClass = 0x9 bInterfaceSubClass = 0x1 bInterfaceProtocol = 0x0 iInterface = 0x0 } Endpoint Descriptor { bLength = 0x7 bDescriptorType = 0x5 bEndpointAddress = 0x81 bmAttributes = 0x3 wMaxPacketSize = 0x1 bInterval = 0xff } 4 ohci 0 pci103c,1609 0000.0000 No Product String Device Descriptor { bLength = 0x12 bDescriptorType = 0x1 bcdUSB = 0x110 bDeviceClass = 0x9 bDeviceSubClass = 0 bDeviceProtocol = 0 bMaxPacketSize0 = 0x8 idVendor = 0 idProduct = 0 bcdDevice = 0 iManufacturer = 0 iProduct = 0 iSerialNumber = 0 bNumConfigurations = 0x1 } -- Active Config Index 0 Configuration Descriptor { bLength = 0x9 bDescriptorType = 0x2 wTotalLength = 0x19 bNumInterfaces = 0x1 bConfigurationValue = 0x1 iConfiguration = 0x0 bmAttributes = 0x40 bMaxPower = 0x0 } Interface Descriptor { bLength = 0x9 bDescriptorType = 0x4 bInterfaceNumber = 0x0 bAlternateSetting = 0x0 bNumEndpoints = 0x1 bInterfaceClass = 0x9 bInterfaceSubClass = 0x1 bInterfaceProtocol = 0x0 iInterface = 0x0 } Endpoint Descriptor { bLength = 0x7 bDescriptorType = 0x5 bEndpointAddress = 0x81 bmAttributes = 0x3 wMaxPacketSize = 0x1 bInterval = 0xff } 5 ohci 1 pci103c,1609 0000.0000 No Product String Device Descriptor { bLength = 0x12 bDescriptorType = 0x1 bcdUSB = 0x110 bDeviceClass = 0x9 bDeviceSubClass = 0 bDeviceProtocol = 0 bMaxPacketSize0 = 0x8 idVendor = 0 idProduct = 0 bcdDevice = 0 iManufacturer = 0 iProduct = 0 iSerialNumber = 0 bNumConfigurations = 0x1 } -- Active Config Index 0 Configuration Descriptor { bLength = 0x9 bDescriptorType = 0x2 wTotalLength = 0x19 bNumInterfaces = 0x1 bConfigurationValue = 0x1 iConfiguration = 0x0 bmAttributes = 0x40 bMaxPower = 0x0 } Interface Descriptor { bLength = 0x9 bDescriptorType = 0x4 bInterfaceNumber = 0x0 bAlternateSetting = 0x0 bNumEndpoints = 0x1 bInterfaceClass = 0x9 bInterfaceSubClass = 0x1 bInterfaceProtocol = 0x0 iInterface = 0x0 } Endpoint Descriptor { bLength = 0x7 bDescriptorType = 0x5 bEndpointAddress = 0x81 bmAttributes = 0x3 wMaxPacketSize = 0x1 bInterval = 0xff } 6 ohci 2 pci103c,1609 0000.0000 No Product String Device Descriptor { bLength = 0x12 bDescriptorType = 0x1 bcdUSB = 0x110 bDeviceClass = 0x9 bDeviceSubClass = 0 bDeviceProtocol = 0 bMaxPacketSize0 = 0x8 idVendor = 0 idProduct = 0 bcdDevice = 0 iManufacturer = 0 iProduct = 0 iSerialNumber = 0 bNumConfigurations = 0x1 } -- Active Config Index 0 Configuration Descriptor { bLength = 0x9 bDescriptorType = 0x2 wTotalLength = 0x19 bNumInterfaces = 0x1 bConfigurationValue = 0x1 iConfiguration = 0x0 bmAttributes = 0x40 bMaxPower = 0x0 } Interface Descriptor { bLength = 0x9 bDescriptorType = 0x4 bInterfaceNumber = 0x0 bAlternateSetting = 0x0 bNumEndpoints = 0x1 bInterfaceClass = 0x9 bInterfaceSubClass = 0x1 bInterfaceProtocol = 0x0 iInterface = 0x0 } Endpoint Descriptor { bLength = 0x7 bDescriptorType = 0x5 bEndpointAddress = 0x81 bmAttributes = 0x3 wMaxPacketSize = 0x1 bInterval = 0xff } 7 usb_mid 1 device 046a.0008 Cherry Slim Line Trackball Keyboard Device Descriptor { bLength = 0x12 bDescriptorType = 0x1 bcdUSB = 0x200 bDeviceClass = 0 bDeviceSubClass = 0 bDeviceProtocol = 0 bMaxPacketSize0 = 0x8 idVendor = 0x46a idProduct = 0x8 bcdDevice = 0x100 iManufacturer = 0x1 iProduct = 0x2 iSerialNumber = 0 bNumConfigurations = 0x1 } -- Active Config Index 0 Configuration Descriptor { bLength = 0x9 bDescriptorType = 0x2 wTotalLength = 0x3b bNumInterfaces = 0x2 bConfigurationValue = 0x1 iConfiguration = 0x0 bmAttributes = 0xa0 bMaxPower = 0x32 } Interface Descriptor { bLength = 0x9 bDescriptorType = 0x4 bInterfaceNumber = 0x0 bAlternateSetting = 0x0 bNumEndpoints = 0x1 bInterfaceClass = 0x3 bInterfaceSubClass = 0x1 bInterfaceProtocol = 0x1 iInterface = 0x0 } HID Descriptor { bLength = 0x9 bDescriptorType = 0x21 bcdHID = 0x100 bCountryCode = 0x0 bNumDescriptors = 0x1 bReportDescriptorType = 0x22 wReportDescriptorLength = 0x3f } Endpoint Descriptor { bLength = 0x7 bDescriptorType = 0x5 bEndpointAddress = 0x81 bmAttributes = 0x3 wMaxPacketSize = 0x8 bInterval = 0xc } Interface Descriptor { bLength = 0x9 bDescriptorType = 0x4 bInterfaceNumber = 0x1 bAlternateSetting = 0x0 bNumEndpoints = 0x1 bInterfaceClass = 0x3 bInterfaceSubClass = 0x1 bInterfaceProtocol = 0x2 iInterface = 0x0 } HID Descriptor { bLength = 0x9 bDescriptorType = 0x21 bcdHID = 0x100 bCountryCode = 0x0 bNumDescriptors = 0x1 bReportDescriptorType = 0x22 wReportDescriptorLength = 0x32 } Endpoint Descriptor { bLength = 0x7 bDescriptorType = 0x5 bEndpointAddress = 0x82 bmAttributes = 0x3 wMaxPacketSize = 0x8 bInterval = 0xc }
This issue is not easily reproducible.
Updated by Garrett D'Amore over 12 years ago
Ugh... I can't tell how much I hate that USB is based on STREAMs.
I can't tell from your panic, but my first guess is that there is a stale stream pointer left around.
If you get to a reproducible test case, save me a crash dump and I'll take a look.
Actions