Bug 225879 - dev-libs/libusb-0.1.12 fails to detect device remove and goes into infintive cycle
Bug#: 225879 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: robbat2@gentoo.org Reported By: roma1390@gmail.com
Component: Unspecified
URL: 
Summary: dev-libs/libusb-0.1.12 fails to detect device remove and goes into infintive cycle
Keywords:  
Status Whiteboard: 
Opened: 2008-06-11 11:55 0000
Description:   Opened: 2008-06-11 11:55 0000
libusb-0.1.12 on usb_bulk_read or usb_bulk_write goes into infinitive when user
removes usb device (or device firmware reset device itself).

strace from program which called usb_bulk_read with timeout 1000

9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No
such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No
such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No
such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No
such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No
such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No
such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No
such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No
such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)


Reproducible: Always

Steps to Reproduce:

------- Comment #1 From roma1390@gmail.com 2008-06-11 11:57:22 0000 -------
Created an attachment (id=156339) [details]
patch

This patch fixes described problem

------- Comment #2 From Robin Johnson 2008-06-25 03:25:50 0000 -------
dsd: for your edification as upstream


incvs.