Bug 81289 - X11 segfaults when rotating display on xf86-video-intel-2.99.912
Summary: X11 segfaults when rotating display on xf86-video-intel-2.99.912
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium blocker
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-13 12:38 UTC by Bernd Prünster
Modified: 2014-07-15 05:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg Error log (25.45 KB, text/plain)
2014-07-13 12:38 UTC, Bernd Prünster
no flags Details
Xorg -version (691 bytes, text/plain)
2014-07-13 12:39 UTC, Bernd Prünster
no flags Details
cpuinfo (3.76 KB, text/plain)
2014-07-13 12:39 UTC, Bernd Prünster
no flags Details
uname -a (85 bytes, text/plain)
2014-07-13 12:40 UTC, Bernd Prünster
no flags Details
GPU Specific Xorg conf (231 bytes, text/plain)
2014-07-13 12:42 UTC, Bernd Prünster
no flags Details
snippet of Xorg log (--enable-debug=full) (2.35 KB, text/plain)
2014-07-14 08:54 UTC, Bernd Prünster
no flags Details
Full Xorg log (24.86 KB, application/x-xz)
2014-07-14 15:40 UTC, Bernd Prünster
no flags Details
Backtrace (1.81 KB, text/plain)
2014-07-14 15:53 UTC, Bernd Prünster
no flags Details

Description Bernd Prünster 2014-07-13 12:38:39 UTC
Created attachment 102692 [details]
Xorg Error log

After upgrading from xf86-video-intel 2.99.911 to 2.99.912 X11 segfaults when trying to rotate a display. (See attached log)
This happens regardless of how many displays are attached and no matter which one is being rotated. It also happens when using only the notebook's internal display.

CPU: i3-3110M
GPU: HD Graphics 4000
Comment 1 Bernd Prünster 2014-07-13 12:39:20 UTC
Created attachment 102693 [details]
Xorg -version
Comment 2 Bernd Prünster 2014-07-13 12:39:53 UTC
Created attachment 102694 [details]
cpuinfo
Comment 3 Bernd Prünster 2014-07-13 12:40:27 UTC
Created attachment 102695 [details]
uname -a
Comment 4 Bernd Prünster 2014-07-13 12:42:10 UTC
Created attachment 102696 [details]
GPU Specific Xorg conf
Comment 5 Chris Wilson 2014-07-13 12:51:00 UTC
It would be nice to have that stacktrace resolved. Seeing that you are on arch, please build from http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/ and install that driver with debug symbols. Then try to reproduce the crash.
Comment 6 Bernd Prünster 2014-07-13 17:20:47 UTC
I just switched to the current git version of the driver (2.99.912.229.ge0523ad at the time of this writing) built using
--prefix=/usr --enable-dri --enable-xvmc --enable-sna --enable-debug

I cannot reproduce the bug using the git version, however the current stable version also exhibits this behaviour when built using --enable-debug.
Where can I find the backtrace? (the Xorg log looks the same) or are there any driver options I need to set in order to print the full backtrace?
Comment 7 Chris Wilson 2014-07-14 06:29:55 UTC
I normally use gdb to get a good backtrace, but that requires a second machine (ssh in, gdb --pid `pidof X`, wait for crash, type bt full). However, if are we have is the backtrace in the Xorg.0.log, you can use addr2line. The invocation is a little fiddly, if you attach the Xorg.0.log, I can give you the command line to use. Even easily as you can reproduce this with --enable-debug is then to use --enable-debug=full and send me the logfile.
Comment 8 Bernd Prünster 2014-07-14 08:54:13 UTC
Created attachment 102752 [details]
snippet of Xorg log (--enable-debug=full)

(The full Xorg log has about 30 MiBs)

I tried using gdb from a second machine via SSH, but it did not print any debug information
(ssh -> gdb --pid <PID of X> -> continue -> let it crash -> bt full -> no debug symbols found)

I tried addr2line -a <addr> -e /usr/lib/xorg/modules/drivers/intel_drv.so using all addresses printed in the xorg log but without results.
Comment 9 Chris Wilson 2014-07-14 09:02:20 UTC
Just use xz compression to make the log file small enough to attach, or use tail -15000 and then compress it.
Comment 10 Chris Wilson 2014-07-14 09:03:46 UTC
To use addr2line, you will need to point it to your build intel_drv.so (as Arch's install strips debug symbols)

add2line -e /path/to/xf86-video-intel/src/.libs/intel_drv.so -i 0xb2b7f 0xb624a
Comment 11 Bernd Prünster 2014-07-14 15:40:28 UTC
Created attachment 102782 [details]
Full Xorg log

(You were right, totally forgot do add !strip to my PKGBUILD)

Here's the addr2line output from the newly built driver with debug symbols included:
addr2line -e /usr/lib/xorg/modules/drivers/intel_drv.so -i 0xb2b7f 0xb624a
xf86-video-intel-2.99.912/src/sna/sna_display.c:6278
xf86-video-intel-2.99.912/src/sna/sna_driver.c:738
Comment 12 Bernd Prünster 2014-07-14 15:53:15 UTC
Created attachment 102783 [details]
Backtrace

Backtrace for xrandr -o left
Comment 13 Chris Wilson 2014-07-14 20:23:56 UTC
Hmm, that's not from master - the code has moved since that build.

I think the fix is:

commit dca0f1c2ccf14df38764ed12b971dc491cf22608
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Jun 22 17:53:59 2014 +0100

    sna: Track CRTC mode changes and discard old flips
    
    If we have a pending flip across a modeset we must be careful to drop
    the stale flip_bo after the modeset.
    
    Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c8
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 14 Bernd Prünster 2014-07-14 20:52:32 UTC
I can't reproduce this bug when using the git version.
Comment 15 Chris Wilson 2014-07-15 05:47:17 UTC
Assuming it is the bug/commit identified in c13.


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.