Bug 596303

Summary: X Server hangs after logging into gnome with particular user
Product: Red Hat Enterprise Linux 6 Reporter: David Kutálek <dkutalek>
Component: xorg-x11-drv-intelAssignee: Adam Jackson <ajax>
Status: CLOSED DUPLICATE QA Contact: desktop-bugs <desktop-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: airlied
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: card_GM45
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-11 06:36:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Randr configuration file causing hangs
none
lspci -vv output
none
Relevant part of /var/log/messages
none
Xorg logs none

Description David Kutálek 2010-05-26 14:50:39 UTC
Created attachment 416865 [details]
Randr configuration file causing hangs

Description of problem:

I am using RHEL6 on laptop in docking station with external monitor.

Today after opening of partially closed laptop (still in docking station, with monitor attached to docking station, not sleeping - being in screensaver and waiting for password) strange thing happened. Position of laptop-screen to monitor-screen swapped - from laptop left and monitor right to vice versa.

So I entered password to screensaver and click gnome-display-settings applet to change it back. There was some warning telling me there is a probem with monitor settings (I am sorry for not having screenshot). Anyway, I switched position back and - X server hanged.

After logging via ssh and doing reboot -f (shutdown -r now did not work), this hang repeatedly happens every time I log into Gnome with same user. With new user it does not happen.

I tracked the problem down to ~/.config/monitors.xml (and monitors.xml.backup).
Without these files, logging for this particular user works again. Putting these files back makes the problem appear again. I will attach these.

Also, there are such errors in messages:
kernel: INFO: task i915:152 blocked for more than 120 seconds.
kernel: INFO: task Xorg:2641 blocked for more than 120 seconds.
(see attachments for full error messages)

So it seems some situation caused gnome-display-settings to generate possibly invalid configuration, libgnomedesktop RRandr code tries to apply it and Xorg server hangs.

Version-Release number of selected component (if applicable):

gnome-desktop-2.28.2-6.el6.x86_64
xorg-x11-server-Xorg-1.7.6-5.el6.x86_64
xorg-x11-drv-intel-2.11.0-4.el6.x86_64
libXrandr-1.3.0-4.el6.x86_64

How reproducible:

Always on my desktop when using attached monitors.xml

Steps to Reproduce:
1. useradd -m testuser
2. put monitors.xml into /home/testuser/.config/ (owner testuser)
3. try to log in via gdm as this testuser
  
Actual results:

X server hangs, computer gets unusable locally.
Ssh access is possible, but Xorg cannot be killed and even shutdown -r does not work (reboot -f works).

Expected results:

No hangs! Perhaps a warning or sanitization if monitors.xml is really broken.
And if it is broken, it would be nice to find out why it was crippled by gnome-display-settings applet.

Additional info:

RandR code in libgnomedesktop is responsible for handling monitors.xml. It is nicely documented: http://live.gnome.org/RandR

Comment 1 David Kutálek 2010-05-26 14:58:41 UTC
Created attachment 416866 [details]
lspci -vv output

Comment 2 David Kutálek 2010-05-26 14:59:25 UTC
Created attachment 416869 [details]
Relevant part of /var/log/messages

Comment 3 David Kutálek 2010-05-26 15:00:34 UTC
Created attachment 416871 [details]
Xorg logs

Unfortunately, I am not sure which log file is the one from hang - so I bundled all available.

Comment 5 Ray Strode [halfline] 2010-05-26 18:28:16 UTC
of course using the randr apis shouldn't cause a hang and kernel backtraces.

Comment 6 RHEL Program Management 2010-06-07 16:22:25 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 7 Adam Jackson 2010-06-07 19:20:51 UTC
Please try to reproduce with kernel-2.6.32-33.el6 or later.

Comment 8 David Kutálek 2010-06-10 07:39:57 UTC
I was not able to reproduce using kernel 2.6.32-33.el6.x86_64.

David

Comment 9 Dave Airlie 2010-06-11 06:36:00 UTC
This should be fixed by the X -nr bug fixed in 2.6.32-33. marking as duplicate of that bug.

*** This bug has been marked as a duplicate of bug 577959 ***