Repository navigation
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
After enabling JIT on Python 3.15, I've noticed that the Hypothesis test suite started hanging. Unfortunately, I wasn't able to figure out a precise reproducer. However, I can reliably reproduce it with the following calls:
# this is the last version without Rust, to have extensions out of the equation
# (newer versions hang the same)
$ git clone -q -b v6.155.7 https://github.com/HypothesisWorks/hypothesis/
$ cd hypothesis/hypothesis
$ uv venv -p ~/cpython/python
Using CPython 3.16.0a0+debug interpreter at: /home/mgorny/cpython/python
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
$ uv pip install -e . pytest
Resolved 7 packages in 1.58s
Built hypothesis @ file:///home/mgorny/hypothesis/hypothesis
Prepared 1 package in 589ms
Installed 7 packages in 30ms
+ hypothesis==6.155.7 (from file:///home/mgorny/hypothesis/hypothesis)
+ iniconfig==2.3.0
+ packaging==26.2
+ pluggy==1.6.0
+ pygments==2.20.0
+ pytest==9.1.1
+ sortedcontainers==2.4.0
$ .venv/bin/pytest -vv tests/cover/test_lookup_py37.py::test_resolving_standard_tuple_variadic_as_generic tests/cover/test_lookup_py37.py::test_resolving_standard_list_as_generic tests/cover/test_lookup_py37.py::test_resolving_standard_dict_as_generic tests/cover/test_lookup_py37.py::test_resolving_standard_set_as_generic tests/cover/test_lookup_py37.py::test_resolving_standard_deque_as_generic tests/cover/test_lookup_py37.py::test_resolving_standard_defaultdict_as_generic
========================================================= test session starts =========================================================
platform linux -- Python 3.16.0a0, pytest-9.1.1, pluggy-1.6.0 -- /home/mgorny/hypothesis/hypothesis/.venv/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: /home/mgorny/hypothesis
configfile: pyproject.toml
plugins: hypothesis-6.155.7
collected 6 items
tests/cover/test_lookup_py37.py::test_resolving_standard_tuple_variadic_as_generic PASSED [ 16%]
tests/cover/test_lookup_py37.py::test_resolving_standard_list_as_generic PASSED [ 33%]
tests/cover/test_lookup_py37.py::test_resolving_standard_dict_as_generic PASSED [ 50%]
tests/cover/test_lookup_py37.py::test_resolving_standard_set_as_generic PASSED [ 66%]
tests/cover/test_lookup_py37.py::test_resolving_standard_deque_as_generic PASSED [ 83%]
tests/cover/test_lookup_py37.py::test_resolving_standard_defaultdict_as_generic Now, some notes:
- The CPU is 100% busy, and Python doesn't respond to Ctrl-C. I have to kill it explicitly now.
- I'm not 100% sure if it's completely deadlooped or just takes forever to complete; I haven't waited more than 10 minutes (with optimized build of Python), I think.
- I've reproduced this with optimized 3.15.0b4, and
--with-pydebug --enable-experimental-jitbuilds of 3.15 (1667a6c) and main (b86a41c). - The problem seems to require running at least the bunch of other tests. If you can't reproduce with this set, you can try whole
tests/cover/test_lookup_py37.pyor perhaps even larger part of the test suite.
gdb doesn't seem to be of much help here.
gdb backtrace
#0 0x000055dfc010354b in _PyFrame_GetCode (f=f@entry=0x7fdb5a628b98) at ./Include/internal/pycore_interpframe.h:21
#1 0x000055dfc0108586 in _PyFrame_Stackbase (f=0x7fdb5a628b98) at ./Include/internal/pycore_interpframe.h:102
#2 _Py_assert_within_stack_bounds (frame=0x7fdb5a628b98, stack_pointer=0x7fdb5a628c08,
filename=filename@entry=0x55dfc035222c "executor_cases.c.h", lineno=176) at Python/ceval.c:989
#3 0x000055dfc010861b in _Py_jit_assert_within_stack_bounds (frame=<optimized out>, stack_pointer=<optimized out>,
lineno=<optimized out>) at Python/ceval.c:1007
#4 0x00007fdb5a4c7177 in py::jit:executor ()
#5 0x000055dfc011a0b2 in _PyEval_EvalFrameDefault (tstate=<optimized out>,
frame=0x55dfc0108605 <_Py_jit_assert_within_stack_bounds>, throwflag=0) at Python/generated_cases.c.h:6188
#6 0x000055dfbffd31f3 in _PyEval_EvalFrame (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
frame=frame@entry=0x7fdb5a628b98, throwflag=throwflag@entry=0) at ./Include/internal/pycore_ceval.h:122
#7 0x000055dfbffd329a in gen_send_ex2 (gen=0x7fdb5a628b50, arg=0x0, presult=0x7ffe42ffae50, exc=exc@entry=0)
at Objects/genobject.c:281
#8 0x000055dfbffd3b57 in gen_send_ex (gen=<optimized out>, arg=arg@entry=0x0, presult=presult@entry=0x7ffe42ffae50)
at Objects/genobject.c:374
#9 0x000055dfbffd5595 in gen_iternext (self=<optimized out>) at Objects/genobject.c:767
#10 0x000055dfc00fd438 in builtin_all (module=<optimized out>, iterable=iterable@entry=0x7fdb5a628b50) at Python/bltinmodule.c:399
#11 0x000055dfc0112752 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=0x7fdb5e2494f0, throwflag=0)
at Python/generated_cases.c.h:2712
#12 0x000055dfc012a9fa in _PyEval_EvalFrame (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
frame=frame@entry=0x7fdb5e2482a0, throwflag=throwflag@entry=0) at ./Include/internal/pycore_ceval.h:122
#13 0x000055dfc012abf5 in _PyEval_Vector (tstate=0x55dfc06e67d0 <_PyRuntime+264816>, func=0x7fdb5d158350, locals=locals@entry=0x0,
args=0x7fdb5ae41488, argcount=<optimized out>, kwnames=0x7fdb49c8ddb0) at Python/ceval.c:2172
#14 0x000055dfbffb51fd in _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>,
kwnames=<optimized out>) at Objects/call.c:413
#15 0x000055dfbffb6f0a in _PyObject_VectorcallDictTstate (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5d158350, args=args@entry=0x7ffe42ffb1b0, nargsf=<optimized out>, nargsf@entry=1,
kwargs=kwargs@entry=0x7fdb5a54b590) at Objects/call.c:146
#16 0x000055dfbffb6ff7 in _PyObject_Call_Prepend (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>, callable=0x7fdb5d158350,
obj=obj@entry=0x7fdb5cd98dd0, args=args@entry=0x55dfc06c7120 <_PyRuntime+136128>, kwargs=kwargs@entry=0x7fdb5a54b590)
at Objects/call.c:504
#17 0x000055dfc005d460 in call_method (self=0x7fdb5cd98dd0, attr=<optimized out>, args=0x55dfc06c7120 <_PyRuntime+136128>,
kwds=0x7fdb5a54b590) at Objects/typeobject.c:3031
#18 0x000055dfc005d55b in slot_tp_call (self=<optimized out>, args=<optimized out>, kwds=<optimized out>)
at Objects/typeobject.c:10790
#19 0x000055dfbffb53a7 in _PyObject_MakeTpCall (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5cd98dd0, args=args@entry=0x7ffe42ffb338, nargs=<optimized out>,
keywords=keywords@entry=0x7fdb5c76f8e0) at Objects/call.c:242
#20 0x000055dfbffb55da in _PyObject_VectorcallTstate (tstate=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5cd98dd0, args=args@entry=0x7ffe42ffb338, nargsf=<optimized out>,
kwnames=kwnames@entry=0x7fdb5c76f8e0) at ./Include/internal/pycore_call.h:142
#21 0x000055dfbffb5630 in PyObject_Vectorcall (callable=callable@entry=0x7fdb5cd98dd0, args=args@entry=0x7ffe42ffb338,
nargsf=<optimized out>, kwnames=kwnames@entry=0x7fdb5c76f8e0) at Objects/call.c:327
#22 0x000055dfc01087ff in _Py_VectorCall_StackRefSteal (callable=..., callable@entry=..., arguments=0x7fdb5e248290,
total_args=total_args@entry=1, kwnames=...) at Python/ceval.c:726
#23 0x000055dfc0114987 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=0x7fdb5e248228, throwflag=0)
at Python/generated_cases.c.h:3686
#24 0x000055dfc012a9fa in _PyEval_EvalFrame (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
frame=frame@entry=0x7fdb5e247f38, throwflag=throwflag@entry=0) at ./Include/internal/pycore_ceval.h:122
#25 0x000055dfc012abf5 in _PyEval_Vector (tstate=0x55dfc06e67d0 <_PyRuntime+264816>, func=0x7fdb5d158350, locals=locals@entry=0x0,
args=0x7fdb5c8bbf48, argcount=<optimized out>, kwnames=0x7fdb4fec7700) at Python/ceval.c:2172
#26 0x000055dfbffb51fd in _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>,
kwnames=<optimized out>) at Objects/call.c:413
#27 0x000055dfbffb6f0a in _PyObject_VectorcallDictTstate (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5d158350, args=args@entry=0x7ffe42ffb6e0, nargsf=<optimized out>, nargsf@entry=1,
kwargs=kwargs@entry=0x7fdb4ff245f0) at Objects/call.c:146
#28 0x000055dfbffb6ff7 in _PyObject_Call_Prepend (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>, callable=0x7fdb5d158350,
obj=obj@entry=0x7fdb5cdedbb0, args=args@entry=0x55dfc06c7120 <_PyRuntime+136128>, kwargs=kwargs@entry=0x7fdb4ff245f0)
at Objects/call.c:504
#29 0x000055dfc005d460 in call_method (self=self@entry=0x7fdb5cdedbb0, attr=<optimized out>,
args=args@entry=0x55dfc06c7120 <_PyRuntime+136128>, kwds=kwds@entry=0x7fdb4ff245f0) at Objects/typeobject.c:3031
#30 0x000055dfc005d55b in slot_tp_call (self=self@entry=0x7fdb5cdedbb0, args=args@entry=0x55dfc06c7120 <_PyRuntime+136128>,
kwds=kwds@entry=0x7fdb4ff245f0) at Objects/typeobject.c:10790
#31 0x000055dfbffb73a0 in _PyObject_Call (tstate=0x55dfc06e67d0 <_PyRuntime+264816>, callable=callable@entry=0x7fdb5cdedbb0,
args=args@entry=0x55dfc06c7120 <_PyRuntime+136128>, kwargs=0x7fdb4ff245f0) at Objects/call.c:361
#32 0x000055dfbffb7475 in PyObject_Call (callable=callable@entry=0x7fdb5cdedbb0, args=args@entry=0x55dfc06c7120 <_PyRuntime+136128>,
kwargs=<optimized out>) at Objects/call.c:373
#33 0x000055dfc0112ad2 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=0x7fdb5e247ea8, throwflag=0)
at Python/generated_cases.c.h:2831
#34 0x000055dfc012a9fa in _PyEval_EvalFrame (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
frame=frame@entry=0x7fdb5e247930, throwflag=throwflag@entry=0) at ./Include/internal/pycore_ceval.h:122
#35 0x000055dfc012abf5 in _PyEval_Vector (tstate=0x55dfc06e67d0 <_PyRuntime+264816>, func=0x7fdb5d158350, locals=locals@entry=0x0,
args=0x7fdb5c61b648, argcount=<optimized out>, kwnames=0x7fdb4fef1d90) at Python/ceval.c:2172
#36 0x000055dfbffb51fd in _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>,
kwnames=<optimized out>) at Objects/call.c:413
#37 0x000055dfbffb6f0a in _PyObject_VectorcallDictTstate (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5d158350, args=args@entry=0x7ffe42ffbb20, nargsf=<optimized out>, nargsf@entry=1,
kwargs=kwargs@entry=0x7fdb4ff212b0) at Objects/call.c:146
#38 0x000055dfbffb6ff7 in _PyObject_Call_Prepend (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>, callable=0x7fdb5d158350,
obj=obj@entry=0x7fdb5cdec650, args=args@entry=0x55dfc06c7120 <_PyRuntime+136128>, kwargs=kwargs@entry=0x7fdb4ff212b0)
at Objects/call.c:504
#39 0x000055dfc005d460 in call_method (self=0x7fdb5cdec650, attr=<optimized out>, args=0x55dfc06c7120 <_PyRuntime+136128>,
kwds=0x7fdb4ff212b0) at Objects/typeobject.c:3031
#40 0x000055dfc005d55b in slot_tp_call (self=<optimized out>, args=<optimized out>, kwds=<optimized out>)
at Objects/typeobject.c:10790
#41 0x000055dfbffb53a7 in _PyObject_MakeTpCall (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5cdec650, args=args@entry=0x7ffe42ffbca8, nargs=<optimized out>,
keywords=keywords@entry=0x7fdb5d119850) at Objects/call.c:242
#42 0x000055dfbffb55da in _PyObject_VectorcallTstate (tstate=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5cdec650, args=args@entry=0x7ffe42ffbca8, nargsf=<optimized out>,
kwnames=kwnames@entry=0x7fdb5d119850) at ./Include/internal/pycore_call.h:142
#43 0x000055dfbffb5630 in PyObject_Vectorcall (callable=callable@entry=0x7fdb5cdec650, args=args@entry=0x7ffe42ffbca8,
nargsf=<optimized out>, kwnames=kwnames@entry=0x7fdb5d119850) at Objects/call.c:327
#44 0x000055dfc01087ff in _Py_VectorCall_StackRefSteal (callable=..., callable@entry=..., arguments=0x7fdb5e247918,
total_args=total_args@entry=2, kwnames=...) at Python/ceval.c:726
#45 0x000055dfc0114987 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=0x7fdb5e247888, throwflag=0)
at Python/generated_cases.c.h:3686
#46 0x000055dfc012a9fa in _PyEval_EvalFrame (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
frame=frame@entry=0x7fdb5e247618, throwflag=throwflag@entry=0) at ./Include/internal/pycore_ceval.h:122
#47 0x000055dfc012abf5 in _PyEval_Vector (tstate=0x55dfc06e67d0 <_PyRuntime+264816>, func=0x7fdb5d158350, locals=locals@entry=0x0,
args=0x7fdb5c8bb828, argcount=<optimized out>, kwnames=0x7fdb5af16300) at Python/ceval.c:2172
#48 0x000055dfbffb51fd in _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>,
kwnames=<optimized out>) at Objects/call.c:413
#49 0x000055dfbffb6f0a in _PyObject_VectorcallDictTstate (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5d158350, args=args@entry=0x7ffe42ffc050, nargsf=<optimized out>, nargsf@entry=1,
kwargs=kwargs@entry=0x7fdb5ada0a10) at Objects/call.c:146
#50 0x000055dfbffb6ff7 in _PyObject_Call_Prepend (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>, callable=0x7fdb5d158350,
obj=obj@entry=0x7fdb5cdecb90, args=args@entry=0x55dfc06c7120 <_PyRuntime+136128>, kwargs=kwargs@entry=0x7fdb5ada0a10)
at Objects/call.c:504
#51 0x000055dfc005d460 in call_method (self=0x7fdb5cdecb90, attr=<optimized out>, args=0x55dfc06c7120 <_PyRuntime+136128>,
kwds=0x7fdb5ada0a10) at Objects/typeobject.c:3031
#52 0x000055dfc005d55b in slot_tp_call (self=<optimized out>, args=<optimized out>, kwds=<optimized out>)
at Objects/typeobject.c:10790
#53 0x000055dfbffb53a7 in _PyObject_MakeTpCall (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5cdecb90, args=args@entry=0x7ffe42ffc1f8, nargs=<optimized out>,
keywords=keywords@entry=0x7fdb5cd6c870) at Objects/call.c:242
#54 0x000055dfbffb55da in _PyObject_VectorcallTstate (tstate=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5cdecb90, args=args@entry=0x7ffe42ffc1f8, nargsf=<optimized out>,
kwnames=kwnames@entry=0x7fdb5cd6c870) at ./Include/internal/pycore_call.h:142
#55 0x000055dfbffb5630 in PyObject_Vectorcall (callable=callable@entry=0x7fdb5cdecb90, args=args@entry=0x7ffe42ffc1f8,
nargsf=<optimized out>, kwnames=kwnames@entry=0x7fdb5cd6c870) at Objects/call.c:327
#56 0x000055dfc0108971 in _Py_VectorCallInstrumentation_StackRefSteal (callable=..., callable@entry=...,
arguments=arguments@entry=0x7fdb5e247608, total_args=total_args@entry=1, kwnames=kwnames@entry=...,
call_instrumentation=call_instrumentation@entry=false, frame=frame@entry=0x7fdb5e247598, this_instr=0x7fdb5cafc532,
tstate=0x55dfc06e67d0 <_PyRuntime+264816>) at Python/ceval.c:768
#57 0x000055dfc0114062 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=0x7fdb5e247598, throwflag=0)
at Python/generated_cases.c.h:3474
#58 0x000055dfc012a9fa in _PyEval_EvalFrame (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
frame=frame@entry=0x7fdb5e2471e0, throwflag=throwflag@entry=0) at ./Include/internal/pycore_ceval.h:122
#59 0x000055dfc012abf5 in _PyEval_Vector (tstate=0x55dfc06e67d0 <_PyRuntime+264816>, func=0x7fdb5d158350, locals=locals@entry=0x0,
args=0x7fdb5c8b8a68, argcount=<optimized out>, kwnames=0x7fdb5c36cfa0) at Python/ceval.c:2172
#60 0x000055dfbffb51fd in _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>,
kwnames=<optimized out>) at Objects/call.c:413
#61 0x000055dfbffb6f0a in _PyObject_VectorcallDictTstate (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5d158350, args=args@entry=0x7ffe42ffc5b0, nargsf=<optimized out>, nargsf@entry=1,
kwargs=kwargs@entry=0x7fdb5cc39d30) at Objects/call.c:146
#62 0x000055dfbffb6ff7 in _PyObject_Call_Prepend (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>, callable=0x7fdb5d158350,
obj=obj@entry=0x7fdb5cd9b2f0, args=args@entry=0x55dfc06c7120 <_PyRuntime+136128>, kwargs=kwargs@entry=0x7fdb5cc39d30)
at Objects/call.c:504
#63 0x000055dfc005d460 in call_method (self=0x7fdb5cd9b2f0, attr=<optimized out>, args=0x55dfc06c7120 <_PyRuntime+136128>,
#64 0x000055dfc005d55b in slot_tp_call (self=<optimized out>, args=<optimized out>, kwds=<optimized out>)
at Objects/typeobject.c:10790
#65 0x000055dfbffb53a7 in _PyObject_MakeTpCall (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5cd9b2f0, args=args@entry=0x7ffe42ffc758, nargs=<optimized out>,
keywords=keywords@entry=0x7fdb5d58a3f0) at Objects/call.c:242
#66 0x000055dfbffb55da in _PyObject_VectorcallTstate (tstate=0x55dfc06e67d0 <_PyRuntime+264816>,
callable=callable@entry=0x7fdb5cd9b2f0, args=args@entry=0x7ffe42ffc758, nargsf=<optimized out>,
kwnames=kwnames@entry=0x7fdb5d58a3f0) at ./Include/internal/pycore_call.h:142
#67 0x000055dfbffb5630 in PyObject_Vectorcall (callable=callable@entry=0x7fdb5cd9b2f0, args=args@entry=0x7ffe42ffc758,
nargsf=<optimized out>, kwnames=kwnames@entry=0x7fdb5d58a3f0) at Objects/call.c:327
#68 0x000055dfc0108971 in _Py_VectorCallInstrumentation_StackRefSteal (callable=..., callable@entry=...,
arguments=arguments@entry=0x7fdb5e2471c0, total_args=total_args@entry=1, kwnames=kwnames@entry=...,
call_instrumentation=call_instrumentation@entry=false, frame=frame@entry=0x7fdb5e247120, this_instr=0x55dfffb73e52,
tstate=0x55dfc06e67d0 <_PyRuntime+264816>) at Python/ceval.c:768
#69 0x000055dfc0114062 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=0x7fdb5e247120, throwflag=0)
at Python/generated_cases.c.h:3474
#70 0x000055dfc012a9fa in _PyEval_EvalFrame (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>,
frame=frame@entry=0x7fdb5e247020, throwflag=throwflag@entry=0) at ./Include/internal/pycore_ceval.h:122
#71 0x000055dfc012abf5 in _PyEval_Vector (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>, func=func@entry=0x7fdb5d666b10,
locals=locals@entry=0x7fdb5d66a750, args=args@entry=0x0, argcount=argcount@entry=0, kwnames=kwnames@entry=0x0)
at Python/ceval.c:2172
#72 0x000055dfc012ad0a in PyEval_EvalCode (co=co@entry=0x55dfff886610, globals=globals@entry=0x7fdb5d66a750,
locals=locals@entry=0x7fdb5d66a750) at Python/ceval.c:679
#73 0x000055dfc028407c in run_eval_code_obj (tstate=tstate@entry=0x55dfc06e67d0 <_PyRuntime+264816>, co=co@entry=0x55dfff886610,
globals=globals@entry=0x7fdb5d66a750, locals=locals@entry=0x7fdb5d66a750) at Python/pythonrun.c:1406
#74 0x000055dfc0284698 in run_mod (mod=mod@entry=0x55dfff8cfe90, filename=filename@entry=0x7fdb5d557b40,
globals=globals@entry=0x7fdb5d66a750, locals=locals@entry=0x7fdb5d66a750, flags=flags@entry=0x7ffe42ffccb8,
arena=arena@entry=0x7fdb5d66a800, interactive_src=0x0, generate_new_source=0) at Python/pythonrun.c:1509
#75 0x000055dfc0284fe7 in _PyRun_File (fp=fp@entry=0x55dfff703bb0, filename=filename@entry=0x7fdb5d557b40, start=start@entry=257,
globals=globals@entry=0x7fdb5d66a750, locals=locals@entry=0x7fdb5d66a750, closeit=closeit@entry=1, flags=0x7ffe42ffccb8)
at Python/pythonrun.c:1332
#76 0x000055dfc0285d44 in _PyRun_SimpleFile (fp=fp@entry=0x55dfff703bb0, filename=filename@entry=0x7fdb5d557b40,
closeit=closeit@entry=1, flags=flags@entry=0x7ffe42ffccb8) at Python/pythonrun.c:544
#77 0x000055dfc0286a7d in _PyRun_AnyFile (fp=fp@entry=0x55dfff703bb0, filename=filename@entry=0x7fdb5d557b40,
closeit=closeit@entry=1, flags=flags@entry=0x7ffe42ffccb8) at Python/pythonrun.c:92
#78 0x000055dfc02b4452 in pymain_run_file_obj (filename=filename@entry=0x7fdb5d557b40, skip_source_first_line=0) at Modules/main.c:478
#79 0x000055dfc02b457b in pymain_run_file (config=config@entry=0x55dfc06c90c0 <_PyRuntime+144224>) at Modules/main.c:494
#80 0x000055dfc02b4a28 in pymain_run_python (exitcode=exitcode@entry=0x7ffe42ffce24) at Modules/main.c:804
#81 0x000055dfc02b4cea in Py_RunMain () at Modules/main.c:891
#82 0x000055dfc02b4d61 in pymain_main (args=args@entry=0x7ffe42ffce80) at Modules/main.c:921
#83 0x000055dfc02b4e2f in Py_BytesMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:945
#84 0x000055dfbff0d266 in main (argc=<optimized out>, argv=<optimized out>) at ./Programs/python.c:15
Stepping repeats roughly the following sequence:
0x00007fdb5a4c7026 in py::jit:executor ()
Single stepping until exit from function py::jit:executor,
which has no line number information.
_Py_jit_assert_within_stack_bounds (frame=0x7fdb5a628b98, stack_pointer=0x7fdb5a628c08, lineno=193) at Python/ceval.c:1007
_Py_assert_within_stack_bounds (frame=0x7fdb5a628b98, stack_pointer=0x7fdb5a628c08,
filename=filename@entry=0x55dfc035222c "executor_cases.c.h", lineno=193) at Python/ceval.c:985
_PyFrame_Stackbase (f=0x7fdb5a628b98) at ./Include/internal/pycore_interpframe.h:102
_PyFrame_GetCode (f=f@entry=0x7fdb5a628b98) at ./Include/internal/pycore_interpframe.h:21
PyStackRef_AsPyObjectBorrow (ref=...) at ./Include/internal/pycore_stackref.h:441
_PyFrame_GetCode (f=f@entry=0x7fdb5a628b98) at ./Include/object.h:234
_Py_assert_within_stack_bounds (frame=0x7fdb5a628b98, stack_pointer=0x7fdb5a628c08,
filename=filename@entry=0x55dfc035222c "executor_cases.c.h", lineno=193) at Python/ceval.c:990
CPython versions tested on:
3.15, CPython main branch
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
Abhi210 commentedon Jul 26, 2026
I will have a look at this
mgorny commentedon Jul 26, 2026
Thank you. I hope you can reproduce easily.
Abhi210 commentedon Jul 28, 2026
Can confirm this bug on Linux. Give me some time. I will look over this on the weekend.
mgorny commentedon Jul 28, 2026
No problem. I suppose you can't think of any "easy" workaround, short of reinstalling Python without JIT?
gh-154701: prevent executor self-links in JIT cold exits (GH-155323)
pythongh-154701: prevent executor self-links in JIT cold exits (pytho…
pythongh-154701: adapt JIT cold exit backport to 3.15
[3.15] gh-154701: prevent executor self-links in JIT cold exits (GH-1…