-
Notifications
You must be signed in to change notification settings - Fork 2k
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
sys/usb_cdc_acm_stdio: only submit and flush for non-empty buffer [backport 2024.10] #20987
sys/usb_cdc_acm_stdio: only submit and flush for non-empty buffer [backport 2024.10] #20987
Conversation
(cherry picked from commit 67edd6c)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the backport!
Looks like CI has some troublesome with this one. That's weird. |
When the CI queue gets too long, the GitHub merge queue times out. |
This PR is cursed :/ What I don't understand is why this one is failing (taking so long) but not the one which landed in master ? |
The timeout is 360 minutes (maximum timeout supported by GitHub). One PR takes about 3h 30 min to be merged. Hence, the moment another PR is in front of the queue, it will not get merged. But since the last Murdock run succeeded, we could rerun with compilation tests, as lomg as nothing else gets merged in between. |
It is now at the head of the merge queue, so the recent passing CI run will still be valid when this gets in. For reference, here is the output of the last full Murdock run: https://ci.riot-os.org/details/dded58edea91403bb7a189410e01d4fe |
So much for skipping compile tests. But this time - assuming now flaky tests fail - it should pass Murdock before the 360 mins have passed. |
Hallelujah 🎉 |
Backport of #20986
Contribution description
There seems to be some problem the implementation of stdio over usbus_cdc_acm where printing an empty string sometimes leads to the next character being missed in the printout. I've managed to pin the problem down to the call to
usbus_cdc_acm_flush(&cdcacm);
insys/usb/usbus/cdc/acm/cdc_acm_stdio.c
and, more specifically, to_ep_xmit
incpu/nrf5x_common/periph/usbdev.c
, but since I have no non-nRF hardware at hand, I cannot tell whether it is a nRF specific issue.In any case, skipping the flushing (and submitting) in the first place seems to fix the issue for now. If anyone has an idea how to investigate this further and maybe fix the root cause somewhere deeper in the usb driver, please tell me, I'm happy to test more.
Testing procedure
stdio_cdc_acm
such asfeather-nrf52840-sense
make -C tests/sys/usbus_cdc_acm_stdio BOARD=feather-nrf52840-sense flash term
text 0
On
master
, this sometimes skips over thex
in the printout. With this PR, I never managed to reproduce the issue.Issues/PRs references
Found while investigating failing tests for #20980