lsusb hangs forever

Bug #570049 reported by Seth Hikari on 2010-04-26
94
This bug affects 17 people
Affects Status Importance Assigned to Milestone
usbutils (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: usbutils

when I run lsusb it hangs there and does nothing at all, forever. When I hit ctr-c it does not kill it and I have to kill it by hand. I only have a basic keyboard and mouse plugged as well as stupid broadcom usb wirless that I am trying to get to work.

I tried running it with gdb to see if anything else happens, nope just says starting program than hangs.

lsusb runs with the same devices on a diferent computer (running X64 Lucid )

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: usbutils 0.86-2ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic i686
Architecture: i386
Date: Mon Apr 26 00:46:35 2010
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Release Candidate i386 (20100419.1)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: usbutils

Seth Hikari (sethhikari) wrote :
Dave Gilbert (ubuntu-treblig) wrote :

I suggest including:
  1) Output of lspci -v
  2) Output of dmesg
  3) The result of strace lsusb
  4) The output of find /sys/bus/usb

Hopefully some of those might show what's odd.

Dave

Marsupilani (sp2148421) wrote :

I have the same problem on several machines since debian sarge and also on every ubuntu-version i used. Sometimes lsusb works with no problem and then on the same machine it hangs without any output and I can only kill it from a other terminal via killall lsusb, after reboot of the machine everything works again. I found any log message until now.

John Doe (johndoe32102002) wrote :

I am running i386 Ubuntu 10.04 with this error. Neither lsusb nor ndiswrapper will run without freezing up and staying frozen. This also effects the ability to System -> Administration -> System Testing, as this will freeze and never continue. I tried to install a Compaq W200 card and this might have been a side-effect of this operation (https://help.ubuntu.com/community/WifiDocs/Device/CompaqW200). Also, the instructions to get the W200 failed for me.

Version: lsusb (usbutils) 0.86

Version: ndiswrapper utils version: '1.9', utils version needed by module: '1.9'
module details:
filename: /lib/modules/2.6.32-22-generic/kernel/ubuntu/ndiswrapper/ndiswrapper.ko
version: 1.55
vermagic: 2.6.32-22-generic SMP mod_unload modversions 586

lshw Information:
description: Notebook
    product: Evo N610c
    vendor: Compaq
    serial: XXXXXXXXXXX
    width: 32 bits
    capabilities: smbios-2.3 dmi-2.3
    configuration: administrator_password=disabled boot=normal chassis=notebook keyboard_password=disabled power-on_password=disabled uuid=XXXXXXXXXXXXXXXXXXXXXXXXXX

I am having the same problem of lsusb hanging, and disk utility shows no usb devices. (and my USB access is flaky, although my logitech wireless mx5500 works fine, most of the time).

Linux desktop 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:28:05 UTC 2010 x86_64 GNU/Linux

I have attached an archive containing the result of the info suggested.

dmesg, lspci -v, strace lsusb

Changed in usbutils (Ubuntu):
status: New → Confirmed
Dave Gilbert (ubuntu-treblig) wrote :

Hi James,
  Your strace is interesting, the very bottom of it is :

open("/dev/bus/usb/002/002", O_RDWR) = -1 EACCES (Permission denied)
open("/dev/bus/usb/002/002", O_RDONLY) = -1 ENODEV (No such device)
open("/dev/bus/usb/002/001", O_RDWR) = -1 EACCES (Permission denied)
open("/dev/bus/usb/002/001", O_RDONLY) = 4
ioctl(4, USBDEVFS_CONNECTINFO, 0x7ffff00b5610) = -1 EPERM (Operation not permitted)
read(4,

So, it doesn't like something about /dev/bus/usb/002/001 - but we don't know what that is.

So, can you repeat the strace, then look at the bottom few lines for the last name past to open( - if it's /dev/bus/usb/002/001 again
can you then include the output from:

udevadm info --query=all --name=/dev/bus/usb/002/001

which should hopefully tell us what it is and which driver it is using.

Dave

asl.marc (asl-marc) wrote :

Hi,
I saw this lsusb hang twice yesterday on 10.04.1 LTS (Lucid - i386) when reconnecting a Philips SA018 MP3 player (A WD external HDD was also connected to the USB 2.0 controller), so I recovered the traces requested by Dave, which I hope can be helpful (attached).

The end of the strace looks like this, and the /dev/bus/usb/001/001 corresponds to the USB 2.0 controller itself, not the devices:

open("/dev/bus/usb/001", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 5 entries */, 32768) = 80
open("/dev/bus/usb/001/007", O_RDWR) = 4
ioctl(4, USBDEVFS_CONNECTINFO, 0xbf80d128) = 0
read(4, "\22\1\0\2\0\0\0@X\20\20\t\6\1\1\2\3\1", 18) = 18
read(4, "\t\2 \0\1\1\0\300", 8) = 8
read(4, "\1\t\4\0\0\2\10\6P\0\7\5\201\2\0\2\0\7\5\2\2\0\2\0", 24) = 24
close(4) = 0
open("/dev/bus/usb/001/006", O_RDWR) = -1 ENODEV (No such device)
open("/dev/bus/usb/001/006", O_RDONLY) = -1 ENODEV (No such device)
open("/dev/bus/usb/001/001", O_RDWR) = 4
ioctl(4, USBDEVFS_CONNECTINFO
<HANG>

The 'lsusb' process is left in the D+ state and a reboot is required to clear:
root 2004 0.0 0.0 1992 660 pts/0 S+ 01:14 0:00 strace lsusb
root 2005 0.0 0.1 2476 1136 pts/0 D+ 01:14 0:00 lsusb

dmesg shows a USB disconnect, followed by the hung task timeout + Call Trace:
[ 1221.678187] usb 1-6: USB disconnect, address 6
[ 1440.200059] INFO: task khubd:22 blocked for more than 120 seconds.

Earlier the same device gets bounced after the 1st disconnect:
[ 825.352643] usb 1-6: USB disconnect, address 5
[ 825.652071] scsi 6:0:0:0: rejecting I/O to dead device
[ 825.652092] ready
[ 825.652107] scsi 6:0:0:0: rejecting I/O to dead device

Hopefully tells us more about this problem.

Marc

HappyCamper (colin-conway) wrote :

'lsusb' hangs on my Ubuntu Server 10.04 install when I have my Belkin usb wifi dongle plugged in. It uses a Broadcom chip. If I pull it out while lsusb is hung it gives a load of error lines about 'Vendor request 0x07 failedfor offse with error -71' (and few other errors), then outputs the lsusb results (minus the broadcom dongle of course).

I hope that helps solve this.

HappyCamper (colin-conway) wrote :

I forgot to mention, that the same dongle works perfectly on my 10.04 desktop installed on my laptop, and 10.10 on my main PC.

I just plug it in, it shows up in Network Manager, and will just connect to my network (even using WPA).

Dave Gilbert (ubuntu-treblig) wrote :

Hi HappyCamper,
  Can I just clarify what you are saying. On the server 10.04, lsusb hangs with the belkin wifi in - but does the wifi work?

Dave

JohnnyLeitrim (johnnyleitrim) wrote :

This is happening to me also. I recently got a Netgear wireless USB adapter (WNDA3100 v2). Each time I connect it, running lsusb hangs my machine and only a reboot can stop it hanging. lsusb runs fine when this adapter is not attached.

I'm running 10.04 64bit: 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8 18:25:51 UTC 2011 x86_64 GNU/Linux

JohnnyLeitrim (johnnyleitrim) wrote :

Oops! Mistake in my last comment - my machine does not hang - only lsusb hangs. It's the first time I've come across a hanging program that doesn't die with 'kill -9' and needs a reboot.

Dave Gilbert (ubuntu-treblig) wrote :

Hi Johnny,
  OK can you collect some information for us:

    1) Run sudo strace lsusb
       and paste the last 20 or so lines in here.

and then without unplugging any USB
    2) Run sudo udevadm info --export-db > /tmp/udev-db
      and attach /tmp/udev-db to this bug.

    3) Include the output of dmesg

hopefully that will show the lsusb hang corresponging to the wireless adapter.

Dave

JohnnyLeitrim (johnnyleitrim) wrote :

Hi Dave,

I've attached the output you've asked for in the file johnnyleitrim-Bug570049.tgz

I hope this helps!
Johnny.

Dave Gilbert (ubuntu-treblig) wrote :
Download full text (8.6 KiB)

OK, so I think your case may be different from some of the others that have attached dmesg;
yours shows an oops in ndiswrapper driver wrapper that loads windows wireless drivers; can you open
a separate bug against the 'linux' package with a title something like
'oops in ndiswrapper on lsusb' and include the same tar of debug stuff and a copy of this comment.
I don't know your particular hardware, but if there is an open driver that doesn't need ndiswrapper it's worth trying it.

 the strace in your case finishes with:

472 open("/dev/bus/usb/002/003", O_RDWR) = 3
472 ioctl(3, USBDEVFS_IOCTL, 0x7fff6971adb0) = -1 ENOTTY (Inappropriate ioctl for device)
472 close(3) = 0
472 open("/dev/bus/usb/002/001", O_RDWR) = 3
472 ioctl(3, USBDEVFS_IOCTL, 0x7fff6971adb0) = 7
472 close(3) = 0
472 open("/dev/bus/usb/001", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
472 brk(0x2401000) = 0x2401000
472 getdents(3, /* 4 entries */, 32768) = 96
472 open("/dev/bus/usb/001/002", O_RDWR) = 4
472 ioctl(4, USBDEVFS_CONNECTINFO

and the udev-db shows bus/usb/001/002 as :
E: DEVNAME=/dev/bus/usb/001/002
E: DEVTYPE=usb_device
E: DRIVER=usb
E: PRODUCT=846/9011/1
E: TYPE=255/0/0
E: BUSNUM=001
E: DEVNUM=002
E: SUBSYSTEM=usb
E: ID_VENDOR=Broadcom
E: ID_VENDOR_ENC=Broadcom
E: ID_VENDOR_ID=0846
E: ID_MODEL=Remote_Download_Wireless_Adapter
E: ID_MODEL_ENC=Remote\x20Download\x20Wireless\x20Adapter
E: ID_MODEL_ID=9011
E: ID_REVISION=0001
E: ID_SERIAL=Broadcom_Remote_Download_Wireless_Adapter_0
E: ID_SERIAL_SHORT=0

ah, and your dmesg shows a nice nice ndiswrapper driver related oops for the wireless card:

[583427.469547] ndiswrapper version 1.55 loaded (smp=yes, preempt=no)
[583427.651303] usb 1-2: reset high speed USB device using ehci_hcd and address 2
[583427.836622] ndiswrapper (link_pe_images:575): fixing KI_USER_SHARED_DATA address in the driver
[583427.838390] ndiswrapper: driver bcmwlhigh5 (Netgear,05/05/2009, 5.10.79.30) loaded
[583427.841069] BUG: unable to handle kernel paging request at 00000000ffffffd0
[583427.841078] IP: [<ffffffffa0538ae9>] USBD_InterfaceIsDeviceHighSpeed+0x9/0x20 [ndiswrapper]
[583427.841120] PGD 18366d067 PUD 0
[583427.841126] Oops: 0000 [#1] SMP
[583427.841131] last sysfs file: /sys/devices/virtual/net/vboxnet0/statistics/collisions
[583427.841136] CPU 0
[583427.841145] Modules linked in: ndiswrapper(+) nls_iso8859_1 nls_cp437 vfat fat lrw gf128mul dm_crypt cryptd aes_x86_64 aes_generic binfmt_misc ppdev vboxnetadp vboxnetflt vboxdrv snd_hda_codec_intelhdmi snd_hda_codec_realtek fbcon tileblit font bitblit softcursor vga16fb vgastate arc4 snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss i915 snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq b43 snd_timer snd_seq_device mac80211 snd drm_kms_helper cfg80211 asus_atk0110 led_class soundcore snd_page_alloc drm i2c_algo_bit lp intel_agp video output parport usbhid ohci1394 hid usb_storage floppy ieee1394 ssb pata_marvell ahci r8169 mii
[583427.841196] Pid: 443, comm: modprobe Tainted: P 2.6.32-31-generic #61-Ubuntu System Product Name
[583427...

Read more...

JohnnyLeitrim (johnnyleitrim) wrote :

Hi Dave,

You're right about ndiswrapper. I uninstalled it, rebooted and ran lsusb with no trouble (it also recognized my Netgear USB device). I don't like using ndiswrapper, so I looked for a different solution for my adapter, but unfortunately none of the open source drivers seem to work. I'll log a bug against ndis as suggested.

Thanks,
Johnny.

Michael Collard (mcollard) wrote :

I think this bug can occur with more than one device.

I experienced the same with a LG Cellphone. I was doing adb/eclipse programming at the time.

E: ID_VENDOR=LG_Electronics_Inc.
E: ID_VENDOR_ENC=LG\x20Electronics\x20Inc.
E: ID_VENDOR_ID=1004
E: ID_MODEL=LG_Android_USB_Device
E: ID_MODEL_ENC=LG\x20Android\x20USB\x20Device
E: ID_MODEL_ID=618e
E: ID_REVISION=0226
E: ID_SERIAL=LG_Electronics_Inc._LG_Android_USB_Device_

Michael Collard (mcollard) wrote :

Including dmesg and the udev-db.

geburah (geburah-fwbz) wrote :

See attachment with output. Ubuntu 11.04
2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:02:55 UTC 2011 x86_64

I noticed it when trying to mount an IDE disk using a IDE to USB. I disconnected everything (apart from keyboard and mouse) but I see that it is still doing it.

description: updated
Fabio Fumi (ffumi68) wrote :

Hi,

I've been experiencing the same issue on my Ubuntu 11.04 or 12.04 installations. Usb devices suddenly stops working after I plug/unplug some of them. I have a USB-Serial converte and an external SD-card reader and both seem to trigger the problem Only "workaround" is to reboot the system (which is not a solution, obviously). As it looks like from dmesg, the crash of khubd is at the root of the problem, and being a kernel thread can't be "restarted" other than rebooting....

Looks like a common problem, across different distributions...

 thanks
 Fabio

Dave Gilbert (ubuntu-treblig) wrote :

Fabio: It's probably better to file a separate kernel bug for your case; your dmesg is showing a lot of unhappy USB/scsi errors.

Dave

Fabio Fumi (ffumi68) wrote :
Download full text (4.0 KiB)

Hi Dave,

what made me file my logs here is that both the symptom (lsusb hanging) and what looks like the underlying cause are both the same. A crash of khubd kernel thread is always there, with a similar stack trace in every case, triggered by the same pattern: usb_stor_disconnect -> usb_stor_disconnect -> kthread_stop -> ...

E.g. this is from a post above:

[ 1680.200076] khubd D 000164da 0 22 2 0x00000000
[ 1680.200086] f710bd34 00000046 e68a0000 000164da 00000000 c0848760 f7100f64 c0848760
[ 1680.200099] 7478828a 0000011c c0848760 c0848760 f7100f64 c0848760 c0848760 f2616000
[ 1680.200110] 00000000 0000011c f7100cc0 7fffffff 7fffffff e68a1fc8 f710bd94 c058c1ed
[ 1680.200121] Call Trace:
[ 1680.200138] [<c058c1ed>] schedule_timeout+0x1ad/0x280
[ 1680.200148] [<c014926b>] ? check_preempt_wakeup+0x20b/0x370
[ 1680.200157] [<c0132c0e>] ? enqueue_task+0x7e/0xa0
[ 1680.200165] [<c058bea6>] wait_for_common+0xa6/0x130
[ 1680.200174] [<c014248f>] ? try_to_wake_up+0x2ef/0x4a0
[ 1680.200182] [<c0142640>] ? default_wake_function+0x0/0x20
[ 1680.200200] [<c058bfe7>] wait_for_completion+0x17/0x20
[ 1680.200208] [<c016790f>] kthread_stop+0x3f/0xa0
[ 1680.200223] [<f809cf68>] release_everything+0x28/0xb0 [usb_storage]
[ 1680.200236] [<f809d00f>] usb_stor_disconnect+0x1f/0x30 [usb_storage]
[ 1680.200244] [<c044bd06>] usb_unbind_interface+0x46/0x130
[ 1680.200254] [<c03e7fa1>] __device_release_driver+0x51/0xb0
[ 1680.200260] [<c03e80c5>] device_release_driver+0x25/0x40
[ 1680.200269] [<c03e737b>] bus_remove_device+0x7b/0xa0
[ 1680.200277] [<c03e57f7>] device_del+0xf7/0x180
[ 1680.200283] [<c0448b13>] usb_disable_device+0x63/0x110
[ 1680.200292] [<c04435fe>] usb_disconnect+0x9e/0x120
[ 1680.200300] [<c0443b5b>] hub_port_connect_change+0x8b/0x890
[ 1680.200307] [<c0449785>] ? usb_control_msg+0xd5/0x130
[ 1680.200315] [<c0441590>] ? clear_port_feature+0x50/0x60
[ 1680.200323] [<c0444b05>] hub_events+0x1f5/0x510
[ 1680.200330] [<c0167cbf>] ? finish_wait+0x4f/0x70
[ 1680.200337] [<c0444e5a>] hub_thread+0x3a/0x140
[ 1680.200344] [<c0167b50>] ? autoremove_wake_function+0x0/0x50
[ 1680.200352] [<c0444e20>] ? hub_thread+0x0/0x140
[ 1680.200358] [<c01678c4>] kthread+0x74/0x80
[ 1680.200365] [<c0167850>] ? kthread+0x0/0x80
[ 1680.200373] [<c0104087>] kernel_thread_helper+0x7/0x10

while this is mine:

[42722.411019] Call Trace:
[42722.411030] [<ffffffff815c85dd>] schedule_timeout+0x26d/0x2e0
[42722.411038] [<ffffffff810576a3>] ? update_curr+0x103/0x210
[42722.411044] [<ffffffff815c8099>] wait_for_common+0xd9/0x180
[42722.411049] [<ffffffff8105f690>] ? default_wake_function+0x0/0x20
[42722.411056] [<ffffffff815c821d>] wait_for_completion+0x1d/0x20
[42722.411061] [<ffffffff810879e2>] kthread_stop+0x42/0xf0
[42722.411068] [<ffffffffa02375fe>] release_everything+0x2e/0xb0 [usb_storage]
[42722.411074] [<ffffffffa02384ca>] usb_stor_disconnect+0x2a/0x40 [usb_storage]
[42722.411081] [<ffffffff8144464a>] usb_unbind_interface+0x5a/0x1a0
[42722.411089] [<ffffffff813bb305>] __device_release_driver+0x75/0xe0
[42722.411093] [<ffffffff813bb39d>] device_release_driver+0x2d/0x40
[42722.411097] [<ffffffff813bae4b>] bus_r...

Read more...

Dave Gilbert (ubuntu-treblig) wrote :

Fabio: Hmm yes those do look the same, but we haven't got Seth (original reporter) logs for it so we don't know if it was the problem he hit; so please file a separate kernel bug for that, and add a comment here stating the bug number.
(I suspect most of the problems here are kernel bugs of one type or another - whether they're all the same bug is a different question).

Dave

Fabio Fumi (ffumi68) wrote :

Hi Dave, I've filed Bug #1072278 as you suggested.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers