-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
GC segfault with free threading #141965
Copy link
Copy link
Closed as not planned
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixestopic-free-threadingtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixestopic-free-threadingtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Crash report
What happened?
This code segfaults for me
I am unclear why. I haven't been able to reproduce it without pytorch and even stranger is that the
threading.Condition()is not used. It leads me to think there's a race in the garbage collection process and the tensor + Condition happen to trigger some specific states but I haven't been able to characterize that yet.CPython versions tested on:
3.14
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.14.0 free-threading build (main, Nov 19 2025, 22:48:09) [Clang 21.1.4 ]