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
Add test for cancelling read_event_into_async() future #680
base: master
Are you sure you want to change the base?
Conversation
Thanks for PR! It is useful. I (or someone else who is interested) use it when I'll deal with the problem, but for now let it hang open. |
Probably this bug is OS-dependent. I tried to increase for loops to |
In case if GitHub delete logs -- error is
|
Note that I am also running Windows 11, and the error occurs consistently on my machine. |
Well, then I can say, that you probably should try to debug and fix it yourself. I'll plan to make a PR with completely new parser soon, which maybe will free of this error, so you can wait until that. Because you already did some debugging, maybe you can rewrite the test to be more straightforward, without loops, just with manual calls in sequence. I think that currently the test unstable because it rely on system timer. |
I refactored it to be more deterministic, removing the arbitrary loop and replacing the 1ms timeout with 100ms. As for fixing the issue myself, I'll see if I can make time to get familiar with the codebase, although I unfortunately doubt I can in the next few weeks. Hopefully the new parser addresses the problem. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #680 +/- ##
==========================================
+ Coverage 65.16% 65.53% +0.36%
==========================================
Files 38 38
Lines 17851 18027 +176
==========================================
+ Hits 11633 11814 +181
+ Misses 6218 6213 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
And now it crashes on my machine but not on CI... I'll have to take a closer look |
Probably the problem is more visible for small timeouts rather than big. Maybe this is even a bug in tokio, because it seems some data race which should be impossible in safe Rust. Because quick-xml does not use |
Addresses #624 (comment)