[Bug 403346] New: libusb and/or kernel cause complete hang
https://bugzilla.novell.com/show_bug.cgi?id=403346 Summary: libusb and/or kernel cause complete hang Product: openSUSE 11.0 Version: Final Platform: i686 OS/Version: openSUSE 11.0 Status: NEW Severity: Major Priority: P5 - None Component: Kernel AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: stefan.neis@kobil.com QAContact: qa@suse.de Found By: --- We have some hardware which is mostly treated as USB-attached CDRom-drive, however for some special purposes we need to _not_ access it via the usb_storage driver, but rather via libusb. So we call usb_detach_kernel_driver_np to get access to the device. This works nicely with all SuSE-10.x versions (and also some current Ubuntu versions). However, testing it on openSuSE 11.0 results in a complete hang, the system never returns from the call to usb_detach_kernel_driver_np (or at least not within a reasonable amount of time). The system is completely unresponsive at that time, it doesn't react to keyboard or mouse input, and doesn't react to network traffic either (not even a reply to a ping). Searching for possibly related stuff I found e.g. http://www.mail-archive.com/debian-bugs-closed@lists.debian.org/msg187645.ht... and applied the patch given there to the libusb source-rpm, compiled, and installed the modified version. This somewhat improved the situation, now usb_detach_kernel_driver_np succeeds, and the software proceeds to a first call to usb_interrupt_read, which however still results in the same kind of hang. :-( ATM, my only idea is that somewhere in the USB part of the kernel, an endless loop might be hidden that's similar to the one fixed by that debian-bug mentioned above for libusb. Thanks for any ideas/suggestions on what to do here... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=403346
Cyril Hrubis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c1
--- Comment #1 from Stefan Neis
ioctl(3, USBDEVFS_SUBMITURB, 0xbf8566d4) = 0 ioctl(3, USBDEVFS_REAPURBNDELAY, 0xbf856718) = -1 EAGAIN (Resource temporarily unavailable) select(4, NULL, [3], NULL, {0, 1000}) = 0 (Timeout) write(1, "test\n", 5test) = 5 gettimeofday({1214911004, 481477}, NULL) = 0 ioctl(3, USBDEVFS_REAPURBNDELAY, 0xbf856718) = -1 EAGAIN (Resource temporarily unavailable) select(4, NULL, [3], NULL, {0, 1000}) = 0 (Timeout) write(1, "test\n", 5test) = 5 gettimeofday({1214911004, 485465}, NULL) = 0 ioctl(3, USBDEVFS_REAPURBNDELAY, 0xbf856718) = -1 EAGAIN (Resource temporarily unavailable) select(4, NULL, [3], NULL, {0, 1000}
i.e. it's hanging in a select call, which Alan commented like this:
It's clear now that the problem exists in the kernel, not in your program on in libusb. To make any more progress you will have to patch the kernel source. The function you want to investigate first is usbdev_poll() in drivers/usb/core/devio.c.
We didn't start that yet, however, we tried a different kernel version and found that we have the same problem with 2.6.25.9 from kernel.org, so it seems (IMHO) to be a regression introduced in 2.6.25 (since a test on an Ubuntu with 2.6.24.whatever showed no problem) and not yet fixed in the current version. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=403346
Greg Kroah-Hartman
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c2
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c3
--- Comment #3 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c4
Oliver Neukum
Jul 2 13:16:29 pc79 kernel: usbdev_poll - Point 1 I've been using the 2.6.25.9 I had used before to check if the problem vanishes with the latest kernel version. Also, now that we've done a lot more testing (and rebooting), we noticed that sometimes_ (very rarely, though), our test program (it's just opening the connection to the USB device and sending a single command to the USB device and
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c5
--- Comment #5 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c6
--- Comment #6 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c7
--- Comment #7 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c8
Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c9
--- Comment #9 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c10
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c11
Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c12
--- Comment #12 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c13
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c14
Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c15
--- Comment #15 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c16
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c17
--- Comment #17 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c18
Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c19
--- Comment #19 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c20
--- Comment #20 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c21
--- Comment #21 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c22
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c23
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c24
--- Comment #24 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c25
--- Comment #25 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c26
--- Comment #26 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c27
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c28
--- Comment #28 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c29
--- Comment #29 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c30
--- Comment #30 from Stefan Neis
printk will always hit the console if the log level is high enough
That was the hint I needed. After some googling, I found how to see the kernel messages on the console (instead of looking into /var/log/messages after rebooting) - and now the last line of log-output is: ehci_hcd 0000:00:0c.2: HC died; cleaning up which at least finally does sound like it's USB-related... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c31
--- Comment #31 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c32
Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c33
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c34
--- Comment #34 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c35
--- Comment #35 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c36
--- Comment #36 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c37
--- Comment #37 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c38
--- Comment #38 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c39
Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c40
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c41
--- Comment #41 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c42
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c43
--- Comment #43 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c44
Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c45
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c46
--- Comment #46 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c47
--- Comment #47 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c48
--- Comment #48 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c49
Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c50
--- Comment #50 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c51
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c52
--- Comment #52 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c53
--- Comment #53 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c54
Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c55
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c56
Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c57
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c58
--- Comment #58 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c59
Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c60
--- Comment #60 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c61
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c62
--- Comment #62 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c63
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c64
--- Comment #64 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c65
--- Comment #65 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c66
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c67
--- Comment #67 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c68
--- Comment #68 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c69
Oliver Neukum
Hi David,
you suggest a patch in this thread: http://article.gmane.org/gmane.linux.usb.general/8804/match=usb+ehci+problem... which never went in. Do you have a better alternative? Should it get in?
Better alternatives to that quick hack are in 2.6.27 already: - fix error handling -- 0bcfeb3ec9467a8dfae3e906925ec28fe788afcf - fix root cause -- 01c17142659c02d8cd4c67acdd8358180c5c4fb6 And ISTR seeing them go to the -stable tree too. - Dave -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c71
--- Comment #71 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c72
--- Comment #72 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c73
--- Comment #73 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c74
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=403346
User stefan.neis@kobil.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c75
--- Comment #75 from Stefan Neis
https://bugzilla.novell.com/show_bug.cgi?id=403346
User oneukum@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=403346#c76
Oliver Neukum
participants (1)
-
bugzilla_noreply@novell.com