Skip to content
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

gh-122201: Lock mutex when setting handling_thread to NULL #122204

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented Jul 23, 2024

In the free-threaded build, we need to lock pending->mutex when clearing the handling_thread in order to avoid a race with a concurrent make_pending_calls() from the same interpreter.

In the free-threaded build, we need to lock pending->mutex when clearing
the handling_thread in order not to race with a concurrent
make_pending_calls in the same interpreter.
@colesbury colesbury merged commit c557ae9 into python:main Jul 26, 2024
39 checks passed
@miss-islington-app
Copy link

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@colesbury colesbury deleted the gh-122201-pending-calls branch July 26, 2024 17:06
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 26, 2024
…honGH-122204)

In the free-threaded build, we need to lock pending->mutex when clearing
the handling_thread in order not to race with a concurrent
make_pending_calls in the same interpreter.
(cherry picked from commit c557ae9)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jul 26, 2024

GH-122319 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 26, 2024
colesbury added a commit that referenced this pull request Jul 26, 2024
…-122204) (#122319)

In the free-threaded build, we need to lock pending->mutex when clearing
the handling_thread in order not to race with a concurrent
make_pending_calls in the same interpreter.
(cherry picked from commit c557ae9)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants