Bug 744154

Summary: khubd hungs
Product: Red Hat Enterprise Linux 6 Reporter: Jiri Koten <jkoten>
Component: kernelAssignee: Don Zickus <dzickus>
Status: CLOSED ERRATA QA Contact: WANG Chao <chaowang>
Severity: high Docs Contact:
Priority: high    
Version: 6.2CC: arozansk, bugproxy, czhang, djasa, dmalcolm, lzachar, qcai, rmarko, ruyang, sgruszka, syeghiay, tpelka
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-2.6.32-209.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 14:16:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 748554    
Attachments:
Description Flags
dmesg output none

Description Jiri Koten 2011-10-07 09:50:51 UTC
Description of problem:
I have usb mouse connected to docking station and when I undock the laptop (T500) and then dock again, the mouse is not working anymore and after a while I see traceback of khubd in dmesg output. 

Version-Release number of selected component (if applicable):
kernel-2.6.32-206.el6

How reproducible:
100%

Steps to Reproduce:
1. Have some usb device connected to docking station
2. Dock laptop and boot
3. undock and dock again
  
Actual results:
usb device stops working

Expected results:
usb device is reconnected

Additional info:
This is a regression between -204.el6 and -206.el6

Comment 1 Jiri Koten 2011-10-07 09:54:58 UTC
Created attachment 526851 [details]
dmesg output

[snip]


INFO: task khubd:31 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
khubd         D 0000000000000001     0    31      2 0x00000000
 ffff880138825ac0 0000000000000046 ffff880136d3d5e8 ffff88013bee16a0
 ffff880138825b50 0000000000000000 ffff88013499f5b4 ffffffff8100bbce
 ffff88013881f0b8 ffff880138825fd8 000000000000f508 ffff88013881f0b8
Call Trace:
 [<ffffffff8100bbce>] ? apic_timer_interrupt+0xe/0x20
 [<ffffffff814ed53e>] __mutex_lock_slowpath+0x13e/0x180
 [<ffffffff814ed3db>] mutex_lock+0x2b/0x50
 [<ffffffff8139ffc7>] usb_set_interface+0x67/0x340
 [<ffffffff81394da7>] ? hub_release+0x27/0x30
 [<ffffffff813a2c85>] usb_unbind_interface+0xe5/0x170
 [<ffffffff8134584f>] __device_release_driver+0x6f/0xe0
 [<ffffffff813459bd>] device_release_driver+0x2d/0x40
 [<ffffffff81344853>] bus_remove_device+0xa3/0x100
 [<ffffffff8134249d>] device_del+0x12d/0x1e0
 [<ffffffff8139eb75>] usb_disable_device+0x85/0x270
 [<ffffffff81396175>] ? usb_disconnect+0x195/0x220
 [<ffffffff813960d8>] usb_disconnect+0xf8/0x220
 [<ffffffff8139765c>] hub_thread+0x62c/0x1ae0
 [<ffffffff81090b50>] ? autoremove_wake_function+0x0/0x40
 [<ffffffff81397030>] ? hub_thread+0x0/0x1ae0
 [<ffffffff810907e6>] kthread+0x96/0xa0
 [<ffffffff8100c10a>] child_rip+0xa/0x20
 [<ffffffff81090750>] ? kthread+0x0/0xa0
 [<ffffffff8100c100>] ? child_rip+0x0/0x20

Comment 2 Jiri Koten 2011-10-07 09:57:12 UTC
lsusb output before undocking
# lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 04b3:4485 IBM Corp. Serial Converter
Bus 001 Device 004: ID 17ef:4807 Lenovo UVC Camera
Bus 004 Device 002: ID 0a5c:2145 Broadcom Corp. Bluetooth with Enhanced Data Rate II
Bus 001 Device 005: ID 046d:c043 Logitech, Inc. MX320/MX400 Laser Mouse

Comment 3 Jiri Koten 2011-10-07 10:13:09 UTC
> Additional info:
> This is a regression between -204.el6 and -206.el6
Sorry, bad version.
The regression is between beta-1.1 and snapshot1, i.e. kernel-2.6.32-202.el6 and 
kernel-2.6.32-206.el6

Comment 4 Don Zickus 2011-10-07 18:36:30 UTC
Looks like a deadlock from a group of patches I introduced to fix usb3 hubs.

I can reproduce the same problem quite easily on my laptop.  Let me see if upstream has the same problem, if not I'll dig for a patch that I missed.  Otherwise, I will need to get their advice on how to break the deadlock properly.

Cheers,
Don

Comment 6 RHEL Program Management 2011-10-07 20:10:55 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 9 Qian Cai 2011-10-11 08:08:43 UTC
*** Bug 744777 has been marked as a duplicate of this bug. ***

Comment 10 Aristeu Rozanski 2011-10-13 15:27:23 UTC
Patch(es) available on kernel-2.6.32-209.el6

Comment 12 Don Zickus 2011-10-14 20:10:25 UTC
*** Bug 745451 has been marked as a duplicate of this bug. ***

Comment 13 Don Zickus 2011-10-14 20:10:48 UTC
*** Bug 745784 has been marked as a duplicate of this bug. ***

Comment 14 Don Zickus 2011-10-14 20:11:27 UTC
*** Bug 746120 has been marked as a duplicate of this bug. ***

Comment 17 Don Zickus 2011-10-28 14:38:50 UTC
*** Bug 746957 has been marked as a duplicate of this bug. ***

Comment 18 errata-xmlrpc 2011-12-06 14:16:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1530.html