Crash report
What happened?
When running test_perf_profiler, the subprocess fails with what appears to be a bad memory access.
This doesn't happen every time, maybe 1 in 5 runs. I can't tell if it's load related (It doesn't seem to be from my extremely unscientific testing), but it does happen when running only this test suite (ie test_perf_profiler), or all the Python tests in parallel. I've also seen this happen on the MacOS build bots.
This build was configured as such -
/Volumes/devel/src/cpython-fixes/configure --with-assertions --with-pydebug --enable-safety --enable-slower-safety CC=`basename $CC`
Note that the build tree (and thus cwd when running the tests) is completely outside of the source tree (I doubt this makes a difference, but who knows).
% ./python-mtesttest_perf_profiler--headerRaisedRLIMIT_NOFILE: 256->1024==CPython3.15.0a8+ (heads/main:4a5d25c26c0, Apr292026, 16:33:39) [Clang22.1.4 ]
==macOS-26.4.1-arm64-arm-64bit-Mach-Olittle-endian==Pythonbuild: debug==cwd:/Volumes/devel/build/cpython-fixes.debug/build/test_python_worker_55492æ==CPUcount: 12==encodings: locale=UTF-8FS=utf-8==resources: alltestresourcesaredisabled, use-uoptiontounskiptestsUsingrandomseed: 16379406720:00:00loadavg: 3.66Run1testsequentiallyinasingleprocess0:00:00loadavg: 3.66 [1/1] test_perf_profilertesttest_perf_profilerfailed--Traceback (mostrecentcalllast):
File"/Volumes/devel/src/cpython-fixes/Lib/test/test_perf_profiler.py", line145, intest_trampoline_works_with_forksself.assertEqual(process.returncode, 0)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^AssertionError: 139!=00:00:02loadavg: 3.61 [1/1/1] test_perf_profilerfailed (1failure)
==Testsresult: FAILURE==1testfailed:
test_perf_profilerTotalduration: 2.5secTotaltests: run=14failures=1skipped=5Totaltestfiles: run=1/1failed=1Result: FAILURE
I codesigned the python binary for coredumping so was able to obtain this stack trace -
% lldb --core /cores/core.55510 ./python
(lldb) target create "./python" --core "/cores/core.55510"
bt
Core file '/cores/core.55510' (arm64) was loaded.
(lldb) bt
* thread #1, stop reason = ESR_EC_IABORT_EL0 (fault address: 0x10510f84c)
* frame #0: 0x000000010510f84c
frame #1: 0x000000010510f84c
frame #2: 0x0000000104a4f4d0 python`py_trampoline_evaluator(ts=0x0000000104d8a360, frame=0x0000000105104140, throw=0) at perf_trampoline.c:450:12
frame #3: 0x00000001049062e4 python`_PyEval_EvalFrame(tstate=0x0000000104d8a360, frame=0x0000000105104140, throwflag=0) at pycore_ceval.h:120:12
frame #4: 0x0000000104906208 python`_PyEval_Vector(tstate=0x0000000104d8a360, func=0x0000000109af9790, locals=0x0000000000000000, args=0x000000016b7f2a88, argcount=0, kwnames=0x0000000000000000) at ceval.c:2124:12
frame #5: 0x00000001046f158c python`_PyFunction_Vectorcall(func=0x0000000109af9790, stack=0x000000016b7f2a88, nargsf=9223372036854775808, kwnames=0x0000000000000000) at call.c:413:16
frame #6: 0x00000001046efd80 python`_PyObject_VectorcallTstate(tstate=0x0000000104d8a360, callable=0x0000000109af9790, args=0x000000016b7f2a88, nargsf=9223372036854775808, kwnames=0x0000000000000000) at pycore_call.h:144:11
frame #7: 0x00000001046f112c python`PyObject_Vectorcall(callable=0x0000000109af9790, args=0x000000016b7f2a88, nargsf=9223372036854775808, kwnames=0x0000000000000000) at call.c:327:12
frame #8: 0x0000000104906820 python`_Py_VectorCallInstrumentation_StackRefSteal(callable=(bits = 4457469840), arguments=0x0000000105104140, total_args=0, kwnames=(bits = 1), call_instrumentation=false, frame=0x00000001051040e0, this_instr=0x0000000109c1576e, tstate=0x0000000104d8a360) at ceval.c:775:11
frame #9: 0x000000010490e18c python`_PyEval_EvalFrameDefault(tstate=0x0000000104d8a360, frame=0x00000001051040e0, throwflag=0) at generated_cases.c.h:1846:35
(lldb) ^D
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
Python 3.15.0a8+ (heads/main:4a5d25c26c0, Apr 29 2026, 16:33:39) [Clang 22.1.4 ]
Linked PRs
Crash report
What happened?
When running
test_perf_profiler, the subprocess fails with what appears to be a bad memory access.This doesn't happen every time, maybe 1 in 5 runs. I can't tell if it's load related (It doesn't seem to be from my extremely unscientific testing), but it does happen when running only this test suite (ie test_perf_profiler), or all the Python tests in parallel. I've also seen this happen on the MacOS build bots.
This build was configured as such -
Note that the build tree (and thus cwd when running the tests) is completely outside of the source tree (I doubt this makes a difference, but who knows).
I codesigned the python binary for coredumping so was able to obtain this stack trace -
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
Python 3.15.0a8+ (heads/main:4a5d25c26c0, Apr 29 2026, 16:33:39) [Clang 22.1.4 ]
Linked PRs