Bug 16382 - Infinite loop in xorg-server xf86ProbeOutputModes()
Summary: Infinite loop in xorg-server xf86ProbeOutputModes()
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-16 15:29 UTC by Laurence Withers
Modified: 2008-06-23 04:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Configuration file which causes error condition (3.49 KB, text/plain)
2008-06-16 15:29 UTC, Laurence Withers
no flags Details
Log file corresponding to X process getting stuck in infinite loop (46.40 KB, text/plain)
2008-06-16 15:30 UTC, Laurence Withers
no flags Details
Log file corresponding to working, patched X (57.70 KB, text/plain)
2008-06-16 15:30 UTC, Laurence Withers
no flags Details
Patch which fibes infinite loop (814 bytes, text/plain)
2008-06-16 15:31 UTC, Laurence Withers
no flags Details

Description Laurence Withers 2008-06-16 15:29:37 UTC
Created attachment 17150 [details]
Configuration file which causes error condition

I am attempting to set up a dual-head configuration [xorg-server-1.4.2 with the ati driver]. I have found that there is an infinite loop in the function xf86ProbeOutputModes(), at least with some configurations in xorg.conf .

I will attach the xorg.conf which causes the error, and an attempt at a patch to fix the problem.

It looks as though the problem is caused by moving "preferred" modes to the start of a doubly-linked list; the problem comes if there is more than one preferred mode, since when we move the current node to the head of the list we will encounter any previous preferred modes again, and repeat the process.

The patch gets around this by remembering the "next" pointer before moving the node. However, I'm not sure if this isn't just masking a bigger problem -- are multiple occurrences of preferred modes valid?
Comment 1 Laurence Withers 2008-06-16 15:30:25 UTC
Created attachment 17151 [details]
Log file corresponding to X process getting stuck in infinite loop
Comment 2 Laurence Withers 2008-06-16 15:30:54 UTC
Created attachment 17152 [details]
Log file corresponding to working, patched X
Comment 3 Laurence Withers 2008-06-16 15:31:22 UTC
Created attachment 17153 [details]
Patch which fibes infinite loop
Comment 4 Julien Cristau 2008-06-23 04:36:41 UTC
On Mon, Jun 16, 2008 at 15:29:38 -0700, bugzilla-daemon@freedesktop.org wrote:

> It looks as though the problem is caused by moving "preferred" modes to the
> start of a doubly-linked list; the problem comes if there is more than one
> preferred mode, since when we move the current node to the head of the list we
> will encounter any previous preferred modes again, and repeat the process.
> 
> The patch gets around this by remembering the "next" pointer before moving the
> node. However, I'm not sure if this isn't just masking a bigger problem -- are
> multiple occurrences of preferred modes valid?
> 
I think this was fixed in master after 1.4 by adding a userpref flag for
xorg.conf modes and having it override the monitor preferred mode.
See commits feac0759522cbdc3e61ccfa373df735903c5cb27 and
29e0e180729a4f0cc020985a4de4c8bc4b9c7f5f.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.