Skip to content

test_profiling results in a segmentation fault when Python 3.15.0a2 is built for i686 architecture #141784

@befeleme

Description

@befeleme

Bug report

Bug description:

Hello,

test_gc_frames_enabled has been added very recently in: #140643
In Fedora Linux, during the i686 build, the test segfaults on all supported Fedora versions (42, 43, 44).

The trace from the test rerun with the debug Python is below. Let me know if you need more data to make the issue more robust.

(gdb) run  -m test.regrtest test_profiling
Starting program: /usr/bin/python3.15d -m test.regrtest test_profiling
Program received signal SIGSEGV, Segmentation fault.
0xf79fc6cc in _PyType_HasFeature (type=0x70000000, feature=16384)
    at /usr/src/debug/python3.15-3.15.0~a2-1.fc44.i386/Include/internal/pycore_object.h:316
316         return ((type->tp_flags) & feature) != 0;
(gdb) bt
#0  0xf79fc6cc in _PyType_HasFeature (type=0x70000000, feature=16384)
    at /usr/src/debug/python3.15-3.15.0~a2-1.fc44.i386/Include/internal/pycore_object.h:316
#1  0xf79fceef in maybe_tracked (ob=<unknown at remote 0xf7f6ce24>)
    at /usr/src/debug/python3.15-3.15.0~a2-1.fc44.i386/Objects/tupleobject.c:168
#2  0xf79fd7ba in _PyTuple_FromStackRefStealOnSuccess (src=0xf7fb7cf0, n=3)
    at /usr/src/debug/python3.15-3.15.0~a2-1.fc44.i386/Objects/tupleobject.c:426
#3  0xf7b04689 in _PyEval_EvalFrameDefault (tstate=0xf7f89e78 <_PyRuntime+186616>, frame=0xf7fb7c98, throwflag=0)
    at /usr/src/debug/python3.15-3.15.0~a2-1.fc44.i386/Python/generated_cases.c.h:1486
#4  0xf7afb02f in _PyEval_EvalFrame (tstate=0xf7f89e78 <_PyRuntime+186616>, frame=0xf7fb79ec, throwflag=0)
    at /usr/src/debug/python3.15-3.15.0~a2-1.fc44.i386/Include/internal/pycore_ceval.h:121
#5  0xf7b37c90 in _PyEval_Vector (tstate=0xf7f89e78 <_PyRuntime+186616>, func=0xf7078ed0, locals=0x0, 
    args=0xfffe8ad8, argcount=2, kwnames=0x0) at /usr/src/debug/python3.15-3.15.0~a2-1.fc44.i386/Python/ceval.c:2145
#6  0xf793f953 in _PyFunction_Vectorcall (func=<function at remote 0xf7078ed0>, stack=0xfffe8ad8, nargsf=2, 
    kwnames=0x0) at /usr/src/debug/python3.15-3.15.0~a2-1.fc44.i386/Objects/call.c:413
#7  0xf7942ce8 in _PyObject_VectorcallTstate (tstate=0xf7f89e78 <_PyRuntime+186616>, 
    callable=<function at remote 0xf7078ed0>, args=0xfffe8ad8, nargsf=2, kwnames=0x0)
    at /usr/src/debug/python3.15-3.15.0~a2-1.fc44.i386/Include/internal/pycore_call.h:169
#8  0xf794379d in method_vectorcall (method=<method at remote 0xf6432cf0>, args=0xf65db0b8, nargsf=1, kwnames=0x0)
    at /usr/src/debug/python3.15-3.15.0~a2-1.fc44.i386/Objects/classobject.c:95
#9  0xf793f38a in _PyVectorcall_Call (tstate=0xf7f89e78 <_PyRuntime+186616>, func=0xf7943538 <method_vectorcall>, 
    callable=<method at remote 0xf6432cf0>, 
    tuple=(<RegressionTestResult(failfast=False, failures=[], errors=[], testsRun=6, skipped=[], expectedFailures=[], unexpectedSuccesses=[], collectedDurations=[('test_cpu_mode_integration_filtering (test.test_profiling.test_sampling_profiler.TestCpuModeFiltering.test_cpu_mode_integration_filtering)', <float at remote 0xf642c068>), ('test_cpu_mode_with_no_samples (test.test_profiling.test_sampling_profiler.TestCpuModeFiltering.test_cpu_mode_with_no_samples)', <float at remote 0xf6484e68>), ('test_frames_filtered_with_skip_idle (test.test_profiling.test_sampling_profiler.TestCpuModeFiltering.test_frames_filtered_with_skip_idle)', <float at remote 0xf6484e88>), ('test_mode_validation (test.test_profiling.test_sampling_profiler.TestCpuModeFiltering.test_mode_validation)', <float at remote 0xf6484d68>), ('test_gc_frames_disabled (test.test_profiling.test_sampling_profiler.TestGCFrameTracking.test_gc_frames_disabled)', <float at remote 0xf62b9708>)], shouldStop=False, buffer=False, tb_locals=False, _stdout_buffer=None, _st...(truncated), kwargs={})
    at /usr/src/debug/python3.15-3.15.0~a2-1.fc44.i386/Objects/call.c:273

CPython versions tested on:

3.15

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtestsTests in the Lib/test dirtopic-profilingtype-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions