-
Notifications
You must be signed in to change notification settings - Fork 86
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
wakeup_task: Trying to wake up task 1 which is not blocked #898
Comments
The error can be reproduced much more quickly by replacing |
I've only seen this with the release build, but GDB's
|
It seems that the Line 647 in 5f1ccd6
handle_waiting_tasks is leading to an invocation of custom_wakeup that wakes up the task before handle_waiting_tasks itself tries to wake it up at: Line 662 in 5f1ccd6
If I move the initialisation of Line 641 in 5f1ccd6
Line 653 in 5f1ccd6
I don't claim that moving the initialisation of |
For future reference, you can enable debug information in release builds. That should make getting back traces easier: Profiles—The Cargo Book— |
I think your analysis is correct. Thanks a lot! In principle, an external mutation of a mutable reference should not be possible and be caught earlier. I think the underlying issue is #622. If that was fixed, we'd get a more helpful “already borrowed” error. We'd want a proper rework and fix of #622 in the long term, but for the meantime, moving the cursor creation around gets us forward. |
This was potentially caused by two issues:
|
I get this with the same
testtcp
program as in #846, but by running the release build for a much longer time on AArch64. The error is:To build and run:
To test, from a different terminal:
This typically runs for a minute or two and the error happens after 500-1000 connections have been made. I don't have enough data to say it looks like a Poisson distribution, but it looks sort of random.
rusty-hermit is at 5051aeed6c01845962973b0e907b366ed8fc0163
rusty-hermit/kernel is at 5f1ccd6
(For all I know it's possible that the only bug here is the assertion itself: perhaps waking up a task that is not blocked is something that should be expected to happen occasionally, for some reason? I have not seen this error on Intel but something different happens if I run the test on Intel: #899.)
The text was updated successfully, but these errors were encountered: