[pypy-issue] Issue #2275: pypy segfault (pypy/pypy)

FredStober issues-reply at bitbucket.org
Tue Apr 19 03:02:57 EDT 2016

New issue 2275: pypy segfault


Hi, I have some code that *sometimes* crashes with a segfault when run with pypy (tested with PyPy 2.2.1 from Ubuntu 14.04.4 LTS and PyPy 2.5.0 as installed on TravisCI). The issue does not appear when run with CPython.

I've reduced the program to the following short snippet of code:

import os, threading

def fun():

if __name__ == '__main__':
        thread = threading.Thread(target = fun)
        pid, fd = os.forkpty()
        if pid == 0:
        os.waitpid(pid, 0)

Creating and joining the thread seems to be essential to trigger the issue - replacing os._exit with sys.exit to run cleanup does not help.
Am I overlooking some issue with this code?

Cheers, Fred

More information about the pypy-issue mailing list