SIGN IN SIGN UP

[3.11] gh-106883 Fix deadlock in threaded application (#117332)

When using threaded applications, there is a high risk of a deadlock in
the interpreter. It's a lock ordering deadlock with HEAD_LOCK(&_PyRuntime); and the GIL.

By disabling the GC during the _PyThread_CurrentFrames() and
_PyThread_CurrentExceptions() calls fixes the issue.
D
Diego Russo committed
6b37486184590d19c6f24e620545ec8f8f65e4c7
Parent: f1897d3
Committed by GitHub <noreply@github.com> on 3/11/2025, 3:31:03 PM