Bug 70008 - [uxa optimus] Xorg server crashes with segfault when disabling nouveau optimus output with xrandr
Summary: [uxa optimus] Xorg server crashes with segfault when disabling nouveau optimu...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-01 16:49 UTC by Pasi Kärkkäinen
Modified: 2013-10-04 21:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log with the segfault backtrace (52.26 KB, text/plain)
2013-10-01 16:51 UTC, Pasi Kärkkäinen
no flags Details

Description Pasi Kärkkäinen 2013-10-01 16:49:25 UTC
Xorg server segfaults when running "xrandr --output DP-2 --off" to disable an output on *nouveau* card. Backtrace in Xorg.0.log has Intel strings in it, but the crash is triggered by disabling an output on nouveau/optimus adapter.

I'm using Fedora 19 on Lenovo T430 laptop in Optimus mode (Intel Ivy Bridge + Nouveau GF108):

Distribution is Fedora 19 with latest updates installed, so xorg-1.14.

How reproducible:
Very often.

Steps to Reproduce:
1. Enable Optimus in BIOS on Lenovo T430 laptop.
2. Connect laptop to docking station.
3. Connect external DVI monitor to docking station DVI port.
4. Start Fedora 19, login to (mate) desktop.
5. Start a terminal and run "xrandr --output DP-2 --off", to disable an output where the DVI monitor is connected.


Actual results:
Xorg crashes with segfault/backtrace.


Expected results:
Xorg doesn't crash and nouveau output (DVI monitor) gets disabled.


Additional info:

[   138.763] reporting 5 7 17 134
[   139.048] have a master to look out for
[   139.048] (EE) 
[   139.048] (EE) Backtrace:
[   139.052] (EE) 0: /usr/bin/X (OsLookupColor+0x129) [0x46ee59]
[   139.052] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x36f2e0ef9f]
[   139.053] (EE) 2: /lib64/libdrm_intel.so.1 (drm_intel_bufmgr_fake_init+0xe3b) [0x7f2bd9ff2f3b]
[   139.054] (EE) 3: /lib64/libdrm_intel.so.1 (drm_intel_bufmgr_fake_init+0x2924) [0x7f2bd9ff6134]
[   139.055] (EE) 4: /usr/lib64/xorg/modules/drivers/intel_drv.so (_init+0x9f22) [0x7f2bda22cf12]
[   139.055] (EE) 5: /usr/lib64/xorg/modules/drivers/intel_drv.so (_init+0x6075) [0x7f2bda225285]
[   139.056] (EE) 6: /usr/bin/X (xf86PruneDuplicateModes+0x1df7) [0x4c84e7]
[   139.056] (EE) 7: /usr/bin/X (RRCrtcSet+0x589) [0x502b39]
[   139.056] (EE) 8: /usr/bin/X (ProcRRSetCrtcConfig+0x3d9) [0x503c99]
[   139.056] (EE) 9: /usr/bin/X (SendErrorToClient+0x3f7) [0x436fe7]
[   139.057] (EE) 10: /usr/bin/X (_init+0x3aaa) [0x429b8a]
[   139.058] (EE) 11: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x36f2621b75]
[   139.058] (EE) 12: /usr/bin/X (_start+0x29) [0x4267f1]
[   139.059] (EE) 13: ? (?+0x29) [0x29]
[   139.059] (EE) 
[   139.059] (EE) Segmentation fault at address 0x8
[   139.059] (EE) 
Fatal server error:
[   139.059] (EE) Caught signal 11 (Segmentation fault). Server aborting
[   139.059] (EE) 
[   139.059] (EE) 
Please consult the Fedora Project support 
         at http://wiki.x.org
 for help. 
[   139.059] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   139.059] (EE) 
[   139.060] (II) AIGLX: Suspending AIGLX clients for VT switch
[   139.543] (EE) Server terminated with error (1). Closing log file.
Comment 1 Pasi Kärkkäinen 2013-10-01 16:51:10 UTC
Created attachment 86916 [details]
Xorg.0.log with the segfault backtrace
Comment 2 Chris Wilson 2013-10-01 19:52:02 UTC
That is a very strange backtrace. drm_intel_bufmgr_fake_init has been defunct for several years and should never be called anywhere near that call path. Is this reproducible enough to run under gdb? And please make sure you have all the debuginfo installed.
Comment 3 Pasi Kärkkäinen 2013-10-01 19:54:52 UTC
Yep, it's 100% reproducible. I'll install debuginfo and try running under gdb later this week.. 

Thanks!
Comment 4 Pasi Kärkkäinen 2013-10-04 21:20:24 UTC
.. and of course now, with the latest Fedora 19 updates installed, it works OK.. and I'm not able to reproduce the crash/segfault anymore. doh.

I guess I should be happy it actually works now with the latest updates..

Linux kernel 3.11.2-201.fc19.x86_64, xorg-x11-server-Xorg-1.14.3-1.fc19.x86_64, xorg-x11-drv-intel-2.21.12-2.fc19.x86_64, xorg-x11-drv-nouveau-debuginfo-1.0.9-1.fc19.x86_64.
Comment 5 Chris Wilson 2013-10-04 21:23:14 UTC
That implies to me it was perhaps the RRCrtcSetScanoutPixmap fix in the xserver.


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.