New issue 1969: JIT crash when executing some benchmarks in Pyrlang https://bitbucket.org/pypy/pypy/issue/1969/jit-crash-when-executing-some-benchmarks
Ruochen Huang: When running some benchmarks in my project Pyrlang, I have encountered a runtime error said JIT crash when I run my interpreter binary file generated by RPython. The trace seems like: RPython traceback: File "pyrlang_interpreter_interp.c", line 3215, in portal File "rpython_jit_metainterp_warmstate.c", line 286, in maybe_compile_and_run__star_7 File "rpython_jit_metainterp_warmstate.c", line 1107, in execute_assembler__star_5 File "rpython_jit_metainterp_compile.c", line 23562, in ResumeGuardDescr_handle_fail File "rpython_jit_metainterp_compile.c", line 24755, in ResumeGuardDescr__trace_and_compile_from_bridge File "rpython_jit_metainterp_pyjitpl_1.c", line 4955, in MetaInterp_handle_guard_failure File "rpython_jit_metainterp_pyjitpl_1.c", line 5998, in MetaInterp__handle_guard_failure File "rpython_jit_metainterp_pyjitpl.c", line 4054, in MetaInterp_interpret File "rpython_jit_metainterp_pyjitpl.c", line 5916, in MetaInterp__interpret File "rpython_jit_metainterp_pyjitpl.c", line 6990, in MIFrame_run_one_step File "rpython_jit_metainterp_pyjitpl.c", line 26198, in MIFrame_opimpl_jit_merge_point File "rpython_jit_metainterp_pyjitpl.c", line 41179, in MetaInterp_reached_loop_header File "rpython_jit_metainterp_pyjitpl.c", line 55018, in MetaInterp_compile_loop File "rpython_jit_metainterp_compile.c", line 6663, in compile_loop File "rpython_jit_metainterp_inliner.c", line 1901, in Inliner_inline_op File "rpython_jit_metainterp_inliner.c", line 3146, in Inliner_inline_snapshot File "rpython_rtyper_lltypesystem_rdict.c", line 26013, in ll_dict_getitem__dicttablePtr_objectPtr_3 ~~~ Crash in JIT! <KeyError object at 0x10028fd88> Abort trap: 6 To reproduce the crash, you can clone my repo at https://hrc...@bitbucket.org/hrc706/pyrlang.git, type rpython -Ojit targettest.py to compile, and run the benchmark by ./targettest-c -r 13 test_beam/fact.beam fact 20000 or ./targettest-c -r 19 test_beam/fact.beam fact 20000 The -r means the reduction count of the dispatch loop, it will decrease during the dispatch loop, and when it becomes 0, the dispatch loop will be suspended. The code for dispatch loop is in interpreter/interp.py, Process::execute. I have also observed that the JIT only crashes when -r is 13 or 19 in this benchmark with argument of 20000, in other value of -r the crash will not occur. _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue