Hi,

I tried all the mesa demos last night. The glutfx demo got a segfault
when exiting. I got this backtrace:

#0  0x402bb980 in XrmMergeDatabases () from /usr/X11R6-DRI/lib/libX11.so.6
#1  0x402bcb28 in XrmQPutStringResource ()
   from /usr/X11R6-DRI/lib/libX11.so.6
#2  0x402bcf63 in XrmGetFileDatabase () from /usr/X11R6-DRI/lib/libX11.so.6
#3  0x4029f9c3 in XGetErrorDatabaseText ()
   from /usr/X11R6-DRI/lib/libX11.so.6
#4  0x4029f8ad in XGetErrorText () from /usr/X11R6-DRI/lib/libX11.so.6
#5  0x402ba14b in _XDefaultIOError () from /usr/X11R6-DRI/lib/libX11.so.6
#6  0x402ba8a9 in _XDefaultError () from /usr/X11R6-DRI/lib/libX11.so.6
#7  0x402ba9cd in _XError () from /usr/X11R6-DRI/lib/libX11.so.6
#8  0x402b907b in _XReply () from /usr/X11R6-DRI/lib/libX11.so.6
#9  0x4013a497 in XF86DRIGetDrawableInfo (dpy=0x804a6e0, screen=3, 
    drawable=3, index=0x3, stamp=0x3, X=0x3, Y=0x3, W=0x3, H=0x3, 
    numClipRects=0x8100a4c, pClipRects=0x8100a50, backX=0x3, backY=0x3, 
    numBackClipRects=0x8100a60, pBackClipRects=0x8100a64) at XF86dri.c:477
#10 0x404e5ecf in __driUtilUpdateDrawableInfo (dpy=0x3, scrn=3, 
    pdp=0x8100a20) at dri_util.c:615
#11 0x405f9a41 in radeonGetLock (rmesa=0x8050df0, flags=3)
    at radeon_lock.c:107
#12 0x405f7c12 in radeonFlushCmdBuf (rmesa=0x8050df0, 
    caller=0x3 <Address 0x3 out of bounds>) at radeon_ioctl.c:451
#13 0x405f969d in radeonFlush (ctx=0x3) at radeon_ioctl.c:1134
#14 0x405f65e1 in radeonDestroyContext (driContextPriv=0x8050df0)
    at radeon_context.c:569
#15 0x404e6228 in driDestroyContext (dpy=0x804a6e0, scrn=0, 
    contextPrivate=0x8050dd0) at dri_util.c:762
#16 0x4012245b in DestroyContext (dpy=0x8100a20, gc=0x8050dd0)
    at glxcmds.c:252
#17 0x4003cb52 in __glutDestroyWindow () from /usr/lib/libglut.so.3
#18 0x4003cc49 in glutDestroyWindow () from /usr/lib/libglut.so.3
#19 0x0804911f in Key ()
#20 0x400335c5 in __glutRegisterEventParser () from /usr/lib/libglut.so.3
#21 0x40034557 in glutMainLoop () from /usr/lib/libglut.so.3
#22 0x08049007 in main ()
#23 0x401830bf in __libc_start_main () from /lib/libc.so.6

I checked radeonDestroyContext. It looks suspicious to me that a lot of
the context is destroyed *before* the RADEON_FIRE_VERTICES macro calls
radeonFlush. I moved RADEON_FIRE_VERTICES before any of the
*_DestroyContext calls and didn't get any more segfaults. A patch is
attached.

Furthermore the segfault occurs in radeonGetLock. Could a segfault in
this place potentially cause a deadlock?

Best regards,
   Felix

               __\|/__    ___     ___     ___
__Tsch��_______\_6 6_/___/__ \___/__ \___/___\___You can do anything,___
_____Felix_______\�/\ \_____\ \_____\ \______U___just not everything____
  [EMAIL PROTECTED]    >o<__/   \___/   \___/        at the same time!

Attachment: radeon_context.patch
Description: Binary data

Reply via email to