[pypy-issue] Issue #1895: Writing to stderr from multiple threads produces deadlock (pypy/pypy)
Ionel Maries Cristian
issues-reply at bitbucket.org
Fri Oct 17 01:14:33 CEST 2014
New issue 1895: Writing to stderr from multiple threads produces deadlock
https://bitbucket.org/pypy/pypy/issue/1895/writing-to-stderr-from-multiple-threads
Ionel Maries Cristian:
Minimal testcase:
```
import os
import sys
import threading
class Thread(threading.Thread):
def run(self):
print >> sys.stderr, "BLAM!"
t = Thread()
t.daemon = True
t.start()
pid = os.fork()
if pid:
print('waiting for process', pid)
os.waitpid(pid, 0)
else:
print >> sys.stderr, "BOOM!"
os.execvp('true', ['true'])
print('process ended')
```
To run: `while pypy deadlock.py; do true; done`
Reproduces on PyPy 2.3.0 and 2.4.0
More information about the pypy-issue
mailing list