From: Dylan S. <sta...@gm...> - 2022-06-01 03:41:07
|
Hello! I'm currently writing an application that interfaces with a USB Mass Storage device, and am running into an issue where a segfault occurs during the call to libusb_exit (as far as LLDB is concerned that is). I'm using the rusb Rust library, but I'm mostly looking for some assistance understanding the following log lines: [ 0.165580] [0000a9c9] libusb: debug [libusb_release_interface] interface 0 [ 0.167419] [0000a9c9] libusb: debug [darwin_attach_kernel_driver] reenumerating device for kernel driver attach [ 0.237059] [0000a9c9] libusb: debug [darwin_reenumerate_device] darwin/reenumerate_device: waiting for re-enumeration to complete... [ 0.238605] [0000a9d6] libusb: debug [darwin_devices_detached] detected device detached due to re-enumeration. sessionID: 0x445298d5179, locationID: 0x2814400000 [ 0.301901] [0000a9d6] libusb: debug [darwin_get_cached_device] finding cached device for sessionID 0x44819634aee [ 0.301995] [0000a9d6] libusb: debug [darwin_get_cached_device] matching sessionID/locationID 0x44819634aee/0x14400000 against cached device with sessionID/locationID 0x445298d5179/0x14400000 [ 0.302007] [0000a9d6] libusb: debug [darwin_get_cached_device] found cached device with matching location that is being re-enumerated [ 0.302012] [0000a9d6] libusb: debug [darwin_get_cached_device] caching new device with sessionID 0x44819634aee [ 5.304201] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] cached device descriptor: [ 5.304219] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] bDescriptorType: 0x01 [ 5.304312] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] bcdUSB: 0x0200 [ 5.304322] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] bDeviceClass: 0x00 [ 5.304325] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] bDeviceSubClass: 0x00 [ 5.304327] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] bDeviceProtocol: 0x00 [ 5.304331] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] bMaxPacketSize0: 0x40 [ 5.304334] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] idVendor: 0x05ac [ 5.304336] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] idProduct: 0x120a [ 5.304339] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] bcdDevice: 0x0002 [ 5.304341] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] iManufacturer: 0x01 [ 5.304387] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] iProduct: 0x02 [ 5.304393] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] iSerialNumber: 0x03 [ 5.304396] [0000a9d6] libusb: debug [darwin_cache_device_descriptor] bNumConfigurations: 0x02 [10.237129] [0000a9c9] libusb: error [darwin_reenumerate_device] darwin/reenumerate_device: timeout waiting for reenumerate [10.237150] [0000a9c9] libusb: info [darwin_capture_release_interface] on attempt to reattach the kernel driver got ret=-7 [10.237162] [0000a9c9] libusb: debug [libusb_close] [10.237179] [0000a9c9] libusb: warning [darwin_close] USBDeviceClose: device not opened for exclusive access [10.237196] [0000a9c9] libusb: debug [libusb_exit] [15.306749] [0000a9d6] libusb: debug [darwin_check_configuration] active config: 1, first config: 1 [15.306781] [0000a9d6] libusb: debug [process_new_device] re-using existing device from context 0x7f99b8f04470 for with session 0x445298d5179 new session 0x44819634aee [15.306796] [0000a9d6] libusb: debug [process_new_device] found device with address 1 port = 4 parent = 0x0 at 0x600000f380ba [15.306926] [0000a9d6] libusb: debug [darwin_event_thread_main] darwin event thread exiting [15.307442] [0000a9c9] libusb: debug [libusb_unref_device] destroy device 20.1 zsh: segmentation fault sudo cargo run --color=always --package rs-ipod-sysinfo --bin rs-ipod-sysinfo My program is run as sudo, and calls libusb_set_auto_detach_kernel_driver. The application performs a series of calls to libusb_bullk_transfer (SCSI INQUIRY requests). Any pointers on what I might be doing incorrectly to hit this issue would be appreciated! - Dylan |