X crashing with Geode GX2 on Jaunty

Bug #327484 reported by Stéphane Graber
12
Affects Status Importance Assigned to Milestone
xserver-xorg-video-geode (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-geode

Back in Intrepid, GX2 support was broken and required using a custom xorg.conf to work containing the following (bug 270912):
Section "Device"
    Identifier "Device0"
    Driver "geode"
    Option "AccelMethod" "XAA"
EndSection

Now trying with Jaunty, I never managed to get X to start with:
 - No xorg.conf
 - The above xorg.conf
 - Only the Driver forced (so using EXA instead of XAA)

In cases where I have a xorg.conf I get the following crash:

AmdPciProbe: Probing for supported devices!
Unable to open /dev/cpu/0/msr: 2
Unable to read the MSR - reverting to the VSA method.

Backtrace:
#0 0x08072df3 in dixSetPrivate (privates=0x85ccba0, key=0xb78a0b90, val=0x85e4f18) at ../../dix/privates.c:79
No locals.
#1 0xb7875248 in GXRandRInit (pScreen=0x85cca50, rotation=15) at gx_randr.c:366
No locals.
#2 0xb786faa8 in GXScreenInit (scrnIndex=0, pScrn=0x85cca50, argc=3, argv=0xbfd69654) at gx_driver.c:1402
 pScrni = (ScrnInfoPtr) 0x85c7ff8
 pGeode = (GeodeRec *) 0x85c8708
 shadowReq = {majorversion = 1 '\001', minorversion = 1 '\001', patchlevel = 0, abiclass = 0x0, abiversion = 0, moduleclass = 0x0}
 maj = -1215891701
 min = 0
 ret = <value optimized out>
 rotate = -995204112
#3 0x08071a4d in AddScreen (pfnInit=0xb786f700 <GXScreenInit>, argc=3, argv=0xbfd69654) at ../../dix/main.c:702
 i = 0
 scanlinepad = 32
 depth = <value optimized out>
 bitsPerPixel = <value optimized out>
 k = 2
 pScreen = (ScreenPtr) 0x85cca50
#4 0x080afb26 in InitOutput (pScreenInfo=0x81f6c20, argc=3, argv=0xbfd69654) at ../../../../hw/xfree86/common/xf86Init.c:1245
 i = 0
 j = 0
 k = <value optimized out>
 scr_index = <value optimized out>
 modulelist = <value optimized out>
 optionlist = (pointer *) 0x85c2dc0
 layout = (screenLayoutPtr) 0x85bc028
---Type <return> to continue, or q <return> to quit---
 screenpix24 = <value optimized out>
 pix24 = Pix24Use32
 pix24From = X_DEFAULT
 autoconfig = <value optimized out>
 configured_device = <value optimized out>
#5 0x08072141 in main (argc=3, argv=0xbfd69654, envp=0xbfd69664) at ../../dix/main.c:315
 i = <value optimized out>
 alwaysCheckForInput = {0, 1}

When I don't have a xorg.conf, it just fails detecting the right driver (as it did with Intrepid):
AmdPciProbe: Probing for supported devices!

Fatal server error:
Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices

Please consult the The X.Org Foundation support
  at http://wiki.x.org
 for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

 ddxSigGiveUp: Closing log

Attached is a Xorg log file

Tags: crash
Revision history for this message
Stéphane Graber (stgraber) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi stgraber,

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 xserver-xorg-video-geode:
status: New → Incomplete
Revision history for this message
Stéphane Graber (stgraber) wrote :

root@ltsp1191:~# gdb /usr/bin/Xorg
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) run -config /var/run/ltsp-xorg.conf
Starting program: /usr/bin/Xorg -config /var/run/ltsp-xorg.conf
[Thread debugging using libthread_db enabled]

This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.

X.Org X Server 1.5.99.902 (1.6.0 RC 2)
Release Date: 2009-1-30
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-19-server i686 Ubuntu
Current Operating System: Linux ltsp1191 2.6.28-8-generic #27-Ubuntu SMP Wed Mar 4 23:12:17 UTC 2009 i586
Build Date: 18 February 2009 01:41:32AM
xorg-server 2:1.5.99.902-0ubuntu7 (<email address hidden>)
 Before reporting problems, check http://wiki.x.org
 to make sure that you have the latest version.
Markers: [ 0.024474] (--) probed, [ 0.025308] (**) from config file, [ 0.026089] (==) default setting,
 [ 0.026893] (++) from command line, [ 0.027750] (!!) notice, [ 0.028415] (II) informational,
 [ 0.029255] (WW) warning, [ 0.030025] (EE) error, [ 0.030904] (NI) not implemented, [ 0.031759] (??) unknown.
[ 0.033423] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Mar 5 22:27:11 2009
[ 0.034569] (++) Using config file: "/var/run/ltsp-xorg.conf"
[New Thread 0xb7abb6d0 (LWP 4332)]
[tcsetpgrp failed in terminal_inferior: Operation not permitted]
AmdPciProbe: Probing for supported devices!
Unable to open /dev/cpu/0/msr: 2
Unable to read the MSR - reverting to the VSA method.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7abb6d0 (LWP 4332)]
0x08072cd3 in dixSetPrivate (privates=0x907cbd8, key=0xb7a29b90, val=0x9094f50) at ../../dix/privates.c:79
79 ../../dix/privates.c: No such file or directory.
 in ../../dix/privates.c
(gdb) bt
#0 0x08072cd3 in dixSetPrivate (privates=0x907cbd8, key=0xb7a29b90, val=0x9094f50) at ../../dix/privates.c:79
#1 0xb79fe248 in GXRandRInit (pScreen=0x907ca88, rotation=15) at gx_randr.c:366
#2 0xb79f8aa8 in GXScreenInit (scrnIndex=0, pScrn=0x907ca88, argc=3, argv=0xbfcf1dd4) at gx_driver.c:1402
#3 0x0807192d in AddScreen (pfnInit=0xb79f8700 <GXScreenInit>, argc=3, argv=0xbfcf1dd4) at ../../dix/main.c:702
#4 0x080af786 in InitOutput (pScreenInfo=0x81f70e0, argc=3, argv=0xbfcf1dd4) at ../../../../hw/xfree86/common/xf86Init.c:1245
#5 0x08072021 in main (argc=3, argv=0xbfcf1dd4, envp=0xbfcf1de4) at ../../dix/main.c:315

Changed in xserver-xorg-video-geode:
status: Incomplete → New
Revision history for this message
Stéphane Graber (stgraber) wrote :
Download full text (3.5 KiB)

bt full:

root@ltsp1199:~# gdb /usr/bin/Xorg
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) run -config /var/run/ltsp-xorg.conf
Starting program: /usr/bin/Xorg -config /var/run/ltsp-xorg.conf
[Thread debugging using libthread_db enabled]

X.Org X Server 1.6.0
Release Date: 2009-2-25
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-19-server i686 Ubuntu
Current Operating System: Linux ltsp1199 2.6.28-9-generic #29-Ubuntu SMP Sun Mar 8 02:03:17 UTC 2009 i586
Build Date: 07 March 2009 02:18:57AM
xorg-server 2:1.6.0-0ubuntu1 (<email address hidden>)
 Before reporting problems, check http://wiki.x.org
 to make sure that you have the latest version.
Markers: [ 0.022719] (--) probed, [ 0.023653] (**) from config file, [ 0.024437] (==) default setting,
 [ 0.025127] (++) from command line, [ 0.025971] (!!) notice, [ 0.026732] (II) informational,
 [ 0.027609] (WW) warning, [ 0.028386] (EE) error, [ 0.029166] (NI) not implemented, [ 0.029951] (??) unknown.
[ 0.031991] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Mar 12 21:11:49 2009
[ 0.033129] (++) Using config file: "/var/run/ltsp-xorg.conf"
[New Thread 0xb79326d0 (LWP 4776)]
[tcsetpgrp failed in terminal_inferior: Operation not permitted]
AmdPciProbe: Probing for supported devices!
Unable to open /dev/cpu/0/msr: 2
Unable to read the MSR - reverting to the VSA method.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb79326d0 (LWP 4776)]
0x08072df3 in dixSetPrivate (privates=0x85ccba0, key=0xb78a0b90, val=0x85e4f18) at ../../dix/privates.c:79
79 ../../dix/privates.c: No such file or directory.
 in ../../dix/privates.c
(gdb) bt full
#0 0x08072df3 in dixSetPrivate (privates=0x85ccba0, key=0xb78a0b90, val=0x85e4f18) at ../../dix/privates.c:79
No locals.
#1 0xb7875248 in GXRandRInit (pScreen=0x85cca50, rotation=15) at gx_randr.c:366
No locals.
#2 0xb786faa8 in GXScreenInit (scrnIndex=0, pScrn=0x85cca50, argc=3, argv=0xbfd69654) at gx_driver.c:1402
 pScrni = (ScrnInfoPtr) 0x85c7ff8
 pGeode = (GeodeRec *) 0x85c8708
 shadowReq = {majorversion = 1 '\001', minorversion = 1 '\001', patchlevel = 0, abiclass = 0x0, abiversion = 0, moduleclass = 0x0}
 maj = -1215891701
 min = 0
 ret = <value optimized out>
 rotate = -995204112
#3 0x08071a4d in AddScreen (pfnInit=0xb786f700 <GXScreenInit>, argc=3, argv=0xbfd69654) at ../../dix/main.c:702
 i = 0
 scanlinepad = 32
 depth = <value optimized out>
 bitsPerPixel = <value optimized out>
 k = 2
 pScreen = (ScreenPtr) 0x85cca50
#4 0x080afb26 in InitOutput (pScreenInfo=0x81f6c20, argc=3, argv=0xbfd69654) at ../../../../hw/xfree86/common/xf86Init.c:1245
 i = 0
 j = 0
 k = <value optimized out>
 scr_index = <value optimized out>
 modulelist = <value optimized out>
 optionlist = (pointer *) 0x85c2dc0
 layout = (screenLayoutPtr) 0x85bc028
---Type <return> to contin...

Read more...

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

Thanks for the complete backtrace.
Looking at the code, it's not evident what's causing the crash:

#0 0x08072df3 in dixSetPrivate (privates=0x85ccba0, key=0xb78a0b90, val=0x85e4f18) at ../../dix/privates.c:79

From the dixSetPrivate() routine's code, the segfault must be due to something invalid inside the privates data structure, such as a linked list not being correctly terminated or something.

What I would do from here is try to examine the 'private' data structure in gdb, looking through its contents to see if there is something irregular.

Also, I would suggest setting a breakpoint on GXRandRInit(), then step into the dixSetPrivate() call, and step through each line to see exactly which line it's failing on. (The backtrace says it's line 79 but that's clearly incorrect since dixSetPrivate() is at a completely different line number.) Knowing the correct line number would give a better clue on why it's failing.

Changed in xserver-xorg-video-geode:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Stéphane Graber (stgraber) wrote :

Start gdb, added a breakpoint on GXRandRInit(), then went with "next" until I reached dixSetPrivate(), then continued with "step" until it crashes.

Revision history for this message
Stéphane Graber (stgraber) wrote :

A workaround for LTSP users has been uploaded matching that PCIID and forcing VESA instead of Geode.
Performances will be significantly slower but X will at least work.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

I might be wrong, but recent GX2-specific fixes committed by Otavio Salvator and included in 2.11.3 might fix this. Could someone with GX2 hardware test this?

Revision history for this message
Stéphane Graber (stgraber) wrote : Re: [Bug 327484] Re: X crashing with Geode GX2 on Jaunty

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin-Éric Racine wrote:
> I might be wrong, but recent GX2-specific fixes committed by Otavio
> Salvator and included in 2.11.3 might fix this. Could someone with GX2
> hardware test this?
>

I'll give it a try with Karmic when I have some free time.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpY1XoACgkQjxyfqkjBhuxdBgCdEtxkcUzoRarGjztXntVsMbeP
Jl4An2CaXpusk2I/a63FPg8/Og3y8jul
=rVuO
-----END PGP SIGNATURE-----

Revision history for this message
gutmensch (trav-gmx) wrote :

@Martin-Éric:
Just wanted to let you know that this bug is still alive ;-)

First I tried xf86-video-geode-2.10.1, then recompiled latest 2.11.3 - still the same crash with dixSetPrivate and GXRandRInit on GX2 hardware, though I must admit that I'm using xorg-server 1.6.1 with tinycore 2.2 and AccelMethod XAA (EXA doesn't work at all), and not ubuntu.

Will pull a full backtrace with gdb as soon as I can load it into tc! ;)

Best regards,
Robert

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Robert, thanks for keeping in touch about this bug.

To be honest, GX2 support has somewhat fallen behind since most Geode hardware manufacturers have switched to the LX series which, in turn, means that only that section of the code is kept alive.

As such, we can really use all the developer and tester help we can get for GX2 and also to finally reach our goal of merging GX1 support into this xf86-video-geode driver. Please see http://wiki.x.org/wiki/GeodeDriver for the current status of this driver and for more detailed instructions on how you can help.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Please try the test package xserver-xorg-video-geode_2.11.3~git20090818-1_i386.deb (or newer) as found in my PPA at https://launchpad.net/~q-funk/+archive/ppa and let us know if this fixes the issue or not.

Revision history for this message
gutmensch (trav-gmx) wrote :

Thanks for your reply, Martin-Eric, and of course your kind words according to the problem ;-)

Do you know of any "simple" (and really basic) USB-Boot-Xorg-Debug-Version that I could use for the Geode Thin Client for general testing? The client doesn't have a hard disk and only 512 MB of RAM, installing something via USB is quite exhausting...

Best regards,
Robert

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Robert, I'm sorry but I don't know of any mini USB-based distro to quickly test this driver. The best I can think of is to follow these instructions to install the test package and rebuild your LTSP chroot:

$ sudo chroot /opt/ltsp/i386

Add the repository, then update and upgrade:

# echo "deb http://ppa.launchpad.net/q-funk/ppa/ubuntu jaunty main" >> /etc/apt/sources.list

# apt-get update && apt-get upgrade && apt-get clean

# exit

Update the LTSP boot image:

$ sudo ltsp-update-image --arch=i386

Revision history for this message
gutmensch (trav-gmx) wrote :

Ah thanks I will try that, in the meantime I can check the driver easier with a compile in tinycore linux, does the file xserver-xorg-video-geode_2.11.3~git20090818.orig.tar.gz contain the latest changes? If so, I can say that it already compiles fine and I will test it in the evening!

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Yes, it contains everything that is currently sitting in upstream GIT.

Revision history for this message
gutmensch (trav-gmx) wrote :

2.11.3-git20090818 Tested yesterday, driver loads (no backtrace anymore), but then only massive white/black polygon flickering and no response from the computer (only hard reset helps), sorry for not providing more information but since it's a ram-based linux even the log files are gone after a reboot ;-) Still planning to make some usb debug version for the geode, I will keep you updated!

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Can you please try again with Debian upstream 2.11.3-2 and see if it helps? I only included the change of default Accel in that one.

Revision history for this message
gutmensch (trav-gmx) wrote :

Tested, that only changed the "visual" behaviour (just black screen instead of flickering) but again total system freeze, only sysrq helped out :-/

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

I have uploaded version 2.11.3-2 in Karmic a couple of days ago. Can you please try and see if this fixes it?

Revision history for this message
gutmensch (trav-gmx) wrote :

Tested today, I'm including Xorg.0.log for EXA and XAA, seems there's no change!
Best regards,
Robert

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Bryce, you mentioned something about dixSetPrivate as the possible cause. Do you see anything in the following upstream GIT commit that would fix it:

http://cgit.freedesktop.org/xorg/driver/xf86-video-geode/commit/?id=b28abde0276ddd7f687242f3886f98b0e49a7fc2

This commit concerns precisely dixSetPrivate on GX2.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Stéphane: could you also install the source package for xorg-server-core and produce a new trace? This would allow GDB to show us the actual content of line 79 in privates.c that causes the crash. Thanks!

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

xorg/xserver/dix/privates.c is the file in the source code that we're talking about.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Could these devPrivates rework in X server core be the cause of our grief?

commit a95bb52b4366d85fc049130c60af5c9e727c565b
Author: Eamon Walsh <email address hidden>
Date: Mon Nov 19 16:34:38 2007 -0500
     devPrivates rework: add missing include of dix/privates.h
commit 4017d3190234e189a0bbd33193a148d4d3c7556b
Author: Eamon Walsh <email address hidden>
Date: Tue Aug 28 09:28:25 2007 -0400
     devPrivates rework: since API is already broken, switch everything
     over to new system.
commit 1f06d32ef58749d0f0c062193d237ee98f60e90f
Merge: cf962a8... fc162c6...
Author: Eamon Walsh <email address hidden>
Date: Tue Apr 17 12:10:22 2007 -0400
    Merge branch 'master' into XACE-SELINUX
    Conflicts:
        dix/privates.c

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Please try the latest package from my personal PPA:

https://launchpad.net/~q-funk/+archive/ppa

Does it resolve the issue?

Revision history for this message
Stéphane Graber (stgraber) wrote :

I did a quick test with an up to date Karmic and Martin's PPA, X starts correctly as long as geode is selected as driver.
There is no need of any additional option, though the driver reports screen resolution that are supported by the monitor but the video card can't render (such as 1680x1050), other than that, it seems to work fine and is clearly a lot better than the old crashing driver.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Stéphane Graber reports in bug #270912 that Geode 2.11.4.1 (currently in my PPA) resolves this issue for him.

FYI, maximum resolutions supported by the GX2 "Red Cloud" Geode are:

CRT: 1600x1200
TFT: 1280x1024

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Fixes for GX2 support probably need to be backported to Jaunty and Intrepid, maybe even Hardy. However, I have no GX2 hardware to test with (I only have GX1 and LX hardware on hand), so I'm unable to verify which Ubuntu releases need this fix backported.

Revision history for this message
gutmensch (trav-gmx) wrote :

I can report basically the same, this issue seems to be resolved, geode driver loads correctly, no errors visible in Xorg.0.log. However I still have the strange problem of a totally black screen when the driver loads, tested on one 1920x1200 and one 1024x768 TFT (it maybe related to the Wyse thin client?). The system is responding but just a permanent black screen. Tried different options like EXA and XAA but no change... is anything like this already reported?

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

gutmensch: Nothing like this was ever reported. Can you please open a separate bug for that issue?

Closing LP bug #327484, since the crash itself is fixed.

Changed in xserver-xorg-video-geode (Ubuntu):
status: Triaged → Fix Released
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.