Red Hat Bugzilla – Bug 166571
Xserver infinite loop if xf86PciBus list contains bridge with primary bus value of -1
Last modified: 2007-11-30 17:07:19 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Description of problem:
There is a bug in the Xserver on RHEL4 which will cause the Xserver to hang in an infinite loop on startup on Unisys ES7000/600 systems. The problem is in source file xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c in routine FindPCIVideoInfo. The while(TRUE) loop will never break if the xf86PciBus list contains a bridge with a primary bus value of negative one. There is a patch, XFree86-4.3.0-ia64-pci-infinite-loop.patch, in the source RPM, xorg-x11-6.8.1-23.EL.src.rpm, which fixes this problem. However, the patch is ifdefed ia64 only, and the bug is not unique to ia64 systems. The problem can occur on any system that leaves the primary bus on a bridge as -1, like the ES7000/600 running in x86_64 or ia32 mode. The loop should never continue past a bus number of -1 on any system, so the ifdefs should be removed from the patch, and the while(TRUE) code should be replaced with the while(j >= 0) code unconditionally.
As an alternative to the current patch file in the Redhat source, Egbert Eich released a patch on 10-12-2004 to the head of the Xorg tree (cvs revision 1.5) to routine xf86GetPciBridgeInfo. His patch addresses the problem more close to the root by preventing table entries with a primary bus value of negative one from occurring in the first place.
[I've opened this bug on behalf of Bill Jordan -- firstname.lastname@example.org -- because he's still in the process of getting his bugzilla id set up.]
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. This can be reproduced on an ES7000/600 simply by entering GUI mode. HOWEVER, Unisys has detoured this modifying the BIOS to turn off the VGA_EN bit in the PCI-to-PCI bridge hosting the video chip. Therefore, you'll need to get a test BIOS from Unisys to restore the original behavior.
Actual Results: You never successfully enter GUI mode; Xserver hangs in a loop.
Expected Results: Enter GUI mode.
Additional details about the ES7000/600's internal architecture and how it exposed this bug can be provided upon request. Please feel free to contact William.Jordan@unisys.com or Jason.Davis@unisys.com
Bruce, could you create an Issue Tracker for this? I don't recall discussing
this in our meeting today... Thanks! :-)
(In reply to comment #3)
> This one will need extensive testing since it is known that some x86-64
> systems have issues with this hack (at least they did on the kernel level)
As such, rather than making the patch apply to non-ia64, I decided to backport
the patch from CVS instead, as it seems like the better long term solution:
>As an alternative to the current patch file in the Redhat source, Egbert Eich
>released a patch on 10-12-2004 to the head of the Xorg tree (cvs revision 1.5)
>to routine xf86GetPciBridgeInfo. His patch addresses the problem more close to
>the root by preventing table entries with a primary bus value of negative one
>from occurring in the first place.
* Tue Nov 29 2005 Mike A. Harris <email@example.com> 6.8.2-1.EL.13.22
- Added xorg-x11-6.8.2-Xserver-pci-infinite-loop.patch, replacing previous
workaround XFree86-4.3.0-ia64-pci-infinite-loop.patch which was
conditionalized to ia64, which fixes bug (#166571).
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.