]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-118332: Fix deadlock involving stop the world (#118412)
authorSam Gross <colesbury@gmail.com>
Tue, 30 Apr 2024 19:01:28 +0000 (15:01 -0400)
committerGitHub <noreply@github.com>
Tue, 30 Apr 2024 19:01:28 +0000 (15:01 -0400)
commitb2c3b70c7102197e4505e6cd69722dc508527d22
tree6b910d740f1e3d8d3af38a487d787b3267ebff68
parent4a1cf66c5c0afa36d7a51d5f9d3874cda10df79c
gh-118332: Fix deadlock involving stop the world (#118412)

Avoid detaching thread state when stopping the world. When re-attaching
the thread state, the thread would attempt to resume the top-most
critical section, which might now be held by a thread paused for our
stop-the-world request.
Include/internal/pycore_lock.h
Modules/_testinternalcapi/test_critical_sections.c
Modules/_threadmodule.c
Python/lock.c
Python/pystate.c