Closed prusnak closed 3 years ago
Can be reproduced on macOS by running test.py
Linux and Windows seem to work just fine.
It seems the first bad commit is this one: 6043124d851c0c03c1f973fdcda5c8b9b7a6a79a
It seems that the collision happens between
github.com/trezor/trezord-go/usb/lowlevel/libusb.Get_Active_Config_Descriptor
and
github.com/trezor/trezord-go/usb/lowlevel/libusb.Reset_Device
When one thread tries to enumerate the device, while other calls device reset, this will cause segfault on macOS.
Easy fix seems to be add mutex for Enumerate
/ Acquire
- added in a6c27d7