Bug 16233

Summary: [Randr12] Server crash when detecting DVI output change
Product: xorg Reporter: Christopher James Halse Rogers <chalserogers>
Component: Driver/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium Keywords: regression
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg log containing crash after running 'xrandr'
none
dmesg log, before crash with 'xrandr'
none
dmesg log, after crashing with 'xrandr' and X restarting.
none
GDB session of X server crash upon running "xrandr"
none
allow screen dimensions to change none

Description Christopher James Halse Rogers 2008-06-04 14:50:58 UTC
Created attachment 16916 [details]
Xorg log containing crash after running 'xrandr'

I have two DVI devices: a LCD panel with single channel DVI interface and a TV connected over a dual-channel DVI->HDMI.  Nouveau kills X when swapping between them in the following way:
1) Connect LCD panel to DVI port.
2) xrandr --auto to bring it up.
3) xrandr --output DVI-D-0 --off to bring it down
4) Disconnect LCD, plug DVI->HDMI cable into same DVI port
5) Run xrandr <-- Crash here.

This is symmetric, in that TV->LCD crashes in the same way that LCD->TV does.

I've run a git-bisect, and the offending commit is:
cdae2e26cc432ba572f92522f1b3454264d38f43 is first bad commit
commit cdae2e26cc432ba572f92522f1b3454264d38f43
Author: Maarten Maathuis <madman2003@gmail.com>
Date:   Fri Jan 25 00:10:08 2008 +0100

    randr12: Rework native modes for TMDS.
    
    - Choose a preferred ddc mode when available, otherwise the one with the highest refresh.
    - Fall back on cvt modes, only when needed.

:040000 040000 497af7e1199ee5079d38ab8dd668c1612230dfb7 78929b01e4e079417a26e25b64788c5c75cf3878 M      src
Comment 1 Christopher James Halse Rogers 2008-06-04 14:51:50 UTC
Created attachment 16917 [details]
dmesg log, before crash with 'xrandr'
Comment 2 Christopher James Halse Rogers 2008-06-04 14:53:40 UTC
Created attachment 16918 [details]
dmesg log, after crashing with 'xrandr' and X restarting.
Comment 3 Stuart Bennett 2008-06-25 11:53:20 UTC
Using current DDX code, can you attach gdb to the Xorg process (using an xserver with debug symbols, as described in http://www.x.org/wiki/Development/Documentation/ServerDebugging) before triggering this bug, to give a better idea of what member gets dereferenced and causing problems in xf86DuplicateMode?
Comment 4 Christopher James Halse Rogers 2008-06-26 05:10:50 UTC
Created attachment 17392 [details]
GDB session of X server crash upon running "xrandr"

GDB backtrace, taken by starting X attached to TV, plugging in the LCD, attaching gdb and running "xrandr"
Comment 5 Stuart Bennett 2008-06-26 06:48:06 UTC
Created attachment 17393 [details] [review]
allow screen dimensions to change

Try this
Comment 6 Christopher James Halse Rogers 2008-06-28 19:03:47 UTC
That works, thanks.

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.