Repository navigation
v3.13.0rc2 Segmentation Fault in gc.get_referents. PyCapsule->traverse_func is NULL #124538
Copy link
Copy link
Closed
Closed
Copy link
Labels
3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)release-blockertype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
Activity
- addedtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
on Sep 25, 2024 - addedinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
on Sep 25, 2024 I'll take a look at this soon. At a glance, we just need to have
capsule_traversedo nothing if_PyCapsule_SetTraversewasn't called (under general circumstances,capsule_traverseshouldn't ever be called if_PyCapsule_SetTraversenever was, but callinggc.get_referentsforces that.)- added3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes
on Sep 25, 2024 This is a 3.13 regression! Looks like the bad commit was #108339. It's a pretty simple fix though.
The Github Issue dropdown doesn't have a 3.13rc2 option for me to check.
Sorry about that! That will be fixed by GH-124560.
Reacted by Peter Bierma and Justin Hendrick- added a commit that references this issue
on Sep 26, 2024 - added a commit that references this issue
on Sep 26, 2024 - moved this from Todo to Done in Release and Deferred blockers 🚫
on Sep 26, 2024 Thank you for the report, @justinjhendrick!
Reacted by Justin Hendrick
Metadata
Metadata
Assignees
Labels
3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)release-blockertype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Projects
- StatusShow more project fieldsDone
Crash report
What happened?
Hello! Thank you for all your work on CPython. Hopefully this crash report is helpful.
While working on matplotlib/matplotlib#28861, we noticed that our tests were segfaulting, and only on python3.13. Here is a minimal reproduction of that crash. I've also run it with python3.13-dbg and
-X devto hopefully provide more details.Error Message
Minimal Reproducible Example:
test.py
with python3.13 on Ubuntu 22.04.4
with python3.13-dbg on Ubuntu 22.04.4:
It does not crash with python3.12 on Ubuntu 22.04.4
Side-note:
I tested this on both python3.12 and 3.13, but not the main branch. The Github Issue dropdown doesn't have a 3.13rc2 option for me to check.
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.13.0rc2 (main, Sep 9 2024, 22:55:42) [GCC 11.4.0]
Linked PRs
gc.get_referentson an untracked capsule object #124559gc.get_referentson an untracked capsule object (GH-124559) #124588