1. Marcus von Appen
  2. py-sdl2
  3. Issues
Issue #66 new

Unit tests fail to finish with pypy

Franz Schrober
created an issue

I am running pypy on a system without acces to a graphics device and doing it using:

xvfb-run --server-args="-screen 0 640x480x24" -a gdb --args pypy -B -m sdl2.test.util.runtests

pypy will crash after a while with a mostly unreadable backtrace. The readable part is:

(gdb) bt full
#0  0x00007fffeb55f87c in drisw_destroy_context (context=0x6a046960) at ../../../../src/glx/drisw_glx.c:271
        pcp = 0x6a046960
        psc = 0x6a35c460
#1  0x00007fffeb535d09 in glXDestroyContext (dpy=0xc1f9af0, ctx=0x6a046960) at ../../../../src/glx/glxcmds.c:473
        ctx = 0x6a046960
        dpy = 0xc1f9af0
        gc = 0x6a046960
#2  0x00007ffff4e7859d in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
No symbol table info available.
#3  0x00007ffff4e1c1dc in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
No symbol table info available.
#4  0x00007ffff6e63d1e in ffi_call_unix64 () at ../src/x86/unix64.S:76
No locals.
#5  0x00007ffff6e63788 in ffi_call (cif=0x7ffff7f84f70, fn=0x7ffff4e06fc0 <SDL_DestroyRenderer>, rvalue=0xf74e070, avalue=0xf74e080) at ../src/x86/ffi64.c:525
        classes = {X86_64_INTEGER_CLASS, X86_64_NO_CLASS, 4159791136, 32767}
        stack = 0x7fffffffaf40 "`i\004j"
        argp = 0x7fffffffaff0 "\n"
        arg_types = <optimized out>
        gprcount = 1
        ssecount = <optimized out>
        ngpr = 1
        nsse = 0
        i = <optimized out>
        avn = <optimized out>
        ret_in_memory = <optimized out>
        reg_args = 0x7fffffffaf40

PyPy is 2.3.1. Maybe the garbage collector of pypy is not running between the tests which causes pypy to have multiple open glx contexts at the same time (which should not happen).

I've tested it now again and it also happened without Xvfb on my intel system running Linux 3.16

(gdb) bt full
#0  0x00007fffeb56421c in dri2_destroy_context (context=0x6c7af3d0) at ../../../../src/glx/dri2_glx.c:129
        pcp = 0x6c7af3d0
        psc = 0x970b6f0
#1  0x00007fffeb535d09 in glXDestroyContext (dpy=0x5a23200, ctx=0x6c7af3d0) at ../../../../src/glx/glxcmds.c:473
        ctx = 0x6c7af3d0
        dpy = 0x5a23200
        gc = 0x6c7af3d0
#2  0x00007ffff4e7859d in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
No symbol table info available.
#3  0x00007ffff4e1c1dc in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
No symbol table info available.
#4  0x00007ffff6e63d1e in ffi_call_unix64 () at ../src/x86/unix64.S:76
No locals.
#5  0x00007ffff6e63788 in ffi_call (cif=0x7ffff7f84f70, fn=0x7ffff4e06fc0 <SDL_DestroyRenderer>, rvalue=0x10b7c200, avalue=0x10b7c0d0) at ../src/x86/ffi64.c:525
        classes = {X86_64_INTEGER_CLASS, X86_64_NO_CLASS, 4159791136, 32767}
        stack = 0x7fffffffb190 "\320\363zl"
        argp = 0x7fffffffb240 "\n"
        arg_types = <optimized out>
        gprcount = 1
        ssecount = <optimized out>
        ngpr = 1
        nsse = 0
        i = <optimized out>
        avn = <optimized out>
        ret_in_memory = <optimized out>
        reg_args = 0x7fffffffb190

Comments (7)

  1. Log in to comment