]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-119369: Fix deadlock during thread exit in free-threaded build (#119528)
authorSam Gross <colesbury@gmail.com>
Fri, 31 May 2024 17:04:59 +0000 (13:04 -0400)
committerGitHub <noreply@github.com>
Fri, 31 May 2024 17:04:59 +0000 (13:04 -0400)
commit078b8c8cf2bf68f7484cc4d2e3dd74b6fab55664
treed77ecd24857b1a6240db0edebcda80a69b24b7a7
parent64ff1e217d963b48140326e8b63c62f4b306f4a0
gh-119369: Fix deadlock during thread exit in free-threaded build (#119528)

Release the GIL before calling `_Py_qsbr_unregister`.

The deadlock could occur when the GIL was enabled at runtime. The
`_Py_qsbr_unregister` call might block while holding the GIL because the
thread state was not active, but the GIL was still held.
Misc/NEWS.d/next/Core and Builtins/2024-05-24-21-16-52.gh-issue-119369.qBThho.rst [new file with mode: 0644]
Python/pystate.c
Python/qsbr.c