[pypy-dev] What Causes An Ambiguous low-level helper specialization Error?

Andrew Francis andrewfr_ice at yahoo.com
Mon Jan 23 23:06:19 CET 2012


Hi Folks:

I am trying to write a simple RPython programme that uses the STM module. I am modelling my example after targetdemo.py.

this is a code fragment

def T1():
    global fromAccount, toAccount, counter
    transactionA(fromAccount, toAccount, counter)

def T2():
    global fromAccount, toAccount, counter
    transactionB(fromAccount, toAccount, counter)

# __________  Entry point  __________

def entry_point(argv):
    ll_thread.start_new_thread(T1,())
    ll_thread.start_new_thread(T2,())
    print "sleeping..."
    while done < NUM_THREADS:
        time.sleep(1)
    print "done sleeping."
    return 0

Here are some of the last few lines of errors I receive:


translation:ERROR]  AssertionError': ambiguous low-level helper specialization
[translation:ERROR]     .. v0 = simple_call((function RPyThreadStart), func_0)
[translation:ERROR]     .. '(pypy.module.thread.ll_thread:88)ll_start_new_thread
[translation:ERROR] Processing block:
[translation:ERROR]  block at 6 is a <class 'pypy.objspace.flow.flowcontext.SpamBlock'>
[translation:ERROR]  in (pypy.module.thread.ll_thread:88)ll_start_new_thread
[translation:ERROR]  containing the following operations:
[translation:ERROR]        v0 = simple_call((function RPyThreadStart), func_0)
[translation:ERROR]        v1 = eq(v0, (-1))
[translation:ERROR]        v2 = is_true(v1)
[translation:ERROR]  --end--


What does this error mean and what do I do to avoid it in the future?

Cheers,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120123/5340e2e9/attachment.html>


More information about the pypy-dev mailing list