Closed fgervais closed 4 years ago
I though it could be a kernel issue so I tried on a newer version but I still get the same result.
My original post was using a kernel 4.19
version and now I tried on 5.4
but it still freezes at FUTEX_WAKE_PRIVATE
.
The exact version I'm on right now is:
Linux ubuntu 5.4.0-1008-raspi #8-Ubuntu SMP Wed Apr 8 11:17:03 UTC 2020 armv7l armv7l armv7l GNU/Linux
1) I assume that you have a composite device, that has an UVC interface and HID interface, and you're trying to open both devices of the same physical device. Am I correct? 2) Is it your own or a well known device/interfaces?
It's 2 different physical devices.
One is an aliexpress camera module (https://www.aliexpress.com/item/32263338732.html?spm=a2g0s.9042311.0.0.27424c4dXUOYdf)
The other is an mcp2221a (https://www.adafruit.com/product/4471)
fgervais@ubuntu:~$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 9, If 0, Class=Communications, Driver=cdc_acm, 12M
|__ Port 3: Dev 9, If 1, Class=CDC Data, Driver=cdc_acm, 12M
|__ Port 3: Dev 9, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 4: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
Then why do you think this is a hidapi library issue?
Well I though that it was the case because it was the layer that I saw blocking at the time. To be fair though, I don't think it's the case anymore. I left the issue open thinking someone might provide some help while we actively debug this issue on our side.
Do you know how I could get more info on what this blocking futex() call is about? Any way I can know what it's waiting for exactly?
I might try to help you understand the hidapi implementation itself only. In case of libusb backend, only down to calling libusb functions.
Please note, that this is an issue tracker, not a support forum. We, maintainers, trying to keep the library maintained in terms of fixing bugs found by us or by a community. This work is being done purely on our enthusiasm, and I hope you can understand why I'm asking you to search for help on Stackoverflow or other forums.
I'm reading from an hid device using hidapi in python through a libusb backend while also streaming images from a webcam
Only reading from the hid device by itself is fine but if I do so while streaming from the webcam, the
hid.read(64)
hangs.Here my reproduction code:
and here the strace output with some added "\n" to make it somewhat nicer to read:
You can see the I can read properly from the hid device, then I do the
video_capture.read()
and on the second loop I cannot read from the device anymore. I hangs there forever.