[pypy-issue] [issue1767] stm - KeyError in JIT's bridge optimization

Hubert Hesse tracker at bugs.pypy.org
Tue May 13 19:48:53 CEST 2014


Hubert Hesse <hubert.hesse at student.hpi.uni-potsdam.de> added the comment:

Hi arigo,

I try to that as comprehensible & short as possible. See README on
https://bitbucket.org/pypy/lang-smalltalk/overview for more detail
If you have checked out all repos on the same hierarchy you can use the version
with the correct variables in place below

1. getting source to revision

hg clone https://bitbucket.org/pypy/rsdl
hg clone https://bitbucket.org/pypy/pypy -r 4169f1423e3d # as recommended in IRC
hg clone https://bitbucket.org/pypy/lang-smalltalk -r 014f5e42251f # latest work
with stmgc-c7

2. setting environment variables 

export PYTHONPATH=${PYTHONPATH}:[path to rsdl repository]/rsdl

export PYTHONPATH=${PYTHONPATH}:./rsdl #for me
export SDL_VIDEODRIVER=dummy
export CC=clang #with patches from here
https://bitbucket.org/pypy/stmgc/src/d164a5bcad5e7615b4362b6a1a49d51e2e06de0c/c7/llvmfix/?at=default



3. Build the VM, this may take a while with JIT enabled, that will fail when
executed

[path to pypy repository]/rpython/bin/rpython -O jit [path to lang-smalltalk
repository]/targetimageloadingsmalltalk.py
 
./pypy/rpython/bin/rpython -Ojit --gc=stmgc
lang-smalltalk/targetimageloadingsmalltalk.py


4. execute rsqueak vm

./rsqueakvm-64 lang-smalltalk/images/Squeak4.5-12568.image # will produce the
stack traces below
#######################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################RPython
traceback:
  File "spyvm_interpreter.c", line 22928, in Interpreter_c_loop_stm
  File "rpython_jit_metainterp_warmstate.c", line 497, in
maybe_compile_and_run__star_4
  File "rpython_jit_metainterp_warmstate.c", line 828, in execute_assembler__star_1
  File "rpython_jit_metainterp_compile.c", line 11932, in
ResumeGuardDescr_handle_fail
  File "rpython_jit_metainterp_compile.c", line 12622, in
ResumeGuardDescr__trace_and_compile_from_bridge
  File "rpython_jit_metainterp_pyjitpl.c", line 55086, in
MetaInterp_handle_guard_failure
  File "rpython_jit_metainterp_pyjitpl.c", line 55602, in
MetaInterp__handle_guard_failure
  File "rpython_jit_metainterp_pyjitpl.c", line 1474, in MetaInterp_interpret
  File "rpython_jit_metainterp_pyjitpl.c", line 2515, in MetaInterp__interpret
  File "rpython_jit_metainterp_pyjitpl.c", line 3685, in MIFrame_run_one_step
  File "rpython_jit_metainterp_pyjitpl.c", line 26297, in
MIFrame_opimpl_jit_merge_point
  File "rpython_jit_metainterp_pyjitpl.c", line 38783, in
MetaInterp_reached_loop_header
  File "rpython_jit_metainterp_pyjitpl.c", line 48008, in MetaInterp_compile_loop
  File "rpython_jit_metainterp_compile.c", line 3248, in compile_loop
  File "rpython_jit_metainterp_inliner.c", line 972, in Inliner_inline_op
  File "rpython_jit_metainterp_inliner.c", line 1820, in Inliner_inline_snapshot
  File "rpython_jit_metainterp_inliner.c", line 1732, in Inliner_inline_snapshot
  File "rpython_rtyper_lltypesystem_rdict.c", line 23425, in
ll_dict_getitem__dicttablePtr_objectPtr_2
~~~ Crash in JIT! <KeyError object at 0x61c02e0>


whereas a VM without JIT runs without those errors.

./pypy/rpython/bin/rpython --gc=stmgc lang-smalltalk/targetimageloadingsmalltalk.py

./rsqueakvm-64 lang-smalltalk/images/Squeak4.5-12568.image # will work

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1767>
________________________________________


More information about the pypy-issue mailing list