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:
Created attachment 156339 [details, diff] patch This patch fixes described problem
dsd: for your edification as upstream incvs.