Crash with PyGILState_Ensure
called from background thread during finalization on Python 3.14.0a7
#132948
Labels
3.14
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-crash
A hard crash of the interpreter, possibly with a core dump
Crash report
What happened?
Coming over from work on PyO3's branch to support Python 3.14.
We have a crash which can be narrowed down to calling
PyGilState_Ensure
in a background thread while finalization is underway. This seems to be new in 3.14.Reproduce by
python -c "import pyo3_scratch"
lldb backtrace:
CPython versions tested on:
3.14
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
Python 3.14.0a7 (main, Apr 25 2025, 15:33:43) [Clang 17.0.0 (clang-1700.0.13.3)]
The text was updated successfully, but these errors were encountered: