Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 598110 - x11-drivers/xf86-video-intel-2.99.917_p20161024 - activating DPMS causes an abort with double free or corruption
Summary: x11-drivers/xf86-video-intel-2.99.917_p20161024 - activating DPMS causes an a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 598174 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-26 10:42 UTC by Mateusz Lenik
Modified: 2016-11-06 18:59 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gdb backtrace with debug symbols (backtrace,5.31 KB, text/plain)
2016-11-03 20:14 UTC, Alexander Wetzel
Details
gdb backtrace with debug symbols (backtrace,10.46 KB, text/plain)
2016-11-03 20:17 UTC, Alexander Wetzel
Details
patch from upstream git fixing the issue (a.patch,1.96 KB, patch)
2016-11-03 20:19 UTC, Alexander Wetzel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Lenik 2016-10-26 10:42:30 UTC
X crashes when DKMS gets activated with xf86-video-intel-2.99.917_p20161024

Steps to reproduce:

$ xset s activate

Backtrace:

Thread 1 "X" received signal SIGABRT, Aborted.
0x00007f71480e9118 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
#0  0x00007f71480e9118 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007f71480ea56a in __GI_abort () at abort.c:89
#2  0x00007f7148125e11 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7f714821a0c0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007f714812b926 in malloc_printerr (action=3, str=0x7f714821a188 "double free or corruption (out)", ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5007
#4  0x00007f714812c11e in _int_free (av=0x7f7148449b00 <main_arena>, p=<optimized out>, have_lock=0) at malloc.c:3868
#5  0x00007f714493c653 in ?? () from /usr/lib64/xorg/modules/drivers/intel_drv.so
#6  0x00007f7144994507 in ?? () from /usr/lib64/xorg/modules/drivers/intel_drv.so
#7  0x00007f7144998313 in ?? () from /usr/lib64/xorg/modules/drivers/intel_drv.so
#8  0x00007f714499e551 in ?? () from /usr/lib64/xorg/modules/drivers/intel_drv.so
#9  0x00007f714499eb9d in ?? () from /usr/lib64/xorg/modules/drivers/intel_drv.so
#10 0x00007f71449a3415 in ?? () from /usr/lib64/xorg/modules/drivers/intel_drv.so
#11 0x00007f71449a3849 in ?? () from /usr/lib64/xorg/modules/drivers/intel_drv.so
#12 0x00000000004667ae in dixSaveScreens ()
#13 0x000000000056d69e in mieqProcessInputEvents ()
#14 0x00000000004757e9 in ProcessInputEvents ()
#15 0x000000000043572e in ?? ()
#16 0x0000000000439843 in ?? ()
#17 0x00007f71480d6680 in __libc_start_main (main=0x423a50, argc=10, argv=0x7ffdd6c8e178, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
    stack_end=0x7ffdd6c8e168) at ../csu/libc-start.c:289
    #18 0x0000000000423a89 in _start ()

emerge --info xf86-video-intel output:

Portage 2.3.2 (python 3.4.5-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.23-r2, 4.8.4-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.8.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-6600U_CPU_@_2.60GHz-with-gentoo-2.3
KiB Mem:    16332672 total,  10595024 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Wed, 26 Oct 2016 07:30:01 +0000
sh bash 4.4-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.4-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.6.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.2::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

local-crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

mlen
    location: /var/lib/layman/mlen
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=broadwell -mclflushopt -mxsavec -mxsaves -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=broadwell -mclflushopt -mxsavec -mxsaves -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5 -l5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X X509 aac aacplus acl alsa amd64 audit berkdb bzip2 caps cli consolekit cracklib crypt cryptsetup cups cxx dbus dri dri3 faac flac fortran gdbm geoclue geoloc geolocation gif gnome-keyring gtk gtk3 gtkstyle hidpi hotwording iconv idn infinality introspection iproute2 ipv6 jpeg kerberos libedit libnotify llvm lvm mbim mmx mmxext modemmanager modules mp3 mpeg multilib ncurses networkmanager nls nptl offensive ogg opengl openmp opus oss pam pch pcre pic pm-utils png policykit pulseaudio python qt5 readline samba seccomp session sound sse sse2 ssl startup-notification tcpd theora tiff truetype udev udisks unicode unwind vaapi vim vim-syntax virt-network vorbis vpx webp widgets x264 xattr xft xinerama zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="synaptics evdev" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 i386 arm" QEMU_USER_TARGETS="x86_64 i386 arm" RUBY_TARGETS="ruby23 ruby21" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

x11-drivers/xf86-video-intel-2.99.917_p20161024::gentoo was built with the following:
USE="dri dri3 sna udev -debug -uxa -xvmc" ABI_X86="64"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,lazy"
Comment 1 Mateusz Lenik 2016-10-26 10:46:35 UTC
Too many acronyms, I meant DPMS. Sorry for the mixup
Comment 2 Mateusz Lenik 2016-10-26 10:55:42 UTC
I'm downgrading right now, but 714052fb32a3c521efb295f2c400a673d515fb77 may be a fix for that issue
Comment 3 rypervenche 2016-10-26 21:25:36 UTC
I'm having this problem on my laptop as well. I'm able to reproduce it by typing:

xset dpms force off

I am able to work around this by downgrading to version: 2.99.917_p20161007
Comment 4 Coacher 2016-10-27 13:47:09 UTC
*** Bug 598174 has been marked as a duplicate of this bug. ***
Comment 5 Søren Dalby Larsen 2016-11-01 13:10:43 UTC
I experience exactly the same. Downgrading fixes it.
Comment 6 Alexander Wetzel 2016-11-03 20:13:13 UTC
I debugged another issue which turned out to be the same as this one here:

If the screen saver switched off the display the Xserver would crash when trying to switch the display back on. I'll upload a gdb backtrace with full debug symbols attached, this shows quite well that the problem is related to backlight.

Till today I reproduced the issue with "xset dpms force off" but just verified that "xset s activate" acts the same. It does, the backtraces are basically identical.

A quick test with current upstream git xf86-video-intel turned out to also fix the problem, making it trivial to spot the commit which fixes the issue:
https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=714052fb32a3c521efb295f2c400a673d515fb77
(I will also upload the commit as proposed fix.)

After "injecting" the above commit to to the normal xf86-video-intel-2.99.917_p20161024 build process (using ebuild prepare + manual patch + ebuild merge) the xserver no longer crashes with any of the commands and also the screen saver resume is working again. 

I would suggest to remove/mask x11-drivers/xf86-video-intel-2.99.917_p20161024 and go for a newer git version or at least add the git commit with the fix as patch.
Comment 7 Alexander Wetzel 2016-11-03 20:14:54 UTC
Created attachment 452284 [details]
gdb backtrace with debug symbols
Comment 8 Alexander Wetzel 2016-11-03 20:17:31 UTC
Created attachment 452286 [details]
gdb backtrace with debug symbols

uploaded correct file with output from "bt full"
Comment 9 Alexander Wetzel 2016-11-03 20:19:07 UTC
Created attachment 452288 [details, diff]
patch from upstream git fixing the issue
Comment 10 Daniel M. Weeks 2016-11-04 00:15:39 UTC
I've found the same issue. The last entry in /var/log/Xorg.0.log is a dead giveway that a bad memory location is being accessed (note the corrupted backlight name):

Failed to set backlight @N\^A for output LVDS1

I agree with Alexander and Mateusz that this is a result of not pulling in the final commit from Oct 24th: 714052fb32a3c521efb295f2c400a673d515fb77.
Comment 11 Manuel Rüger (RETIRED) gentoo-dev 2016-11-05 13:01:59 UTC
Updated the snapshot to 20161103, please test.

commit c87d5a729a8456e39679695297770a02779e5051
Author: Manuel Rüger <mrueg@gentoo.org>
Date:   Sat Nov 5 14:00:42 2016 +0100

    x11-drivers/xf86-video-intel: Update snapshot
    
    Package-Manager: portage-2.3.2
Comment 12 Mateusz Lenik 2016-11-06 08:39:48 UTC
Works for me.
Comment 13 Alexander Wetzel 2016-11-06 11:05:34 UTC
Works for me, too
Comment 14 lekto 2016-11-06 18:59:23 UTC
Works for me either.