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

Windows error on closing while isoc transfers in flight #1376

Open
tormodvolden opened this issue Dec 12, 2023 · 6 comments
Open

Windows error on closing while isoc transfers in flight #1376

tormodvolden opened this issue Dec 12, 2023 · 6 comments
Labels
isoc isochronous transfer, especially under Windows windows

Comments

@tormodvolden
Copy link
Contributor

Testing a custom firmware (basically a modified audio example) with a modified sam3u_benchmark.c I see these warnings on Windows when I stop the test, and they do not show up on Linux or macOS.

Maybe the application needs fixing, or the error 87 needs special handling, anyway I am filing this here so I remember to look at it later.

$ ./stm32_isoc.exe
6387 transfers (total 140514 bytes) in 6408 milliseconds => 21927 bytes/sec
libusb: error [windows_handle_transfer_completion] detected I/O error 87: [87] The parameter is incorrect.
libusb: error [windows_handle_transfer_completion] detected I/O error 87: [87] The parameter is incorrect.
libusb: error [windows_handle_transfer_completion] detected I/O error 87: [87] The parameter is incorrect.
libusb: error [windows_handle_transfer_completion] detected I/O error 87: [87] The parameter is incorrect.
libusb: error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know
libusb: error [do_close] A cancellation hasn't even been scheduled on the transfer for which the device is closing
libusb: error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know
libusb: error [do_close] A cancellation hasn't even been scheduled on the transfer for which the device is closing
libusb: error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know
libusb: error [do_close] A cancellation hasn't even been scheduled on the transfer for which the device is closing
libusb: error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know
libusb: error [do_close] A cancellation hasn't even been scheduled on the transfer for which the device is closing

 Releasing interface 0...
Releasing interface 1...
Closing device...
@tormodvolden tormodvolden added windows isoc isochronous transfer, especially under Windows labels Dec 12, 2023
@HM281099
Copy link

This problem exists in windows, when using asynchronous interfaces to send data, when close the device, it is very serious that the system must be restarted, otherwise the program cannot be killed by external means

@HM281099
Copy link

image

@HM281099
Copy link

There seems to be a deadlock, causing the program to freeze

@tormodvolden
Copy link
Contributor Author

I didn't see any deadlock. @HM281099 can you please attach a full debug log?

@HM281099
Copy link

HM281099 commented Dec 20, 2023

I added printing to core.c and confirmed that the program was stuck at usbi_backend.close(dev_handle) ,
using version: V1.0.26.11813.
image
image

@tormodvolden

@mcuee
Copy link
Member

mcuee commented Dec 20, 2023

@HM281099

Please do not use screenshot, just copy/paste the full debug log. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
isoc isochronous transfer, especially under Windows windows
Projects
None yet
Development

No branches or pull requests

3 participants