Bug 24722

Summary: Disconnecting my USB mouse hangs the machine and issues kernel warning
Product: Drivers Reporter: Heinz Diehl (htd)
Component: USBAssignee: Greg Kroah-Hartman (greg)
Severity: normal CC: florian, htd, maciej.rutecki, rjw, stern
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.37-rc5-git3 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 16444    
Attachments: Kernel warning from /var/log/warn

Description Heinz Diehl 2010-12-12 12:42:43 UTC
Created attachment 39932 [details]
Kernel warning from /var/log/warn

A simple disconnect of my USB mouse (Logitech M505) leads to a kernel warning in the logs and hangs my machine, have to use m-sysrq to reboot it. The warning is attached.
Comment 1 Rafael J. Wysocki 2010-12-14 22:24:20 UTC
What was the last known good kernel?
Comment 2 Rafael J. Wysocki 2010-12-19 14:48:12 UTC
*** Bug 22092 has been marked as a duplicate of this bug. ***
Comment 3 Alan Stern 2010-12-20 03:58:06 UTC
The warning message shows that the problematic Clear-Halt was issued by usbdev_do_ioctl(), meaning that it was generated by a user program.  Obviously it shouldn't cause the machine to hang (and incidentally, it's entirely possible that the warning is not directly connected with the hang).  Nevertheless the program is buggy -- it shouldn't try to reset an endpoint while using that endpoint.

The log shows the offending program was running under Python.  Do you have any idea what the program might be?

Also, can you enable CONFIG_USB_DEBUG and attach the dmesg log starting from the time the mouse is unplugged?
Comment 4 Florian Mickler 2011-03-29 21:27:20 UTC
Is this still a problem on 2.6.38.y?
Comment 5 Greg Kroah-Hartman 2012-02-22 21:53:51 UTC
All USB bugs should be sent to the linux-usb@vger.kernel.org mailing 
list, and not entered into bugzilla.  Please bring this issue up there,
if it is still a problem in the latest kernel release.