Bug 87188 - X.org segfaults when launching Emacs with hybrid ATI/Intel GPU
Summary: X.org segfaults when launching Emacs with hybrid ATI/Intel GPU
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-10 09:43 UTC by Elias Amaral
Modified: 2014-12-28 03:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log after the crash (46.07 KB, text/plain)
2014-12-10 09:43 UTC, Elias Amaral
no flags Details
dmesg after the crash (61.81 KB, text/plain)
2014-12-10 09:46 UTC, Elias Amaral
no flags Details

Description Elias Amaral 2014-12-10 09:43:42 UTC
Created attachment 110674 [details]
Xorg.0.log after the crash

I've made this bug report on the Arch Linux bug tracker, here:

https://bugs.archlinux.org/task/43061

It may be of interest so I'm reproducing its description here. I'm using the latest stable software as of 10 Dec 2014 (versions below). I'm available to do further debugging like running X on gdb (but I'm not sure how to do this, since X is normally run on a wrapper script) or installing different versions.

Description:

I have an hybrid ATI/Intel GPU and whenever I open Emacs, X crashes.

My notebook is a Dell Inspiron 15R-5537-A10 - it has a Radeon HD 8670M GPU and Intel i7-4500U with Intel HD Graphics 4400 integrated GPU.

The hybrid GPU otherwise works, with PRIME (by setting it with xrandr and running glxinfo with or without DRI_PRIME=1). The above crash happens either if I don't configure PRIME, or if I configure it and either set or don't set DRI_PRIME. I can run any program, except Emacs. It also crashes when I run vanilla Emacs with no configurations.

A workaround is to add modprobe.blacklist=radeon to the kernel boot line, making Emacs run fine.


Additional info:

$ lspci | egrep 'VGA|Display'
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
03:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M] (rev ff)

$ pacman -Qv xorg-server xf86-video-intel xf86-video-ati mesa-dri libdrm linux emacs glibc | grep -v :
xorg-server 1.16.2-1
xf86-video-intel 2.99.916-3
mesa-dri 10.3.5-1
libdrm 2.4.58-1
linux 3.17.4-1
emacs 24.4-1
glibc 2.20-4

Also this from Xorg.log (the full log is attached)

[ 78.539] (EE) Backtrace:
[ 78.539] (EE) 0: /usr/bin/Xorg.bin (xorg_backtrace+0x56) [0x593d36]
[ 78.539] (EE) 1: /usr/bin/Xorg.bin (0x400000+0x197e89) [0x597e89]
[ 78.539] (EE) 2: /usr/lib/libc.so.6 (0x7f8c6f003000+0x33b20) [0x7f8c6f036b20]
[ 78.539] (EE) 
[ 78.539] (EE) Segmentation fault at address 0x0
[ 78.539] (EE) 
[ 78.539] (EE) Caught signal 11 (Segmentation fault). Server aborting


Steps to reproduce:

1. Start X (in my case, LightDM launches XFCE on boot, but it happens in other DEs too)

2. Launch Emacs
Comment 1 Elias Amaral 2014-12-10 09:46:33 UTC
Created attachment 110675 [details]
dmesg after the crash

I saw "[  300.561571] mce: [Hardware Error]: Machine check events logged" but didn't save the output of mcelog, but it referred to some Intel hardware error. I don't think it's related though.
Comment 2 Alex Deucher 2014-12-10 15:28:47 UTC
Can you get a proper backtrace with gdb and with debugging symbols installed?

http://www.x.org/wiki/Development/Documentation/ServerDebugging/
Comment 3 Elias Amaral 2014-12-11 00:43:59 UTC
Just one thing, running Emacs doesn't crash X after I upgraded Mesa and Xorg drivers (but not Xorg itself) to their git versions, those:

xf86-video-intel-git 8630.6c2707d-1
xf86-video-ati-git 3166.c9f8f64-1
mesa-dri-git 66817.65ef78e-1
libdrm-git 5331.00847fa-1

6c2707d, etc. being commits.

Now I want to downgrade to 10.3.5 because there are some intermittent glitches (graphical corruptions on Chromium and Steam, periodic freezes in various graphical programs, a Wine program is closing by itself, etc). Perhaps this was caused by keeping X in its stable version (I upgraded with an Arch repository that didn't have the git version for xorg-server). But anyway this is a matter for another bug report(s).

I think it may be worthwhile to provide a gdb backtrace when I downgrade, but I can't find Arch packages with debugging symbols. I may compile myself - do I need just xorg-server (and xf86-video-ati?), or mesa too?
Comment 4 Chris Wilson 2014-12-21 21:13:59 UTC
commit 07fe45b84bdf0d236a5bfdc433cc1a908e0c161b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Sep 9 08:12:45 2014 +0100

    sna/glyphs: Prevent NULL vfunc deref with glyphs
    
    Requires running a PRIME setup with Intel loaded as the secondary GPU
    and attempting to execute an empty glyph string.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 5 Elias Amaral 2014-12-28 03:10:34 UTC
Indeed Mesa 10.4 fixes this here, 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.