-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
gh-128002: fix many thread safety issues in asyncio #128147
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
Conversation
|
@colesbury While running the tests locally on forever mode I see frequent tsan warnings and rarely some crashes in |
colesbury
left a comment
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.
I'm still reading through the other locking changes, but a comment on all_tasks below:
|
Filed #128421 for existing data races in traceback and frame inspection. |
colesbury
left a comment
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.
LGTM with two comments below
Changes:
_asyncio.Taskand_asyncio.Futurethread-safe by adding critical sections_asyncio.all_tasksthread safe when eager tasks are usedChange asyncio state lock to a mutex rather than critical section to fix re-entrancy crash, not really sure about this one