Date: Wed, 12 Sep 2018 09:08:07 +0000 From: bugzilla-noreply@freebsd.org To: usb@FreeBSD.org Subject: [Bug 231322] libusb_bulk_transfer() does not fail (with LIBUSB_ERROR_NO_DEVICE) if the device is not more present Message-ID: <bug-231322-19105@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231322 Bug ID: 231322 Summary: libusb_bulk_transfer() does not fail (with LIBUSB_ERROR_NO_DEVICE) if the device is not more present Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: usb Assignee: usb@FreeBSD.org Reporter: ludovic.rousseau+freebsd@gmail.com After a USB device has been removed I can (try to) send a USB packet using libusb_bulk_transfer(). The program then blocks instead of returning an err= or. I get the logs: LIBUSB_FUNCTION: libusb_bulk_transfer enter LIBUSB_FUNCTION: libusb_submit_transfer enter dev: 0x28c09b80 pxfer0: 0x28c2f0f0 pxfer1: 0x28c2f12c LIBUSB_FUNCTION: libusb_submit_transfer leave 0 LIBUSB_FUNCTION: libusb_handle_events_timeout_completed enter LIBUSB_FUNCTION: libusb10_handle_events_sub enter I added the dev and pxfer* logs. Then the program is blocked until I kill it using Ctrl-C. Under GNU/Linux libusb_bulk_transfer() returns the error LIBUSB_ERROR_NO_DEVICE. Maybe libusb_bulk_transfer() or libusb_submit_transfer() would check the USB device is still present. I can test patches. The problem is easy to reproduce for me. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-231322-19105>