[jaunty] X randomly crashes with radeon driver on xpress 200

Bug #336320 reported by pablomme
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mesa (Ubuntu)
Triaged
High
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-ati

I'm running Jaunty Alpha 5, which I installed on 28-Feb-2009. I've had a couple of X crashes: one happened when I tried to configure my printer, another when apport was gathering data for an unrelated kernel oops. The crash leaves me back at the login prompt. I would think there was nothing special about what I was doing that would produce a crash.

I'm attaching a tarball containing Xorg.0.log.old (which contains the backtrace), Xorg.0.log, xorg.conf and xsession-errors.

The xorg.conf file is the default one except:
- I have a custom modeline for my monitor's resolution, and
- I have set MigrationHeuristic to "smart" because read elsewhere that this may improve performance.
The first occurrences of the crash happened without setting any MigrationHeuristic, so this should not be causing the problem, and I don't think the modeline should be crashing X either.

xserver-xorg-video-ati is at version 1:6.11.0-1ubuntu2

Tags: crash
Revision history for this message
pablomme (pablomme) wrote :
Revision history for this message
pablomme (pablomme) wrote :

Judging by the traceback, I'm moving the bug over to libgl1-mesa-dri. This package got updated recently to version7.3-1ubuntu3 with a changelog:

* Add 103_rs600_support.patch: Adds support for the RS600 chip and sets
    the number of gb pipes properly for r3xx/r5xx cards.

which seems related to the traceback entry:

...
3: /usr/lib/dri/r300_dri.so(_mesa_update_texture+0x2b1) [0xb14e6e01]
...

Maybe this is a fix for the crashes? I'll report back if the problem is still there.

Revision history for this message
pablomme (pablomme) wrote :

Ok, it's not, I just had another crash with exactly the same traceback. However I still think the reassignment to mesa is correct.

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

Hi pablomme,

Could you please collect a full backtrace from when this crash occurs? Directions on collecting full backtraces are at https://wiki.ubuntu.com/X/Backtracing

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

Changed in mesa:
status: New → Incomplete
Revision history for this message
kulight (kulight) wrote :

im having similar problem with one difference im using nvidia

at random times im falling back to login (similar to what happens when pressing alt+ctrl+backspace)

Revision history for this message
kulight (kulight) wrote :
Revision history for this message
pablomme (pablomme) wrote :

@Bryce: I've found a way to make X crash almost systematically, so I am in a position to get a full backtrace. However, I followed https://wiki.ubuntu.com/X/Backtracing and I have missing symbols at the top of the backtrace, which is no good:

(gdb) backtrace full
#0 0xb13d7aee in ?? () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#1 0xb13d7e21 in _mesa_update_texture () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#2 0xb13c1fb6 in _mesa_update_state_locked () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#3 0xb13c21aa in _mesa_update_state () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#4 0xb1494148 in _mesa_GetIntegerv () from /usr/lib/dri/r300_dri.so
No symbol table info available.
#5 0xb78b3132 in __glXDRIbindTexImage (baseContext=0x9cccd88, buffer=8414,
    glxPixmap=0xa421b18) at ../../glx/glxdri.c:406
        pRegion = <value optimized out>
        pixmap = <value optimized out>
        bpp = <value optimized out>
        override = <value optimized out>
        texname = -1215888936
        format = <value optimized out>
        type = <value optimized out>
        pScreen = (ScreenPtr) 0x9b0d658
        __func__ = "__glXDRIbindTexImage"
#6 0xb78a52e8 in __glXDisp_BindTexImageEXT (cl=0x9cb5be0,
    pc=0xa66aa05c "\232\020\006") at ../../glx/glxcmds.c:1535
        client = (ClientPtr) 0x9cb7818
        context = <value optimized out>
        pGlxDraw = (__GLXdrawable *) 0x9d63660
        drawId = 16780418
        error = <value optimized out>
#7 0xb78a41a7 in __glXDisp_VendorPrivate (cl=0x9cb5be0,
    pc=0xa66aa05c "\232\020\006") at ../../glx/glxcmds.c:2250
No locals.
#8 0xb78a8d6a in __glXDispatch (client=0x9cb7818) at ../../glx/glxext.c:523
        stuff = (xGLXSingleReq *) 0xa66aa05c
        opcode = 16 '\020'
        cl = (__GLXclientState *) 0x9cb5be0
        retval = 1
#9 0x0808d5af in Dispatch () at ../../dix/dispatch.c:437
        result = <value optimized out>
        client = (ClientPtr) 0x9cb7818
        nready = 0
        start_tick = 29600
#10 0x0807231d in main (argc=10, argv=0xbfa54f44, envp=0x9d84bc0)
    at ../../dix/main.c:397
        i = <value optimized out>
        alwaysCheckForInput = {0, 1}

If I understood the guide correctly, I only had to install xserver-xorg-core-dbg, libgl1-mesa-dri-dbg and xserver-xorg-video-ati-dbg, after which (I assume) my next X session would use the dbg binaries and libraries. Or do I need to do something else? There is a r300_dri.so in libgl1-mesa-dri-dbg, so there's something I must be doing wrong...

Bryce Harrington (bryce)
Changed in mesa (Ubuntu):
importance: Undecided → High
status: Incomplete → Triaged
Revision history for this message
pablomme (pablomme) wrote :

I see the bug has been marked as "high importance". Is the above information enough for debugging, or should I try to get more?

By the way, for anyone who thinks this bug may affect them, I can reproduce it by using compiz's shift switcher in cover mode. Open a few windows, hold down the key combo, and after ~10-30 seconds of windows flying around you should get the crash.

Revision history for this message
Giovanni Condello (nanomad) wrote :

Same issue here. In addition to pablomme's backtrace, i also got two different ones
Please note that to get a full backtrace I had to rebuild libgl1-mesa-drm from deb sources without stripping the debugging symbols

Revision history for this message
Martin Olsson (mnemo) wrote :

About debug symbols. There is several ways to get them:

1) install PACKAGE-dbg packages usually work pretty well (if such a debug package exists)

2) register the ddebs repo in sources.list abd then install PACKAGE-dbgsym (which pretty much always exists)

3) rebuild DEBs with full debug symbols like giovanni did. Basically what you do is this:
mkdir my_code ; cd my_code
apt-get source PROGRAM_PACKAGE
cd PROGRAM-VERSION
DEB_BUILD_OPTIONS="nostrip noopt" debuild -us -uc -b
sudo dpkg -i ../SOME_NEWLY_CREATED_PACKAGE.deb

4) in certain extreme situations you might also want to pass -rdynamic to the linker.

PS. Another nice thing to know about is the parallel parameter you can pass in DEB_BUILD_OPTIONS to compile the code in parallel on all your CPU cores. This usually speeds things up significantly for big packages like kernel and mesa etc. Do do that you'd use something like:

DEB_BUILD_OPTIONS="parallel=8" debuild -us -uc -b

(where is 8 is the number of CPUs you have on the current machine)

Finally, there are some packages that don't implement the latest debian packing standard and then the makefiles might not be up to snuff. If the makefile doesn't recognize some option you can sometimes invoke "debian/rules" directly (possibly under fakeroot and then prefix it with stuff like MAKEFLAGS=-j6 CFLAGS="-g3 -O0" LDFLAGS=-rdynamic This kind of stuff should really not be necessary though.

Revision history for this message
Giovanni Condello (nanomad) wrote :

Just for reference, I had to use method number 3 to get a full backtrace of r300_dri.so.

Revision history for this message
Martin Olsson (mnemo) wrote :

Anyway, about your bug... We have a potential jaunty fix for another bug, namely #368049 in the pipeline and that stacktrace looks similar (but not identical!!) to your stacktrace. However, due to the nature of this bug I suspect that the fix for #368049 might possibly fix your issues as well. We cannot be sure so we need your help. It would be _very_ useful if you installed this update and saw if it fixes your issue. And while you're at it, please test for regressions as well!

From a machine with Jaunty, what you need to do is; to open System::Administration::Software sources and then switch to the "Updates" TAB. In there you need to check the "Pre-released updates" checkbox. After that you launch update-manager like usual and you'll a bunch of untested updates available. Ideally you should not install all of them blindly (but it's not a disaster if you do I guess, it's just that we can tell for sure if a potential regression came for the mesa update), instead you should:

Select all the updates where the package name contains the word "mesa", for example libgl1-mesa-dri and libgl1-mesa-glx are the two most important ones but please install all of the mesa updates, even libosmesa, mesa-utils and libglu1-mesa etc. After that just reboot the machine, and then try running the "shift switcher in cover mode" as you described earlier.

If this does not fix your issue, the next step would be to get this bug report upstreamed. But let's wait and see...

Revision history for this message
Giovanni Condello (nanomad) wrote :
Download full text (8.3 KiB)

Those updates did not help. Here is the resulting stack trace:
Sorry, try again.
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) connect 2733
Attaching to program: /usr/bin/Xorg, process 2733
Reading symbols from /usr/lib/libpciaccess.so.0...done.
Loaded symbols for /usr/lib/libpciaccess.so.0
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 0xb79026d0 (LWP 2733)]
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /usr/lib/libXfont.so.1...done.
Loaded symbols for /usr/lib/libXfont.so.1
Reading symbols from /usr/lib/libXau.so.6...done.
Loaded symbols for /usr/lib/libXau.so.6
Reading symbols from /usr/lib/libfontenc.so.1...done.
Loaded symbols for /usr/lib/libfontenc.so.1
Reading symbols from /usr/lib/libpixman-1.so.0...done.
Loaded symbols for /usr/lib/libpixman-1.so.0
Reading symbols from /usr/lib/libhal.so.1...done.
Loaded symbols for /usr/lib/libhal.so.1
Reading symbols from /lib/libdbus-1.so.3...done.
Loaded symbols for /lib/libdbus-1.so.3
Reading symbols from /usr/lib/libXdmcp.so.6...done.
Loaded symbols for /usr/lib/libXdmcp.so.6
Reading symbols from /lib/i686/cmov/libssl.so.0.9.8...done.
Loaded symbols for /lib/i686/cmov/libssl.so.0.9.8
Reading symbols from /lib/i686/cmov/libcrypto.so.0.9.8...done.
Loaded symbols for /lib/i686/cmov/libcrypto.so.0.9.8
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/tls/i686/cmov/librt.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/librt.so.1
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libsmbios.so.2...done.
Loaded symbols for /usr/lib/libsmbios.so.2
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /usr/lib/xorg/modules/extensions/libextmod.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/extensions/libextmod.so...done.
done.
Loaded symbols for /usr/lib/xorg/modules/extensions//libextmod.so
Reading symbols from /usr/lib/xorg/modules/extensions/libdbe.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/extensions/libdbe.so...done.
done.
Loaded symbols for /usr/lib/xorg/modules/extensions//libdbe.so
Reading symbols from /usr/lib/xorg/modules/extensions/libglx.so...Reading symbo...

Read more...

Revision history for this message
Giovanni Condello (nanomad) wrote :
Download full text (8.3 KiB)

Those updates did not help. Here is the resulting stack trace:
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) connect 2733
Attaching to program: /usr/bin/Xorg, process 2733
Reading symbols from /usr/lib/libpciaccess.so.0...done.
Loaded symbols for /usr/lib/libpciaccess.so.0
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 0xb79026d0 (LWP 2733)]
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /usr/lib/libXfont.so.1...done.
Loaded symbols for /usr/lib/libXfont.so.1
Reading symbols from /usr/lib/libXau.so.6...done.
Loaded symbols for /usr/lib/libXau.so.6
Reading symbols from /usr/lib/libfontenc.so.1...done.
Loaded symbols for /usr/lib/libfontenc.so.1
Reading symbols from /usr/lib/libpixman-1.so.0...done.
Loaded symbols for /usr/lib/libpixman-1.so.0
Reading symbols from /usr/lib/libhal.so.1...done.
Loaded symbols for /usr/lib/libhal.so.1
Reading symbols from /lib/libdbus-1.so.3...done.
Loaded symbols for /lib/libdbus-1.so.3
Reading symbols from /usr/lib/libXdmcp.so.6...done.
Loaded symbols for /usr/lib/libXdmcp.so.6
Reading symbols from /lib/i686/cmov/libssl.so.0.9.8...done.
Loaded symbols for /lib/i686/cmov/libssl.so.0.9.8
Reading symbols from /lib/i686/cmov/libcrypto.so.0.9.8...done.
Loaded symbols for /lib/i686/cmov/libcrypto.so.0.9.8
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/tls/i686/cmov/librt.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/librt.so.1
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libsmbios.so.2...done.
Loaded symbols for /usr/lib/libsmbios.so.2
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /usr/lib/xorg/modules/extensions/libextmod.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/extensions/libextmod.so...done.
done.
Loaded symbols for /usr/lib/xorg/modules/extensions//libextmod.so
Reading symbols from /usr/lib/xorg/modules/extensions/libdbe.so...Reading symbols from /usr/lib/debug/usr/lib/xorg/modules/extensions/libdbe.so...done.
done.
Loaded symbols for /usr/lib/xorg/modules/extensions//libdbe.so
Reading symbols from /usr/lib/xorg/modules/extensions/libglx.so...Reading symbols from /usr/lib/d...

Read more...

Revision history for this message
Martin Olsson (mnemo) wrote :

OK that's too bad. Let's start working on a good upstream bug report then. First step is to try with a more recent version of mesa (and ATI) and see if this helps.

Please activate the xorg-edgers PPA: https://launchpad.net/~xorg-edgers/+archive/ppa

Basically what do need to do is:
1. add these lines to /etc/apt/sources.list:
deb http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu jaunty main

2. run "sudo apt-get update && sudo apt-get upgrade"
3. reboot and then try your repro with the shift switcher once again.

PS. If you still have the "proposed updates" checkbox ticked just uncheck it.

If you can repro your crash with xorg-edgers, then please ssh into the box right after it crashed and then run:
apport-collect 336320
(this command will upload all the necessary details to the bug such as hw / sw config data etc and also dmesg and xorg.log with stack and so on)

Revision history for this message
Giovanni Condello (nanomad) wrote :

Luckyly, it seems fixed with xorg-edgers ppa
Looks like a bug in mesa libs

Revision history for this message
Giovanni Condello (nanomad) wrote :

Installing those packages seems to fix the bug.

libdrm-dev uptodate 2.4.9+git20090502.r1.68103b27-0ubuntu0sarvatt
libdrm-intel1 uptodate 2.4.9+git20090502.r1.68103b27-0ubuntu0sarvatt
libdrm-nouveau1 uptodate 2.4.9+git20090502.r1.68103b27-0ubuntu0sarvatt
libdrm2 uptodate 2.4.9+git20090502.r1.68103b27-0ubuntu0sarvatt
libdrm2-dbg uptodate 2.4.9+git20090502.r1.68103b27-0ubuntu0sarvatt
libgl1-mesa-dev uptodate 7.4.1~git20090503+mesa-7-4-branch.63375254-0ubuntu0sarvatt
libgl1-mesa-dri uptodate 7.4.1~git20090503+mesa-7-4-branch.63375254-0ubuntu0sarvatt
libgl1-mesa-dri-dbg uptodate 7.4.1~git20090503+mesa-7-4-branch.63375254-0ubuntu0sarvatt
libgl1-mesa-glx uptodate 7.4.1~git20090503+mesa-7-4-branch.63375254-0ubuntu0sarvatt
libgl1-mesa-glx-dbg uptodate 7.4.1~git20090503+mesa-7-4-branch.63375254-0ubuntu0sarvatt
libglu1-mesa uptodate 7.4.1~git20090503+mesa-7-4-branch.63375254-0ubuntu0sarvatt
libglu1-mesa-dev uptodate 7.4.1~git20090503+mesa-7-4-branch.63375254-0ubuntu0sarvatt
libosmesa6 uptodate 7.4.1~git20090503+mesa-7-4-branch.63375254-0ubuntu0sarvatt
libosmesa6-dev uptodate 7.4.1~git20090503+mesa-7-4-branch.63375254-0ubuntu0sarvatt
mesa-common-dev uptodate 7.4.1~git20090503+mesa-7-4-branch.63375254-0ubuntu0sarvatt
mesa-utils uptodate 7.4.1~git20090503+mesa-7-4-branch.63375254-0ubuntu0sarvatt

I'm reverting to jaunty proposed updates to see if it is fixed there.

Revision history for this message
pablomme (pablomme) wrote :

I can also confirm that the PPA packages fix the problem. I suppose that the next thing to do is to find what fixed the problem and backport the patch into Jaunty's mesa version. Let us know if you want us to try out any test packages.

PS, the PPA keys can be added using:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 8844C542
Launchpad should tell you the exact command to do this on the PPA front page...

PS2, should the lack of debugging symbols in the -dbg packages I had trouble with be reported as a bug?

Revision history for this message
Giovanni Condello (nanomad) wrote :

Actually, the patch might already be coming in jaunty-proposed as a fix for bug #368049. Since it will take at least 10hours for the new package to be built, I'm building the new mesa version by myself.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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