| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Bug Report
mypyc compiled modules sometimes segfault
Here's one log (compiled using mypy 1.20.0)
Fatal Python error: Segmentation fault
Thread 0x00007f8e3a5ff6c0 [python] (most recent call first):
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/execnet/gateway_base.py", line 534 in read
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/execnet/gateway_base.py", line 567 in from_io
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/execnet/gateway_base.py", line 1160 in _thread_receiver
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/execnet/gateway_base.py", line 341 in run
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/execnet/gateway_base.py", line 411 in _perform_spawn
Current thread 0x00007f8e3c032b80 [python] (most recent call first):
Garbage-collecting
File "<string>", line 2 in __init__
File "/home/runner/work/schema_salad/schema_salad/schema_salad/tests/test_python_codegen.py", line 68 in python_codegen
File "/home/runner/work/schema_salad/schema_salad/schema_salad/tests/test_python_codegen.py", line 36 in test_meta_schema_gen
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/_pytest/python.py", line 166 in pytest_pyfunc_call
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_callers.py", line 121 in _multicall
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_manager.py", line 120 in _hookexec
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_hooks.py", line 512 in __call__
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/_pytest/python.py", line 1720 in runtest
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/_pytest/runner.py", line 179 in pytest_runtest_call
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_callers.py", line 121 in _multicall
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_manager.py", line 120 in _hookexec
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_hooks.py", line 512 in __call__
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/_pytest/runner.py", line 245 in <lambda>
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/_pytest/runner.py", line 353 in from_call
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/_pytest/runner.py", line 244 in call_and_report
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/_pytest/runner.py", line 137 in runtestprotocol
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/_pytest/runner.py", line 118 in pytest_runtest_protocol
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_callers.py", line 121 in _multicall
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_manager.py", line 120 in _hookexec
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_hooks.py", line 512 in __call__
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/xdist/remote.py", line 227 in run_one_test
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/xdist/remote.py", line 206 in pytest_runtestloop
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_callers.py", line 121 in _multicall
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_manager.py", line 120 in _hookexec
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_hooks.py", line 512 in __call__
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/_pytest/main.py", line 372 in _main
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/_pytest/main.py", line 318 in wrap_session
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/_pytest/main.py", line 365 in pytest_cmdline_main
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_callers.py", line 121 in _multicall
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_manager.py", line 120 in _hookexec
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/pluggy/_hooks.py", line 512 in __call__
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/xdist/remote.py", line 427 in <module>
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/execnet/gateway_base.py", line 1291 in executetask
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/execnet/gateway_base.py", line 341 in run
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/execnet/gateway_base.py", line 411 in _perform_spawn
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/execnet/gateway_base.py", line 389 in integrate_as_primary_thread
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/execnet/gateway_base.py", line 1273 in serve
File "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/execnet/gateway_base.py", line 1806 in serve
File "<string>", line 8 in <module>
File "<string>", line 1 in <module>
Current thread's C stack trace (most recent call first):
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at _Py_DumpStack+0x47 [0x7f8e3bb6947e]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at +0x1724d4 [0x7f8e3bb724d4]
Binary file "/lib/x86_64-linux-gnu/libc.so.6", at +0x45330 [0x7f8e3b645330]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at +0x2489ab [0x7f8e3bc489ab]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at +0x1ecb19 [0x7f8e3bbecb19]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at +0x2e847f [0x7f8e3bce847f]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at _Py_HandlePending+0x38 [0x7f8e3bcea2f8]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at _PyEval_EvalFrameDefault+0xd71b [0x7f8e3bc3785b]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at +0x229112 [0x7f8e3bc29112]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at +0x1c658a [0x7f8e3bbc658a]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at +0x203513 [0x7f8e3bc03513]
Binary file "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/fd7dcdb10166ebd4db98__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_pytokens___Token+0x3b [0x7f8e336275db]
Binary file "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/fd7dcdb10166ebd4db98__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_pytokens___TokenIterator___make_token+0x478 [0x7f8e3362a248]
Binary file "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/fd7dcdb10166ebd4db98__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_pytokens___TokenIterator_____next__+0x38cb [0x7f8e3363b0ab]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at PyIter_Next+0x14 [0x7f8e3bbb9924]
Binary file "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/30fcd23745efe32ce681__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_tokenize___tokenize_gen_____mypyc_generator_helper__+0x119f [0x7f8e334d452f]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at +0x227c48 [0x7f8e3bc27c48]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at PyObject_Vectorcall+0x53 [0x7f8e3bbc5743]
Binary file "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/30fcd23745efe32ce681__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_driver___TokenProxy_____next__+0x427 [0x7f8e334954d7]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at PyIter_Next+0x14 [0x7f8e3bbb9924]
Binary file "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/30fcd23745efe32ce681__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_driver___Driver___parse_tokens+0x180b [0x7f8e334974cb]
Binary file "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/30fcd23745efe32ce681__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_driver___Driver___parse_string+0x4e [0x7f8e333f560e]
Binary file "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/30fcd23745efe32ce681__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_parsing___lib2to3_parse+0x534 [0x7f8e332ca524]
Binary file "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/30fcd23745efe32ce681__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_black____format_str_once+0x212 [0x7f8e332c7152]
Binary file "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/30fcd23745efe32ce681__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_black___format_str+0x9f [0x7f8e332c2d3f]
Binary file "/home/runner/work/schema_salad/schema_salad/.tox/py314-mypy/lib/python3.14/site-packages/30fcd23745efe32ce681__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyPy_black___format_str+0x72 [0x7f8e332c9f92]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at PyObject_Vectorcall+0x53 [0x7f8e3bbc5743]
Binary file "/home/runner/work/schema_salad/schema_salad/5df31530eea7292b5dae__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_python_codegen___fmt+0x249 [0x7f8e382cb559]
Binary file "/home/runner/work/schema_salad/schema_salad/5df31530eea7292b5dae__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_python_codegen___PythonCodeGen___end_class+0x443 [0x7f8e382ed253]
Binary file "/home/runner/work/schema_salad/schema_salad/5df31530eea7292b5dae__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_codegen___codegen+0xc43c [0x7f8e383abd8c]
Binary file "/home/runner/work/schema_salad/schema_salad/5df31530eea7292b5dae__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyPy_codegen___codegen+0x2aa [0x7f8e383ae95a]
Binary file "/opt/hostedtoolcache/Python/3.14.3/x64/lib/libpython3.14.so.1.0", at PyObject_Vectorcall+0x53 [0x7f8e3bbc5743]
<truncated rest of calls>
Extension modules: schema_salad, schema_salad.utils, charset_normalizer.md, charset_normalizer.cd, requests.packages.charset_normalizer.md, requests.packages.chardet.md, requests.packages.charset_normalizer.cd, requests.packages.chardet.cd, schema_salad.jsonld_context, schema_salad.sourceline, schema_salad.ref_resolver, msgpack._cmsgpack, schema_salad.validate, schema_salad.avro, schema_salad.avro.schema, schema_salad.schema, schema_salad.codegen, schema_salad.codegen_base, schema_salad.cpp_codegen, schema_salad.dlang_codegen, schema_salad.dotnet_codegen, schema_salad.java_codegen, schema_salad.python_codegen, black.const, black.mode, black.cache, black._width_table, blib2to3.pgen2.token, blib2to3.pgen2.grammar, blib2to3.pytree, black.strings, pytokens, blib2to3.pgen2.tokenize, blib2to3.pgen2.parse, blib2to3.pgen2.pgen, blib2to3.pgen2.driver, blib2to3.pygram, black.nodes, black.comments, black.handle_ipynb_magics, black.brackets, black.lines, black.numerics, black.rusty, black.trans, black.linegen, black.parsing, black.ranges, black, schema_salad.typescript_codegen, schema_salad.makedoc, schema_salad.main (total: 52)
Fatal Python error: Segmentation fault 116s 116s Thread 0x00007f428ac5d6c0 [python3.14] (most recent call first): 116s File "/usr/lib/python3/dist-packages/execnet/gateway_base.py", line 534 in read 116s File "/usr/lib/python3/dist-packages/execnet/gateway_base.py", line 567 in from_io 116s File "/usr/lib/python3/dist-packages/execnet/gateway_base.py", line 1160 in _thread_receiver 116s File "/usr/lib/python3/dist-packages/execnet/gateway_base.py", line 341 in run 116s File "/usr/lib/python3/dist-packages/execnet/gateway_base.py", line 411 in _perform_spawn 116s 116s Current thread 0x00007f428bc59200 [python3.14] (most recent call first): 116s Garbage-collecting 116s File "<string>", line 2 in __init__ 116s File "/usr/lib/python3/dist-packages/schema_salad/tests/test_python_codegen.py", line 68 in python_codegen 116s File "/usr/lib/python3/dist-packages/schema_salad/tests/test_python_codegen.py", line 81 in test_default_parser_info 116s File "/usr/lib/python3/dist-packages/_pytest/python.py", line 166 in pytest_pyfunc_call 116s File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 121 in _multicall 116s File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120 in _hookexec 116s File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 512 in __call__ 116s File "/usr/lib/python3/dist-packages/_pytest/python.py", line 1720 in runtest 116s File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 179 in pytest_runtest_call 116s File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 121 in _multicall 116s File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120 in _hookexec 116s File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 512 in __call__ 116s File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 245 in <lambda> 116s File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 353 in from_call 116s File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 244 in call_and_report 116s File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 137 in runtestprotocol 116s File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 118 in pytest_runtest_protocol 116s File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 121 in _multicall 116s File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120 in _hookexec 116s File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 512 in __call__ 116s File "/usr/lib/python3/dist-packages/xdist/remote.py", line 227 in run_one_test 116s File "/usr/lib/python3/dist-packages/xdist/remote.py", line 206 in pytest_runtestloop 116s File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 121 in _multicall 116s File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120 in _hookexec 116s File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 512 in __call__ 116s File "/usr/lib/python3/dist-packages/_pytest/main.py", line 372 in _main 116s File "/usr/lib/python3/dist-packages/_pytest/main.py", line 318 in wrap_session 116s File "/usr/lib/python3/dist-packages/_pytest/main.py", line 365 in pytest_cmdline_main 116s File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 121 in _multicall 116s File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120 in _hookexec 116s File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 512 in __call__ 116s File "/usr/lib/python3/dist-packages/xdist/remote.py", line 427 in <module> 116s File "/usr/lib/python3/dist-packages/execnet/gateway_base.py", line 1291 in executetask 116s File "/usr/lib/python3/dist-packages/execnet/gateway_base.py", line 341 in run 116s File "/usr/lib/python3/dist-packages/execnet/gateway_base.py", line 411 in _perform_spawn 116s File "/usr/lib/python3/dist-packages/execnet/gateway_base.py", line 389 in integrate_as_primary_thread 116s File "/usr/lib/python3/dist-packages/execnet/gateway_base.py", line 1273 in serve 116s File "/usr/lib/python3/dist-packages/execnet/gateway_base.py", line 1806 in serve 116s File "<string>", line 8 in <module> 116s File "<string>", line 1 in <module> 116s 116s Current thread's C stack trace (most recent call first): 116s Binary file "/usr/bin/python3.14", at _Py_DumpStack+0x4a [0x471b87] 116s Binary file "/usr/bin/python3.14" [0x4f935c] 116s Binary file "/usr/lib/x86_64-linux-gnu/libc.so.6", at +0x40a70 [0x7f428bc9aa70] 116s Binary file "/usr/bin/python3.14" [0x5f881c] 116s Binary file "/usr/bin/python3.14" [0x613b66] 116s Binary file "/usr/bin/python3.14" [0x612b6a] 116s Binary file "/usr/bin/python3.14" [0x557bb0] 116s Binary file "/usr/bin/python3.14", at _Py_HandlePending+0x3b [0x67baab] 116s Binary file "/usr/bin/python3.14", at _PyEval_EvalFrameDefault+0xeab2 [0x551732] 116s Binary file "/usr/bin/python3.14" [0x581384] 116s Binary file "/usr/bin/python3.14" [0x52cbbe] 116s Binary file "/usr/bin/python3.14" [0x589d9c] 116s Binary file "/usr/lib/python3/dist-packages/fd7dcdb10166ebd4db98__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_pytokens___Token+0x3f [0x7f428827b54f] 116s Binary file "/usr/lib/python3/dist-packages/fd7dcdb10166ebd4db98__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_pytokens___TokenIterator___make_token+0x4ea [0x7f428827e57a] 116s Binary file "/usr/lib/python3/dist-packages/fd7dcdb10166ebd4db98__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_pytokens___TokenIterator_____next__+0x3467 [0x7f428828f307] 116s Binary file "/usr/bin/python3.14", at PyIter_Next+0x12 [0x521db2] 116s Binary file "/usr/lib/python3/dist-packages/fec286f4eda846987175__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_tokenize___tokenize_gen_____mypyc_generator_helper__+0x420 [0x7f4283f082d0] 116s Binary file "/usr/bin/python3.14" [0x60e1bd] 116s Binary file "/usr/bin/python3.14", at PyObject_Vectorcall+0x32 [0x52b902] 116s Binary file "/usr/lib/python3/dist-packages/fec286f4eda846987175__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_driver___TokenProxy_____next__+0x1d2 [0x7f4283d39492] 116s Binary file "/usr/bin/python3.14", at PyIter_Next+0x12 [0x521db2] 116s Binary file "/usr/lib/python3/dist-packages/fec286f4eda846987175__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_driver___Driver___parse_tokens+0xb60 [0x7f4283ef3290] 116s Binary file "/usr/lib/python3/dist-packages/fec286f4eda846987175__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_driver___Driver___parse_string+0x4d [0x7f4283f0e20d] 116s Binary file "/usr/lib/python3/dist-packages/fec286f4eda846987175__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_parsing___lib2to3_parse+0x1c6 [0x7f4283f0e476] 116s Binary file "/usr/lib/python3/dist-packages/fec286f4eda846987175__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_black____format_str_once+0xe3 [0x7f4283f10a53] 116s Binary file "/usr/lib/python3/dist-packages/fec286f4eda846987175__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_black___format_str+0x50 [0x7f4283f12850] 116s Binary file "/usr/lib/python3/dist-packages/fec286f4eda846987175__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyPy_black___format_str+0x7c [0x7f4283f12cac] 116s Binary file "/usr/bin/python3.14", at PyObject_Vectorcall+0x32 [0x52b902] 116s Binary file "/usr/lib/python3/dist-packages/5df31530eea7292b5dae__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_python_codegen___fmt+0x24c [0x7f428912f66c] 116s Binary file "/usr/lib/python3/dist-packages/5df31530eea7292b5dae__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_python_codegen___PythonCodeGen___begin_class+0x117 [0x7f428914e647] 116s Binary file "/usr/lib/python3/dist-packages/5df31530eea7292b5dae__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyDef_codegen___codegen+0xdc76 [0x7f428920ece6] 116s Binary file "/usr/lib/python3/dist-packages/5df31530eea7292b5dae__mypyc.cpython-314-x86_64-linux-gnu.so", at CPyPy_codegen___codegen+0x2ca [0x7f428920f78a] 116s <truncated rest of calls> 116s 117s Extension modules: schema_salad, _ruamel_yaml, charset_normalizer.md, schema_salad.utils, schema_salad.sourceline, schema_salad.jsonld_context, msgpack._cmsgpack, schema_salad.ref_resolver, schema_salad.avro., schema_salad.avro.schema, schema_salad.validate, schema_salad.schema, schema_salad.codegen_base, schema_salad.cpp_codegen, schema_salad.dlang_codegen, schema_salad.java_codegen, schema_salad.dotnet_codegen, _black_version, black.const, black.mode, black.cache, black._width_table, blib2to3.pgen2.token, blib2to3.pgen2.grammar, blib2to3.pytree, black.strings, pytokens, blib2to3.pgen2.tokenize, blib2to3.pgen2.parse, blib2to3.pgen2.pgen, blib2to3.pgen2.driver, blib2to3.pygram, black.nodes, black.comments, black.handle_ipynb_magics, black.brackets, black.lines, black.numerics, black.rusty, black.trans, black.linegen, black.parsing, black.ranges, black, schema_salad.python_codegen, schema_salad.typescript_codegen, schema_salad.codegen, schema_salad.makedoc, schema_salad.main (total: 49)
https://ci.debian.net/packages/p/python-schema-salad/unstable/amd64/69657169/
Never an issue with Python 3.13.x
| Back | FazBrowse Home | New Git URL |
Activity
bjorndbuilder commented on Apr 3, 2026
Just FYI: I had mypy 1.20.0 crashing in my CI with exit code 139 (SIGSERV), which was resolved by passing --cache-dir /dev/null (because the cache dir is not writeable) so that should give a hint where this issue is located in mypy.
mr-c commented on Apr 3, 2026
@hauntsaninja Sorry for not posting this sooner, I was hoping that the 1.20 release was going to fix this problem. If you have issues reproducing I can probably whip up a Dockerfile that does it
mr-c commented on Apr 3, 2026
@bjorndbuilder Thanks for the report; sounds like that is a separate issue (or is a duplicate of #21136 ); this issue is about code that is first successfully compiled with mypyc that then later crashes, so the mypy --cache-dir /dev/null workaround isn't applicable.
hauntsaninja commented on Apr 3, 2026
Yes, if you could share a Dockerfile that would help!
mr-c commented on Apr 4, 2026
@hauntsaninja here you go!
(python3-schema-salad 8.9.20251102115403-1 was compiled with mypy 1.19.1)
the full segfault + stacktrace from using this Dockerfilemr-c commented on Apr 6, 2026
@hauntsaninja I can make a mypy 1.20 example as well, if that would help
mr-c commented on Apr 14, 2026
I'm still seeing these crashes with my 1.20.1
turn off mypyc until python/mypy#21133 is fixed
mr-c commented on Apr 16, 2026
FYI: I've had to disable the use of mypyc for schema-salad as part of the Debian and conda packages. I see that black is also having issue upgrading mypy, but I don't know if that is related: psf/black#5071
hauntsaninja commented on Apr 16, 2026
Black's issue is something else. The failure mode is ModuleNotFoundError: No module named 'black.output'; 'black' is not a package. Maybe related to #21101 from @JukkaL
I haven't had time to look into schema salad issue (and probably won't for a few days, and am not a mypyc guy in general), but I see Piotr has self-assigned this!
p-sawicki commented on Apr 21, 2026
yeah the import issue is most likely not related.
@mr-c i couldn't reproduce the crash with the dockerfile or when running tests locally with compiled schema_salad. is there another way to see it?
mr-c commented on Apr 21, 2026
@p-sawicki Thanks for testing; I just now updated the Dockerfile in #21133 (comment) to use snapshot.debian.org; since posting the previous version I uploaded a new version of the python3-schema-salad binary package that was built without using mypyc.
Using the updated Dockerfile, the test error still reproduces for me
hauntsaninja commented on Apr 21, 2026
I threw it at Codex and it worked for a long, long time, then produced this repro:
root@bbox-0:~/tmp/mypy-21133-min-normdict λ ls README.md normdict_repro.py run.sh setup.py trigger.py root@bbox-0:~/tmp/mypy-21133-min-normdict λ cat README.md # mypy#21133 minimal NormDict crash This is a standalone reduction of the schema-salad crash from https://github.com/python/mypy/issues/21133. The trigger is a mypyc-compiled class that subclasses `dict` and has an instance attribute: .```python class NormDict(dict[str, str]): def __init__(self, normalize_fn: Callable[[str], str] = str) -> None: super().__init__() self.normalize: Final = normalize_fn .``` On Debian sid with Python 3.14 and mypy/mypyc 1.19.1: .```sh ./run.sh .``` The compiled type exposes a managed `__dict__`. If interpreted Python keeps a reference to that dictionary, then deletes the owning `NormDict`, the dictionary object is left with invalid internal storage: .```python n = NormDict() d = n.__dict__ del n print(d) .``` With `PYTHONMALLOC=debug`, this segfaults while printing `d`. In the full schema-salad failure, mypyc's generated pickling support reads/stores `Loader.idx.__dict__`; `Loader.idx` is a `NormDict`, so later cleanup or GC traverses the invalid dictionary and crashes in `dict_traverse`. root@bbox-0:~/tmp/mypy-21133-min-normdict λ cat setup.py from setuptools import setup from mypyc.build import mypycify setup( name="normdict-repro", ext_modules=mypycify(["normdict_repro.py"], opt_level="3", debug_level="0"), ) root@bbox-0:~/tmp/mypy-21133-min-normdict λ cat trigger.py from normdict_repro import NormDict n = NormDict() d = n.__dict__ print("before", d, flush=True) del n print("after", d, flush=True) root@bbox-0:~/tmp/mypy-21133-min-normdict λ cat normdict_repro.py from __future__ import annotations from typing import Callable, Final class NormDict(dict[str, str]): def __init__(self, normalize_fn: Callable[[str], str] = str) -> None: super().__init__() self.normalize: Final = normalize_fn def main() -> None: n = NormDict() d = n.__dict__ print("before", d, flush=True) del n print("after", d, flush=True) if __name__ == "__main__": main() root@bbox-0:~/tmp/mypy-21133-min-normdict λ cat run.sh #!/bin/sh set -eu PYTHON_BIN="${PYTHON_BIN:-python3.14}" VENV="${VENV:-.venv}" "$PYTHON_BIN" -m venv --system-site-packages "$VENV" "$VENV/bin/python" -m pip install -U pip setuptools wheel "$VENV/bin/python" -m pip install "mypy[mypyc]==1.19.1" rm -rf build *.egg-info *.so "$VENV/bin/python" setup.py build_ext --inplace PYTHONMALLOC=debug PYTHONFAULTHANDLER=1 "$VENV/bin/python" trigger.pyThis definitely segfaults, but I didn't check anything else.
mr-c commented on Apr 22, 2026
Thank you @hauntsaninja ; I can confirm your minimal reproducer using a stock Python 3.14.2 compiled by pyenv
mr-c commented on Apr 22, 2026
repro crash confirmed with mypy 1.16.1 through 1.20.1 on Python 3.14.2; and unable to confirm with Python 3.13.5
p-sawicki commented on Apr 22, 2026
awesome, thanks for the reproduction. it looks like mypyc doesn't generate the necessary type functions (tp_traverse, tp_clear, tp_dealloc) for types with managed dicts. python 3.14 made it so the values stored in the managed dicts are stored inline with the instance and this doesn't work without the missing type functions. so i think we'll just have to generate these functions.
[mypyc] Generate more type methods for types with managed dicts (#21290)
mr-c commented on Apr 23, 2026
I can confirm that c56ab58 fixed the schema-salad crashes (and I double-check that the parent commit did still have the crashes). Thank you @p-sawicki !
re-enable mypyc on Python << 3.14 due to python/mypy#21133
re-enable mypyc on Python << 3.14 due to python/mypy#21133
re-enable mypyc on Python << 3.14 due to python/mypy#21133