Home - Summaries: (main) : (py3.11) : (py3.12) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

jit/metainterp/test/test_recursive.py::TestLLtype::()::test_tco_doesnt_lead_to_infinite_tracing

self = <rpython.jit.metainterp.test.test_recursive.TestLLtype instance at 0x0000000025962d20>

    def test_tco_doesnt_lead_to_infinite_tracing(self):
        import multiprocessing
        # this is super annoying to test too! since we have stack overflows in
        # the llinterp, sort of random things can happen, depending on how much
        # code in llinterp and pyjitpl are already jitted. therefore we run the
        # function in a subprocess.
        import subprocess, sys, os
        env = os.environ.copy()
        env["PYTHONPATH"] = os.pathsep.join(sys.path)
>       subprocess.check_output("%s %s" % (sys.executable, __file__), shell=True, env=env)

jit/metainterp/test/test_recursive.py:1369: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

popenargs = ('/usr/local/bin/pypy /workspace/rpython/jit/metainterp/test/test_recursive.py',)
kwargs = {'env': {'AUDITWHEEL_ARCH': 'x86_64', 'AUDITWHEEL_PLAT': 'manylinux_2_28_x86_64', 'AUDITWHEEL_POLICY': 'manylinux_2_28', 'DEVTOOLSET_ROOTPATH': '/opt/rh/gcc-toolset-14/root', ...}, 'shell': True}
process = <subprocess.Popen object at 0x0000000023cc0bb8>
output = "\tbh: live [1] -> 3\n\tbh: goto_if_not_int_lt [100000, 0, 10, 8] -> 10\n\tbh: inline_call_ir_i [<rpython.jit.backend....> /workspace/rpython/rtyper/lltypesystem/lltype.py(1264)__getattr__()\n-> o = self._obj._getattr(field_name)\n(Pdb) \n"
unused_err = None, retcode = 1
cmd = '/usr/local/bin/pypy /workspace/rpython/jit/metainterp/test/test_recursive.py'

    def check_output(*popenargs, **kwargs):
        r"""Run command with arguments and return its output as a byte string.
    
        If the exit code was non-zero it raises a CalledProcessError.  The
        CalledProcessError object will have the return code in the returncode
        attribute and output in the output attribute.
    
        The arguments are the same as for the Popen constructor.  Example:
    
        >>> check_output(["ls", "-l", "/dev/null"])
        'crw-rw-rw- 1 root root 1, 3 Oct 18  2007 /dev/null\n'
    
        The stdout argument is not allowed as it is used internally.
        To capture standard error in the result, use stderr=STDOUT.
    
        >>> check_output(["/bin/sh", "-c",
        ...               "ls -l non_existent_file ; exit 0"],
        ...              stderr=STDOUT)
        'ls: non_existent_file: No such file or directory\n'
        """
        if 'stdout' in kwargs:
            raise ValueError('stdout argument not allowed, it will be overridden.')
        process = Popen(stdout=PIPE, *popenargs, **kwargs)
        output, unused_err = process.communicate()
        retcode = process.poll()
        if retcode:
            cmd = kwargs.get("args")
            if cmd is None:
                cmd = popenargs[0]
>           raise CalledProcessError(retcode, cmd, output=output)
E           CalledProcessError: Command '/usr/local/bin/pypy /workspace/rpython/jit/metainterp/test/test_recursive.py' returned non-zero exit status 1

/opt/pypy2.7-v7.3.22-linux64/lib-python/2.7/subprocess.py:223: CalledProcessError
---------- Captured stderr call ----------
[rtyper] -=- specialized 12 blocks -=-
[rtyper] -=- specialized 4 more blocks -=-
[rtyper] -=- specialized 2 more blocks -=-
[rtyper] -=- specialized 7 more blocks -=-
[rtyper] -=- specialized 6 more blocks -=-
[rtyper] -=- specialized 17 more blocks -=-
[rtyper] -=- specialized 2 more blocks -=-
[rtyper] -=- specialized 3 more blocks -=-
[jitcodewriter:info] making JitCodes...
[jitcodewriter:info] There are 2 JitCode instances.
[jitcodewriter:info] There are 6 -live- ops. Size of liveness is 4 bytes
[jitcodewriter] compute_bitstrings:
[jitcodewriter]   0 effectinfos:
[jitcodewriter]     0 descrs for arrays
[jitcodewriter]     0 descrs for fields
[jitcodewriter]     0 descrs for interiorfields
Traceback (most recent call last):
  File "/workspace/rpython/jit/metainterp/test/test_recursive.py", line 1410, in _run
    tco_doesnt_lead_to_infinite_tracing()
  File "/workspace/rpython/jit/metainterp/test/test_recursive.py", line 1394, in tco_doesnt_lead_to_infinite_tracing
    res = self.meta_interp(g, [4])
  File "/workspace/rpython/jit/metainterp/test/support.py", line 265, in meta_interp
    return ll_meta_interp(*args, **kwds)
  File "/workspace/rpython/jit/metainterp/warmspot.py", line 89, in ll_meta_interp
    return jittify_and_run(interp, graph, args, backendopt=backendopt, **kwds)
  File "/workspace/rpython/jit/metainterp/warmspot.py", line 127, in jittify_and_run
    res = interp.eval_graph(graph, args)
  File "/workspace/rpython/rtyper/llinterp.py", line 97, in eval_graph
    retval = llframe.eval()
  File "/workspace/rpython/rtyper/llinterp.py", line 295, in eval
    nextblock, args = self.eval_block(nextblock)
  File "/workspace/rpython/rtyper/llinterp.py", line 319, in eval_block
    self.eval_operation(op)
  File "/workspace/rpython/rtyper/llinterp.py", line 422, in eval_operation
    retval = ophandler(*vals)
  File "/workspace/rpython/rtyper/llinterp.py", line 697, in op_direct_call
    return self.perform_call(f, FTYPE.ARGS, args)
  File "/workspace/rpython/rtyper/llinterp.py", line 684, in perform_call
    return self.invoke_callable_with_pyexceptions(f, *args)
  File "/workspace/rpython/rtyper/llinterp.py", line 507, in invoke_callable_with_pyexceptions
    self.make_llexception()
  File "/workspace/rpython/rtyper/llinterp.py", line 491, in invoke_callable_with_pyexceptions
    return obj._callable(*args)
  File "/workspace/rpython/jit/metainterp/warmspot.py", line 954, in ll_portal_runner
    portal_ptr)(*args)
  File "/workspace/rpython/jit/codewriter/support.py", line 163, in on_top_of_llinterp
    return llinterp.eval_graph(funcobj.graph, list(args))
  File "/workspace/rpython/rtyper/llinterp.py", line 97, in eval_graph
    retval = llframe.eval()
  File "/workspace/rpython/rtyper/llinterp.py", line 295, in eval
    nextblock, args = self.eval_block(nextblock)
  File "/workspace/rpython/rtyper/llinterp.py", line 319, in eval_block
    self.eval_operation(op)
  File "/workspace/rpython/rtyper/llinterp.py", line 422, in eval_operation
    retval = ophandler(*vals)
  File "/workspace/rpython/rtyper/llinterp.py", line 697, in op_direct_call
    return self.perform_call(f, FTYPE.ARGS, args)
  File "/workspace/rpython/rtyper/llinterp.py", line 684, in perform_call
    return self.invoke_callable_with_pyexceptions(f, *args)
  File "/workspace/rpython/rtyper/llinterp.py", line 507, in invoke_callable_with_pyexceptions
    self.make_llexception()
  File "/workspace/rpython/rtyper/llinterp.py", line 491, in invoke_callable_with_pyexceptions
    return obj._callable(*args)
  File "/workspace/rpython/jit/metainterp/warmspot.py", line 581, in maybe_enter_jit
    crash_in_jit(e)
  File "/workspace/rpython/jit/metainterp/warmspot.py", line 579, in maybe_enter_jit
    maybe_compile_and_run(state.increment_threshold, *args)
  File "/workspace/rpython/jit/metainterp/warmstate.py", line 468, in maybe_compile_and_run
    bound_reached(hash, None, *args)
  File "/workspace/rpython/jit/metainterp/warmstate.py", line 442, in bound_reached
    metainterp.compile_and_run_once(jitdriver_sd, *args)
  File "/workspace/rpython/jit/metainterp/pyjitpl.py", line 2895, in compile_and_run_once
    return self._compile_and_run_once(original_boxes)
  File "/workspace/rpython/jit/metainterp/pyjitpl.py", line 2911, in _compile_and_run_once
    self.run_blackhole_interp_to_cancel_tracing(stb)
  File "/workspace/rpython/jit/metainterp/pyjitpl.py", line 2955, in run_blackhole_interp_to_cancel_tracing
    convert_and_run_from_pyjitpl(self, stb.raising_exception)
  File "/workspace/rpython/jit/metainterp/blackhole.py", line 1820, in convert_and_run_from_pyjitpl
    _run_forever(firstbh, current_exc)
  File "/workspace/rpython/jit/metainterp/blackhole.py", line 1755, in _run_forever
    current_exc = blackholeinterp._resume_mainloop(current_exc)
  File "/workspace/rpython/jit/metainterp/blackhole.py", line 1627, in _resume_mainloop
    current_exc = get_llexception(self.cpu, e)
  File "/workspace/rpython/jit/metainterp/blackhole.py", line 1621, in _resume_mainloop
    self.run()
  File "/workspace/rpython/jit/metainterp/blackhole.py", line 360, in run
    lle = get_llexception(self.cpu, e)
  File "/workspace/rpython/jit/metainterp/blackhole.py", line 354, in run
    self.dispatch_loop(self, self.jitcode.code, self.position)
  File "/workspace/rpython/jit/metainterp/blackhole.py", line 95, in dispatch_loop
    position = func(self, code, position)
  File "/workspace/rpython/jit/metainterp/blackhole.py", line 170, in handler
    result = unboundmethod(*args)
  File "/workspace/rpython/jit/metainterp/blackhole.py", line 1294, in bhimpl_inline_call_ir_i
    args_i, args_r, None, jitcode.calldescr)
  File "/workspace/rpython/jit/backend/llgraph/runner.py", line 613, in _do_call
    return self.maybe_on_top_of_llinterp(func, args, TP.RESULT)
  File "/workspace/rpython/jit/backend/llgraph/runner.py", line 603, in maybe_on_top_of_llinterp
    res = self.llinterp.eval_graph(ptr._obj.graph, args)
  File "/workspace/rpython/rtyper/llinterp.py", line 99, in eval_graph
    log.error("LLEXCEPTION: %s" % (e, ))
  File "/workspace/rpython/rtyper/llinterp.py", line 54, in __str__
    return '<LLException %r%s>' % (type_name(etype), extra)
  File "/workspace/rpython/rtyper/llinterp.py", line 65, in type_name
    return ''.join(etype.name.chars)
  File "/workspace/rpython/rtyper/lltypesystem/lltype.py", line 1264, in __getattr__
    o = self._obj._getattr(field_name)
AttributeError: 'NoneType' object has no attribute '_getattr'
 (somefailed=True in jit/metainterp/test/test_recursive.py)
builder: rpython-linux-x86-64 build #730*
test: jit/metainterp/test/test_recursive.py::TestLLtype::()::test_tco_doesnt_lead_to_infinite_tracing