tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Crashes in X11R7/lib/modules/dri/r600_dri.so (7.0.1)



I'm sometimes working on VICE (the Commodore 8-bit emulator) and its GTK
GUI uses GL for hardware-accelerated scaling of the emulated screen.

Unfortunately I always get segfaults in the r600_dri.so library. This is
the one that gets used for (some?) Radeon graphics cards.

The segfaults don't occur if I run the same program on a laptop with
Intel graphics.

Inserting a debugging printf() seems to delay the occurrence of the
segfaults (but does not prevent them), suggesting some race condition.
The DRI library seems to create an extra thread for its own use; VICE
(in the tested version) is single-threaded.

(gdb) thread 2
[Switching to thread 2 (LWP 2)]
#0  0x00007f7fe9c9f6aa in ___lwp_park60 () from /usr/lib/libc.so.12
(gdb) bt
#0  0x00007f7fe9c9f6aa in ___lwp_park60 () from /usr/lib/libc.so.12
#1  0x00007f7fea008f2b in pthread_cond_timedwait ()
   from /usr/lib/libpthread.so.1
#2  0x00007f7fdd6bdbc9 in ?? () from /usr/X11R7/lib/modules/dri/r600_dri.so
#3  0x00007f7fdd6bd66d in ?? () from /usr/X11R7/lib/modules/dri/r600_dri.so
#4  0x00007f7fea00a9cc in ?? () from /usr/lib/libpthread.so.1
#5  0x00007f7fe9c83de0 in ?? () from /usr/lib/libc.so.12
#6  0x00010102464c457f in ?? ()
#7  0x0000000000000000 in ?? ()

I replaced the /usr/X11R7 library from 7.0.1 with a -current version
from august, but to keep DRI working I had to get the
/usr/X11R7/lib/modules/dri directory back from 7.0.1 (glxgears didn't
work otherwise). This didn't help (nor make it worse).

Source:
https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/arch/unix/x11/gnome/x11ui.c

The locations of the crash are most of the time the same, but not
always. This one is very common:

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 1]
0x00007f7fdd742551 in r600_draw_rectangle ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
(gdb) bt
#0  0x00007f7fdd742551 in r600_draw_rectangle ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#1  0x00007f7fdd74862c in util_blitter_custom_color ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#2  0x00007f7fdd7016b7 in ?? () from /usr/X11R7/lib/modules/dri/r600_dri.so
#3  0x00007f7fdd4a1c0e in dri_flush ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#4  0x00007f7fefc59782 in ?? () from /usr/X11R7/lib/libGL.so.2
#5  0x00000000005fe55b in gl_render_canvas (do_swap=1, to=0, from=0, 
    buffers=0xcade60 <t>, canvas=<optimized out>, w=<optimized out>)
    at ../../../../../../vice/src/arch/unix/x11/gnome/x11ui.c:1938

    [ x11ui.c:1938 is the call to gdk_gl_drawable_swap_buffers() ]

#6  exposure_callback_canvas (w=<optimized out>, e=<optimized out>, 
    client_data=<optimized out>)
    at ../../../../../../vice/src/arch/unix/x11/gnome/x11ui.c:2004
#7  0x00007f7ff692f3e8 in ?? () from /usr/pkg/lib/libgtk-x11-2.0.so.0
#8  0x00007f7ff240f1cf in g_closure_invoke ()
   from /usr/pkg/lib/libgobject-2.0.so.0
...

This one is more common of the #if 0 part of the code is enabled:
See around line 1914.

Program received signal SIGSEGV, Segmentation fault.
0x00007f7fe9d0dbdf in memcpy () from /usr/lib/libc.so.12
(gdb) bt
#0  0x00007f7fe9d0dbdf in memcpy () from /usr/lib/libc.so.12
#1  0x00007f7fdd77c91a in u_upload_data ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#2  0x00007f7fdd6eed65 in ?? () from /usr/X11R7/lib/modules/dri/r600_dri.so
#3  0x00007f7fdd779ffb in cso_set_constant_buffer ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#4  0x00007f7fdd58646e in st_upload_constants ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#5  0x00007f7fdd57e0d6 in st_validate_state ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#6  0x00007f7fdd553a44 in st_draw_vbo ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#7  0x00007f7fdd59a8f3 in vbo_exec_vtx_flush ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#8  0x00007f7fdd5a0826 in ?? () from /usr/X11R7/lib/modules/dri/r600_dri.so
#9  0x00007f7fdd5af442 in vbo_exec_FlushVertices ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#10 0x00007f7fdd6ac282 in ?? () from /usr/X11R7/lib/modules/dri/r600_dri.so
#11 0x00007f7fdd6ad117 in _mesa_set_enable ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#12 0x00000000005fe55d in gl_render_canvas (do_swap=1, to=0, from=0, 
    buffers=0xcade60 <t>, canvas=<optimized out>, w=<optimized out>)
    at ../../../../../../vice/src/arch/unix/x11/gnome/x11ui.c:1921

    [ x11ui.c:1921 is probably the line after static int x = 0; ]

#13 exposure_callback_canvas (w=<optimized out>, e=<optimized out>, 
    client_data=<optimized out>)
    at ../../../../../../vice/src/arch/unix/x11/gnome/x11ui.c:2002

I don't quite see how this can be an application bug (but who knows...).
So is it a bug in r600_dri.so?

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/xs4all.nl    -- are condemned to reinvent it. Poorly.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index