[pypy-issue] [issue1321] stm-thread-2: print within atomic deadlocks

Remi tracker at bugs.pypy.org
Mon Nov 12 20:34:35 CET 2012

New submission from Remi <remi.meier at gmail.com>:

Small example:
import transaction
def bla(i):
    while True:
        print "hi from", i
transaction.add(bla, 1)
transaction.add(bla, 2)
transaction.add(bla, 3)
transaction.add(bla, 4)
Output: Deadlocks or:
error: deadlock: an atomic transaction tries to acquire a lock that is already 
acquired.  See pypy/doc/stm.rst.
Since the output of 2 transactions is sometimes interleaved, this probably 
happens because we do not become inevitable properly when printing to stdout.

messages: 4980
nosy: Remi, pypy-issue
priority: bug
status: unread
title: stm-thread-2: print within atomic deadlocks

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list