Bugzilla – Bug 132308
X server crashes
Last modified: 2006-01-12 05:29:38 UTC
# gdb --args Xorg -config xorg.conf GNU gdb 6.3.50.20051003-cvs Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "ia64-suse-linux"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) r Starting program: /usr/X11R6/bin/Xorg -config xorg.conf This is a pre-release version of the The X.Org Foundation X11. 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 The X.Org Foundation "monolithic tree" CVS repository hosted at http://www.freedesktop.org/Software/xorg/ X Window System Version 6.8.99.901 (6.9.0 RC 1) Release Date: 18 October 2005 + cvs X Protocol Version 11, Revision 0, Release 6.8.99.901 Build Operating System: SuSE Linux [ELF] SuSE Current Operating System: Linux brouwer 2.6.14-15.2-default #1 SMP Thu Nov 3 13:20:43 UTC 2005 ia64 Build Date: 04 November 2005 Before reporting problems, check http://wiki.X.Org to make sure that you have the latest version. Module Loader present Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Fri Nov 4 14:29:07 2005 (++) Using config file: "xorg.conf" Program received signal SIGSEGV, Segmentation fault. 0x40000000000cad51 in xf86PostScanAltix () at altixPCI.c:98 98 prevBusNum = curBusNum = pdev[0]->busnum; (gdb) p pdev $1 = (pciConfigPtr *) 0x60000000000478d8 (gdb) p pdev[0] $2 = (pciConfigPtr) 0x0 (gdb) bt #0 0x40000000000cad51 in xf86PostScanAltix () at altixPCI.c:98 #1 0x40000000000babd0 in ia64ScanPCIWrapper (flags=SCANPCI_TERM) at ia64Pci.c:238 #2 0x40000000000cac90 in xf86scanpci (flags=-1) at Pci.c:892 #3 0x4000000000060b70 in FindPCIVideoInfo () at xf86pciBus.c:201 #4 0x40000000000557f0 in xf86BusProbe () at xf86Bus.c:116 #5 0x4000000000040920 in InitOutput (pScreenInfo=0x6000000000054778, argc=3, argv=0x60000fffff91b058) at xf86Init.c:391 #6 0x400000000014b960 in main (argc=3, argv=0x60000fffff91b058, envp=0x60000fffff91b078) at main.c:372
Created attachment 56480 [details] xorg.conf
Ok. Nullpointer reference. altixPCI.c:xf86PostScanAltix() [...] pdev = xf86scanpci(0); prevBusNum = curBusNum = pdev[0]->busnum; ^^^^^^^ Pretty new this stuff. See also Bug X.Org #2373 https://bugs.freedesktop.org/show_bug.cgi?id=2373 Assigning to Egbert, since he already looked at this before.
SGI, would you mind also looking into this? Graphics enablement...
Forthcoming patch will be attached to: Bug 5000: Domain support does not work for SGI Altix machines https://bugs.freedesktop.org/show_bug.cgi?id=5000
Thanks. I've added myself to Cc now.
Created attachment 56955 [details] Patch to fix PCI domain support for Altix Patch from X.Org Bugzilla (#5000). "This patch works on Altix, and should fall back correctly on other platforms."
*** Bug 133236 has been marked as a duplicate of this bug. ***
From looking at this patch I cannot find anything that appears to be questionable. The patch attempts to be less intrusive than would normally be. Please test it on one or two non-Altix to verify this in reality. Then I don't have any problems with this patch going in. I will revisit the PCI domain issue later.
The patch does the wrong thing for non-SGI systems. It causes all pci devices to be enumerated multiple time (once for each possible domain).
The change in linuxOpenLegacy also does not make any sense. Rather xf86GetPciDomain should be changed.
But this is not the cause of the problem. The problem comes from linuxPciOpenFile(). I'm looking for the best fix.
Created attachment 58767 [details] New patch lightly tested on Altix
Created attachment 58769 [details] Alternative patch This one's much faster at startup. I readded the '- 1' in openLegacy. without it the fallback code is called all the time.
IMHO the change in xf86GetPciDomain is still needed, but I haven't tested it yet.
Domain 0 is treated special. I don't know why. The author of domain support has added some incredible complexity. This will go once I revisit this code. As long as this isn't changed we may have to start numbering with 1. I know - this is ugly.
The last patch does not work. Just because a specific pci bus does not exist does not mean that domains are not supported at all.
Created attachment 58776 [details] Tested patch This patch is tested and works, both on Altix and other systems.
Created attachment 58825 [details] better domain support detection This patch should fix the problem with the domain detection and speeds up startup considerably. I have only test on zx2000 at the moment, though.
When bus >= 256 you should use %04x for printing (twice). -sprintf(file, "/proc/bus/pci/%04x:%02x", domain, bus); +sprintf(file, "/proc/bus/pci/%04x:%04x", domain, bus); -sprintf(file, "/proc/bus/pci/%04x:%02x/%02x.%1x", +sprintf(file, "/proc/bus/pci/%04x:%04x/%02x.%1x",
The patch only builds if INCLUDE_XF86_NO_DOMAIN is not defined.
Created attachment 58912 [details] Final patch
> Final patch Egbert, can you confirm this?
Yes. I forgot to add the: + #ifndef INCLUDE_XF86_NO_DOMAIN domain_support = linuxDomainSupport(); + #endif and of course the sprintf changes are correct.
Thanks. I'll take care of this now.
xorg-x11 package submitted for STABLE (fixed for Alpha4).
Created attachment 63024 [details] Incremental patch to fix Bug #142039 Andreas Schwab made a patch, which fixes Bug #142039.