Bug 171220
Summary: | USB: khubd deadlock on error path | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Kimball Murray <kimball.murray> | ||||||
Component: | kernel | Assignee: | Pete Zaitcev <zaitcev> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> | ||||||
Severity: | high | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 4.0 | CC: | jbaron | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | RHSA-2006-0132 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2006-03-07 20:31:15 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 168429 | ||||||||
Attachments: |
|
Description
Kimball Murray
2005-10-19 15:37:08 UTC
Created attachment 120381 [details]
Patch for kernel 2.6.9-22
Test kernel is available at: ftp://people.redhat.com/zaitcev/171220/ Created attachment 120436 [details]
Candidate #2 - Same as before, only changed comments
The test wizards at Stratus have been able to reproduce this bug on a standard PC running the RHEL4-U2 GA distro. They used an older HP Vectra PC and connected two USB hubs in series to it. The hubs had external power supplies, and could also run from the PC power through the USB port. A USB storage stick was attached to the first hub, and a keyboard and mouse were connected behind the second hub (the mouse was actually connected to the keyboard, so in effect, it was actually behind a 3rd hub). At some point, while data was being dumped to the memory stick using 'dd', the power supplies were removed so that the hubs ran off the PC power. Everything was still working at this point. Then the keyboard was pulled from the second hub, and plugged back in. The connection event never registered, because khubd was stuck in usb_disconnect, deadlocked on a semaphore as described in this bug. The test crew tried rmmod uhci-hcd, but rmmod got wedged on the same semaphore (again in usb_disconnect). Of course, we expect rmmod to hang if khubd is stuck in usb_disconnect. The machine had to be rebooted to clear this condition. It took about 30 or so tries of various plug/unplug operations before hitting this deadlock. It is likely possible to do this with different operations, but since it's a little racy, it's hard to pinpoint an exact formula for causing the bug. Here are the back traces from crash for both khubd, and the rmmod processes that were stuck: crash> bt 6 PID: 6 TASK: c13c9790 CPU: 0 COMMAND: "khubd" #0 [cfe8fef4] schedule at c030d814 #1 [cfe8ff70] .text.lock.hub (via usb_disconnect) at c0287ebf #2 [cfe8ff84] hub_events at c028765b #3 [cfe8fff0] kernel_thread_helper at c01041d7 crash> bt 28436 PID: 28436 TASK: c0c77830 CPU: 0 COMMAND: "rmmod" #0 [cf30be70] schedule at c030d814 #1 [cf30beec] .text.lock.hub (via usb_disconnect) at c0287ebf #2 [cf30bf00] usb_disconnect at c0285f61 #3 [cf30bf14] usb_hcd_pci_remove at c028d4d8 #4 [cf30bf24] pci_device_remove at c01ec1d9 #5 [cf30bf2c] device_release_driver at c024a399 #6 [cf30bf38] driver_detach at c024a3b8 #7 [cf30bf44] bus_remove_driver at c024a748 #8 [cf30bf54] driver_unregister at c024ab0e #9 [cf30bf60] pci_unregister_driver at c01ec393 #10 [cf30bf68] cleanup_module at d09ec588 #11 [cf30bf6c] sys_delete_module at c013b6ff #12 [cf30bfc0] system_call at c030f918 EAX: 00000081 EBX: bff7a840 ECX: 00000880 EDX: bff7a8a0 DS: 007b ESI: bff7a840 ES: 007b EDI: 00000000 SS: 007b ESP: bff7a814 EBP: bff7d0f8 CS: 0073 EIP: 001847a2 ERR: 00000081 EFLAGS: 00000246 An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2006-0132.html |