Crash running PyO3 tests with --test-threads=1000 #124375
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
topic-free-threading
type-crash
A hard crash of the interpreter, possibly with a core dump
Crash report
What happened?
Unfortunately I don't know how to make this more minimal than "run the PyO3 tests".
You'll need rust 1.81 installed along with a copy of the latest version of PyO3 from github and a free-threaded Python interpreter.
Repeatedly run the PyO3 tests with
UNSAFE_PYO3_BUILD_FREE_THREADED=1 cargo test --lib -- --test-threads=1000
, and eventually you'll see a seg fault. If you run the test executable under a debugger, you'll see a C traceback like this, crashing on an atomic load inside the GC internals:Not sure if it will be helpful, but the tracebacks from all of the threads are here: https://gist.github.com/ngoldbaum/d3f5bceba9554ba8347c40773446b08d
Happy to help with reproducing this if anyone has trouble getting PyO3 setup. I'm on the CPython discord in the #free-threading channel if chatting is easier.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux, macOS
Output from running 'python -VV' on the command line:
Python 3.13.0rc2 experimental free-threading build (main, Sep 23 2024, 13:34:50) [Clang 15.0.0 (clang-1500.3.9.4)]
Linked PRs
_PyMem_ProcessDelayed
on other thread states #124459The text was updated successfully, but these errors were encountered: