[R430] X+radeon crash in __driUtilUpdateDrawableInfo+0xc2 when quitting certain opengl apps

Bug #329654 reported by Aurélien COUDERC
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mesa (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-radeon

I'm using the radeon driver on an R430 with an up to date Jauty, and I'm experiencing some X crashes.
X crashes systematically when exiting World of Goo (http://2dboy.com/games.php) or Lugaru (http://www.wolfire.com/lugaru).
Lugaru doesn't work with most recent Xserver/SDL but it's not supposed to crash X anyway.

It doesn't *just* crash X, the system is hard frozen afterwards.

My xorg.conf is the default one, and see the attached Xorg log.

Backtrace:
0: /usr/bin/X(xorg_backtrace+0x26) [0x4f0b16]
1: /usr/bin/X(xf86SigHandler+0x41) [0x485491]
2: /lib/libc.so.6 [0x7f293bec3040]
3: /usr/lib/xorg/modules/extensions//libglx.so [0x7f293b3adfef]
4: /usr/lib/dri/r300_dri.so(__driUtilUpdateDrawableInfo+0xc2) [0x7f292784b9f2]
5: /usr/lib/dri/r300_dri.so(radeonGetLock+0x66) [0x7f2927851aa6]
6: /usr/lib/dri/r300_dri.so(r300FlushCmdBuf+0x9f) [0x7f292785d33f]
7: /usr/lib/dri/r300_dri.so(r300DestroyContext+0x402) [0x7f2927856f52]
8: /usr/lib/dri/r300_dri.so [0x7f292784b7d0]
9: /usr/lib/xorg/modules/extensions//libglx.so [0x7f293b3af8b9]
10: /usr/lib/xorg/modules/extensions//libglx.so(__glXFreeContext+0x6c) [0x7f293b3a5bac]
11: /usr/lib/xorg/modules/extensions//libglx.so [0x7f293b3a5bf3]
12: /usr/bin/X(FreeResourceByType+0x105) [0x435a95]
13: /usr/lib/xorg/modules/extensions//libglx.so [0x7f293b3a249e]
14: /usr/lib/xorg/modules/extensions//libglx.so [0x7f293b3a5ea2]
15: /usr/bin/X(Dispatch+0x364) [0x44e1d4]
16: /usr/bin/X(main+0x3bd) [0x433c5d]
17: /lib/libc.so.6(__libc_start_main+0xe6) [0x7f293beae5a6]
18: /usr/bin/X [0x4330e9]

Related branches

Revision history for this message
Aurélien COUDERC (coucouf) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :

Please collect a full backtrace - see http://wiki.ubuntu.com/X/Backtracing for directions.

description: updated
Changed in xserver-xorg-video-ati:
status: New → Incomplete
Revision history for this message
Aurélien COUDERC (coucouf) wrote :

Here is a more precise backtrace, however there still seems to be missing information for r300_dri.so. I've double checked that libgl1-mesa-dri-dbg is installed, is there something else to do ?
I'm running on x86_64 and those crashing applications are 32-bit by the way.

#0 getDrawableInfo (driDrawable=<value optimized out>, index=0x3c4e1ac, stamp=0x3c4e1b8,
    x=0x3c4e1bc, y=0x3c4e1c0, width=0x3c4e1c4, height=0x3c4e1c8, numClipRects=0x3c4e1cc,
    ppClipRects=0x3c4e1d0, backX=0x3c4e1d8, backY=0x3c4e1dc, numBackClipRects=0x3c4e1e4,
    ppBackClipRects=0x3c4e1e8, data=0x3c4e0d0) at ../../glx/glxdri.c:748
 pScreen = <value optimized out>
 pClipRects = <value optimized out>
 pBackClipRects = <value optimized out>
 retval = 0 '\0'
 size = <value optimized out>
#1 0x00007f210ccf19f2 in __driUtilUpdateDrawableInfo () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#2 0x00007f210ccf7aa6 in radeonGetLock () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#3 0x00007f210cd0333f in r300FlushCmdBuf () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#4 0x00007f210ccfcf52 in r300DestroyContext () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#5 0x00007f210ccf17d0 in ?? () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#6 0x00007f21208558b9 in __glXDRIcontextDestroy (baseContext=0x3c02570)
    at ../../glx/glxdri.c:290
No locals.
#7 0x00007f212084bbac in __glXFreeContext (cx=0x3c02570) at ../../glx/glxext.c:160
No locals.
#8 0x00007f212084bbf3 in ContextGone (cx=0x0, id=63234476) at ../../glx/glxext.c:109
No locals.
#9 0x0000000000435a95 in FreeResourceByType (id=52428801, type=56, skipFree=0)
    at ../../dix/resource.c:597
 cid = <value optimized out>
 res = (ResourcePtr) 0x3c4e0a0
 prev = (ResourcePtr *) 0x3c4e1b8
 head = <value optimized out>
#10 0x00007f212084849e in __glXDisp_DestroyContext (cl=<value optimized out>,
    pc=<value optimized out>) at ../../glx/glxcmds.c:336
 client = (ClientPtr) 0x1c18980
 gcId = 52428801
#11 0x00007f212084bea2 in __glXDispatch (client=0x1c18980) at ../../glx/glxext.c:523
 stuff = (xGLXSingleReq *) 0x2ba7210
 opcode = <value optimized out>
 cl = (__GLXclientState *) 0x219a320
 retval = 1
#12 0x000000000044e1d4 in Dispatch () at ../../dix/dispatch.c:437
 result = <value optimized out>
 client = (ClientPtr) 0x1c18980
 nready = 0
 start_tick = 4140
#13 0x0000000000433c5d in main (argc=8, argv=0x7fff2b839fb8, envp=<value optimized out>)
    at ../../dix/main.c:397
 i = 1
 alwaysCheckForInput = {0, 1}

Revision history for this message
Bryce Harrington (bryce) wrote :

Hmm, interesting, unfortunately you're right it's not enough information yet, but it does prove this to be a mesa bug rather than -ati. Refiling.

Looking in the code, it seems to be crashing around these lines:

   if (drawable->base.pDraw == NULL)
        return GL_FALSE;

    pScreen = drawable->base.pDraw->pScreen; // <-- crash

Since it had checked that pDraw is not NULL, it makes me wonder if it is a corrupted memory issue. A race condition is another possibility, particularly when in the middle of destroying objects. Unfortunately it looks like a lot of variables have been optimized out. It would be nice to know what is going on with the r300_dri.so calls but I'm not sure that would buy much more info than we know so far.

Bryce Harrington (bryce)
Changed in mesa (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Eugene Savelov (savelov) wrote :

happened to me as well while quitting Google earth
running x86_64 jaunty, google earth is 32-bit
radeon ATI RS482, desktop effects turned on

Revision history for this message
Eugene Savelov (savelov) wrote :

I want to add that Opengl applications (such as glxgears) do not correctly tun in background, i.e. they still display image on top of other windows, when compiz desktop effects are enabled. not sure if this is related to this bug, but that nay indicate an problem with radeon DRI / mesa / compiz integration

Revision history for this message
Aurélien COUDERC (coucouf) wrote :

Eugene Savelov : this is more likely the long standing problem that the DRI stack doesn't support redirected direct rendering. It should be fixed when the radeon driver implements DRI2 support.
http://hoegsberg.blogspot.com/2008/03/i-just-committed-last-bit-of-dri2-work.html

Bryce Harrington (bryce)
Changed in mesa (Ubuntu):
importance: Undecided → High
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mesa - 7.6.0~git20090817.7c422387-0ubuntu1

---------------
mesa (7.6.0~git20090817.7c422387-0ubuntu1) karmic; urgency=low

  [Bryce Harrington]
  * Checkout from git 20090817 (master branch) up to commit
    7c4223876b4f8a78335687c7fcd7448b5a83ad10
    + Add DRI2 support to -ati
      (LP: #329654, #404428, #327698, #321108)
    + Fix portion of MythTV Frontend does not work with RADEON DRI
      (LP: #341898)
    + Fix selection mode on RS482
      (LP: #273329)
    + Fix issue running 3D acceleration games on ATI chipsets
      (LP: #374590)
    + Provide DRI2 swap buffers
      (LP: #377090)
    + Fix blender unusable with UXA when DRI2 enabled
      (LP: #353763)
  * Drop 108_bo_assertion.patch (applied upstream)

  [Robert Hooker]
  * Only added debian/ tree from origin/ubuntu
  * Enable r600 driver. Note that it requires seperate drm modules
    not provided in this PPA or in ubuntu, and also does not work with
    KMS.

 -- Bryce Harrington <email address hidden> Fri, 21 Aug 2009 16:13:50 -0700

Changed in mesa (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.