Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stress_mt failures on Linux and stuck on macOS #1494

Open
tormodvolden opened this issue May 7, 2024 · 4 comments
Open

stress_mt failures on Linux and stuck on macOS #1494

tormodvolden opened this issue May 7, 2024 · 4 comments
Labels
linux macOS test related to tests, split from example label

Comments

@tormodvolden
Copy link
Contributor

tormodvolden commented May 7, 2024

We have previously seen errors on macOS on virtual machines, but here we have something I can reproduce. Testing on a Lenovo L13 with Intel i5-1135G7 (8 cores), Ubuntu 24.04 and its kernel 6.8.1, I get with 1.0.27 or latest git (last tested at 2a138c6):

Running multithreaded init/exit test...
Starting 8 threads
Running multithreaded init/exit test with enumeration...
Starting 8 threads
No access to device 1d6b:0003, skipping transfer tests.
No access to device 06cb:00bd, skipping transfer tests.
No access to device 13d3:56bc, skipping transfer tests.
No access to device 192f:0416, skipping transfer tests.
No access to device 04d9:1829, skipping transfer tests.
No access to device 05e3:0608, skipping transfer tests.
No access to device 05e3:0608, skipping transfer tests.
No access to device 046d:0a56, skipping transfer tests.
No access to device 8087:0026, skipping transfer tests.
No access to device 1d6b:0002, skipping transfer tests.
No access to device 1d6b:0003, skipping transfer tests.
No access to device 1d6b:0002, skipping transfer tests.
Thread 2 failed (iteration 1): LIBUSB_ERROR_IO
Thread 3 failed (iteration 1): LIBUSB_ERROR_IO
Thread 5 failed (iteration 1): LIBUSB_ERROR_IO
All threads discovered 13 devices (12 not opened)
All done, 3 errors

Or

Running multithreaded init/exit test...
Starting 8 threads
Running multithreaded init/exit test with enumeration...
Starting 8 threads
No access to device 1d6b:0003, skipping transfer tests.
No access to device 06cb:00bd, skipping transfer tests.
No access to device 13d3:56bc, skipping transfer tests.
No access to device 192f:0416, skipping transfer tests.
No access to device 04d9:1829, skipping transfer tests.
No access to device 05e3:0608, skipping transfer tests.
No access to device 05e3:0608, skipping transfer tests.
No access to device 046d:0a56, skipping transfer tests.
No access to device 8087:0026, skipping transfer tests.
No access to device 1d6b:0002, skipping transfer tests.
No access to device 1d6b:0003, skipping transfer tests.
No access to device 1d6b:0002, skipping transfer tests.
Thread 0 failed (iteration 1): LIBUSB_ERROR_IO
Device count mismatch: Thread 1 discovered 13 devices instead of 0
Thread 2 failed (iteration 1): LIBUSB_ERROR_IO
Thread 7 failed (iteration 1): LIBUSB_ERROR_IO
All done, 4 errors
@tormodvolden
Copy link
Contributor Author

On the macOS CI it can also get into an infinite loop it seems like: https://github.com/libusb/libusb/actions/runs/8991096355/job/24697895520 (been running 2 hours now).

@mcuee
Copy link
Member

mcuee commented May 21, 2024

For Windows, we have two more ignored errors, I tend to think LIBUSB_ERROR_NOT_FOUND is not a normal error as well. But I need to review my past test results.

#if defined(PLATFORM_WINDOWS)
				    || open_err == LIBUSB_ERROR_NOT_SUPPORTED
				    || open_err == LIBUSB_ERROR_NOT_FOUND
#endif

@mcuee mcuee added the test related to tests, split from example label label May 21, 2024
@mcuee
Copy link
Member

mcuee commented May 29, 2024

On the macOS CI it can also get into an infinite loop it seems like: https://github.com/libusb/libusb/actions/runs/8991096355/job/24697895520 (been running 2 hours now).

Same for this one (running for more than 5 hours)
https://github.com/libusb/libusb/actions/runs/9276043843/job/25522153514

@mcuee mcuee changed the title stress_mt failures on Linux stress_mt failures on Linux and stuck on macOS May 29, 2024
@mcuee mcuee added the macOS label May 29, 2024
@tormodvolden
Copy link
Contributor Author

I can reproduce it also with debug logging:

[ 2.949947] [0001427f] libusb: debug [usbi_wait_for_events] poll() returned 1
[ 2.949967] [0001427f] libusb: debug [reap_for_handle] urb type=2 status=-71 transferred=0
[ 2.949952] [0001427d] libusb: error [get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/003, errno=13
[ 2.949972] [0001427f] libusb: debug [handle_control_completion] handling completion status -71
[ 2.949975] [0001427d] libusb: error [get_usbfs_fd] libusb requires write access to USB device nodes
[ 2.949996] [0001427d] libusb: debug [libusb_open] open 3.3 returns -3
No access to device 13d3:56bc, skipping transfer tests.
[ 2.950006] [0001427d] libusb: debug [libusb_get_device_descriptor]  
[ 2.950010] [0001427d] libusb: debug [libusb_open] open 3.11
[ 2.949978] [0001427f] libusb: debug [handle_control_completion] low-level bus error -71

Error -71 is -EPROTO (see also https://www.kernel.org/doc/html/latest/driver-api/usb/error-codes.html)

It turned out this was always related to a "Alcor Micro Corp. AU9540 Smartcard Reader". I think it gets stressed by all the descriptor requests. When I disable the descriptor requests for this device, I don't get any errors any longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linux macOS test related to tests, split from example label
Projects
None yet
Development

No branches or pull requests

2 participants