Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-128002: fix many thread safety issues in asyncio#128147

Merged
kumaraditya303 merged 26 commits intopython:mainfrom
kumaraditya303:asyncio-tsafe
Jan 4, 2025
Merged

gh-128002: fix many thread safety issues in asyncio#128147
kumaraditya303 merged 26 commits intopython:mainfrom
kumaraditya303:asyncio-tsafe

Conversation

@kumaraditya303
Copy link
Contributor

@kumaraditya303kumaraditya303 commentedDec 21, 2024
edited
Loading

Changes:

  • Makes_asyncio.Task and_asyncio.Future thread-safe by adding critical sections
  • Add assertions to check for thread safety checking locking of object by critical sections in internal functions
  • Make_asyncio.all_tasks thread safe when eager tasks are used
  • Change asyncio state lock to a mutex rather than critical section to fix re-entrancy crash, not really sure about this one
  • Add a thread safety test

@kumaraditya303
Copy link
ContributorAuthor

kumaraditya303 commentedDec 31, 2024
edited
Loading

@colesbury While running the tests locally on forever mode I see frequent tsan warnings and rarely some crashes inexceptions.c arising from things like setting traceback on a exception, should I add those to the suppressions list?

Copy link
Contributor

@colesburycolesbury left a 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 onall_tasks below:

@kumaraditya303
Copy link
ContributorAuthor

Filed#128421 for existing data races in traceback and frame inspection.

colesbury reacted with thumbs up emoji

Copy link
Contributor

@colesburycolesbury left a 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

@kumaraditya303kumaraditya303 merged commit513a4ef intopython:mainJan 4, 2025
39 checks passed
@kumaraditya303kumaraditya303 deleted the asyncio-tsafe branchJanuary 4, 2025 08:48
WolframAlph pushed a commit to WolframAlph/cpython that referenced this pull requestJan 4, 2025
)* Makes `_asyncio.Task` and `_asyncio.Future` thread-safe by adding critical sections* Add assertions to check for thread safety checking locking of object by critical sections in internal functions* Make `_asyncio.all_tasks` thread safe when eager tasks are used* Add a thread safety test
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull requestJan 8, 2025
)* Makes `_asyncio.Task` and `_asyncio.Future` thread-safe by adding critical sections* Add assertions to check for thread safety checking locking of object by critical sections in internal functions* Make `_asyncio.all_tasks` thread safe when eager tasks are used* Add a thread safety test
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@colesburycolesburycolesbury approved these changes

@1st11st1Awaiting requested review from 1st11st1 is a code owner

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

@willingcwillingcAwaiting requested review from willingcwillingc is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@kumaraditya303@colesbury

[8]ページ先頭

©2009-2026 Movatter.jp