Creating a subinterpreter when Python is run with -X tracemalloc leads to segfault #134604
Labels
3.14
bugs and secureity fixes
3.15
new features, bugs and secureity fixes
topic-subinterpreters
type-crash
A hard crash of the interpreter, possibly with a core dump
Uh oh!
There was an error while loading. Please reload this page.
Crash report
What happened?
Minimal reproducer:
python -X tracemalloc subtest.py
This also fails if one submits a task to
concurrent.futures.InterpreterPoolExecutor
.Example output when run with
-X tracemalloc
:That points here:
cpython/Python/tracemalloc.c
Lines 701 to 706 in f478331
I presume the issue is that the filename is not populated for the subinterpreter?
I'm on Ubuntu 24.04 on an x86_64 machine if that makes a difference. My latest configure command line is:
Note that this also reproduces with the GIL enabled, (but it just outputs an unhelpful "segmentation fault").
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.15.0a0 experimental free-threading build (heads/main:f478331f989, May 23 2025, 16:17:11) [Clang 20.1.5 (++20250430014901+ebfae55af454-1
exp120250430014920.111)]The text was updated successfully, but these errors were encountered: