#13501·sqlalchemy

Investigate greenlet crash on T build

Author: CaselITCreated Aug 11, 2026Updated Sep 15, 2026
Labelssetupexternal library/application issues

The last PR publish does a core dump on t build seemingly due to greenlet: https://github.com/sqlalchemy/sqlalchemy/actions/runs/31526244397/job/93895163223

 sh -c 'python -s -m pytest -c /project/pyproject.toml -n4 -q --nomemory --notimingintensive --nomypy /project/test'
    Fatal Python error: Segmentation fault
    
    Current thread 0x00007f26488de400 [python] (most recent call first):
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 190 in greenlet_spawn
      File "/opt/python/cp314-cp314t/lib/python3.14t/asyncio/events.py", line 94 in _run
      File "/opt/python/cp314-cp314t/lib/python3.14t/asyncio/base_events.py", line 2046 in _run_once
      File "/opt/python/cp314-cp314t/lib/python3.14t/asyncio/base_events.py", line 677 in run_forever
      File "/opt/python/cp314-cp314t/lib/python3.14t/asyncio/base_events.py", line 706 in run_until_complete
      File "/opt/python/cp314-cp314t/lib/python3.14t/asyncio/runners.py", line 127 in run
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/sqlalchemy/util/concurrency.py", line 64 in run_in_greenlet
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/sqlalchemy/testing/asyncio.py", line 58 in _assume_async
      File "/project/test/../lib/sqlalchemy/testing/plugin/pytestplugin.py", line 172 in pytest_sessionstart
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/pluggy/_callers.py", line 121 in _multicall
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/pluggy/_manager.py", line 120 in _hookexec
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/pluggy/_hooks.py", line 512 in __call__
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/_pytest/main.py", line 328 in wrap_session
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/_pytest/main.py", line 377 in pytest_cmdline_main
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/pluggy/_callers.py", line 121 in _multicall
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/pluggy/_manager.py", line 120 in _hookexec
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/pluggy/_hooks.py", line 512 in __call__
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/_pytest/config/__init__.py", line 229 in _main
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/_pytest/config/__init__.py", line 253 in _console_main
      File "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/pytest/__main__.py", line 9 in <module>
      File "<frozen runpy>", line 88 in _run_code
      File "<frozen runpy>", line 198 in _run_module_as_main
    
    Current thread's C stack trace (most recent call first):
      Binary file "python", at _Py_DumpStack+0x3a [0x66f07a]
      Binary file "python" [0x684312]
      Binary file "/lib64/libpthread.so.0", at +0x12990 [0x7f26484a8990]
      Binary file "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/greenlet/_greenlet.cpython-314t-x86_64-linux-gnu.so", at _ZN8greenlet11PythonState20capture_c_stack_refsEPK3_ts+0xa0 [0x7f2645fb7c50]
      Binary file "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/greenlet/_greenlet.cpython-314t-x86_64-linux-gnu.so", at _ZN8greenlet8Greenlet13g_switchstackEv+0xba [0x7f2645fb7e3a]
      Binary file "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/greenlet/_greenlet.cpython-314t-x86_64-linux-gnu.so", at _ZN8greenlet12UserGreenlet13g_initialstubEPv+0x415 [0x7f2645fb7415]
      Binary file "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/greenlet/_greenlet.cpython-314t-x86_64-linux-gnu.so", at _ZN8greenlet12UserGreenlet8g_switchEv+0x162 [0x7f2645fb51a2]
      Binary file "/tmp/tmp.pc9nN1Uf09/venv/lib/python3.14t/site-packages/greenlet/_greenlet.cpython-314t-x86_64-linux-gnu.so", at +0x113e7 [0x7f2645fb43e7]
      Binary file "python" [0x4e0d52]
      Binary file "python" [0x47da5c]
      Binary file "python", at _PyEval_EvalFrameDefault+0x5c19 [0x5d05c9]
      Binary file "python" [0x49db05]
      Binary file "/opt/python/cp314-cp314t/lib/python3.14t/lib-dynload/_asyncio.cpython-314t-x86_64-linux-gnu.so", at +0xde99 [0x7f2645fcfe99]
      Binary file "/opt/python/cp314-cp314t/lib/python3.14t/lib-dynload/_asyncio.cpython-314t-x86_64-linux-gnu.so", at +0xf8b9 [0x7f2645fd18b9]
      Binary file "/opt/python/cp314-cp314t/lib/python3.14t/lib-dynload/_asyncio.cpython-314t-x86_64-linux-gnu.so", at +0xfe85 [0x7f2645fd1e85]
      Binary file "python", at _PyObject_MakeTpCall+0xc0 [0x47b930]
      Binary file "python" [0x5fc724]
      Binary file "python", at _PyEval_EvalFrameDefault+0x5c19 [0x5d05c9]
      Binary file "python" [0x5de82e]
      Binary file "python" [0x47f4b2]
      Binary file "python", at _PyEval_EvalFrameDefault+0x5c19 [0x5d05c9]
      Binary file "python" [0x5de82e]
      Binary file "python" [0x47d660]
      Binary file "python" [0x47d800]
      Binary file "python" [0x51ffd1]
      Binary file "python", at _PyObject_MakeTpCall+0xc0 [0x47b930]
      Binary file "python", at _PyEval_EvalFrameDefault+0x3f1c [0x5ce8cc]
      Binary file "python" [0x5de82e]
      Binary file "python" [0x47d660]
      Binary file "python" [0x47d800]
      Binary file "python" [0x51ffd1]
      Binary file "python", at _PyObject_MakeTpCall+0xc0 [0x47b930]
      <truncated rest of calls>

also windows also fail