-
Notifications
You must be signed in to change notification settings - Fork 13.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
Race condition in task killing #1923
Comments
Here's a similar one that will fail for different reasons: (EDIT by bblum: same as edit above)
|
Running the first one I got a hopefully more useful assertion message (after many tries):
A killer is trying to punt awake a blocked task, and the task is unblocking at the same time. I believe this is the same race. I've got a scheme for solving this race with my new |
I could not reproduce the second race. I believe 74f4b8d solved it. (It would have been kill() getting interrupted between checking if blocked (kill_lock held) and calling wakeup (which uses state_lock). Unifying the locks made that atomic.) The first one still races around
This is the sort of thing #2787 is warning about. |
If you run this enough times it will eventually fail: (EDIT by bblum: update to new closure syntax & new failure propagation semantics)
The race is between the two tasks, one that wants to unblock the third by killing it, the other by sending a message.
The text was updated successfully, but these errors were encountered: