Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 533974 - sys-kernel/gentoo-sources-3.18.1 - memory leak in i915 driver?
Summary: sys-kernel/gentoo-sources-3.18.1 - memory leak in i915 driver?
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-29 21:15 UTC by NiTr0
Modified: 2015-02-22 21:35 UTC (History)
1 user (show)

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


Attachments
kernel config (.config,113.06 KB, text/plain)
2014-12-29 21:15 UTC, NiTr0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NiTr0 2014-12-29 21:15:10 UTC
Created attachment 392658 [details]
kernel config

After a while, kswapd0 starts to eat 100% of CPU time (usually - at compilation time).

Hacks like dropping caches/re-opening browser/restarting X don't help.

Also sometimes (rarely) X dies due to GPF in i915 with stack trace:


[46527.716234] general protection fault: 0000 [#1] PREEMPT SMP 
[46527.716314] Modules linked in: cpufreq_ondemand ctr ccm ipv6 uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common btusb videodev bluetooth ath9k ath9k_common ath9k_hw tg3 snd_hda_codec_hdmi snd_hda_codec_realtek mac80211 snd_hda_codec_generic acer_wmi iTCO_wdt sparse_keymap i915 ptp snd_hda_intel pps_core ath libphy snd_hda_controller cfg80211 pcspkr hwmon sdhci_pci sdhci snd_hda_codec mmc_core cfbfillrect ehci_pci snd_hwdep ehci_hcd snd_pcm wmi battery cfbimgblt snd_timer snd cfbcopyarea usbcore drm_kms_helper lpc_ich intel_gtt usb_common mfd_core ac acpi_cpufreq soundcore processor
[46527.716993] CPU: 0 PID: 2235 Comm: X Tainted: G        W      3.18.1-gentoo #1
[46527.717061] Hardware name: Acer V5-131/Mimic             , BIOS V2.21 11/26/2013
[46527.717130] task: ffff880075cba540 ti: ffff880076ba8000 task.ti: ffff880076ba8000
[46527.717199] RIP: 0010:[<ffffffffa0240461>]  [<ffffffffa0240461>] i915_gem_set_tiling+0x251/0x510 [i915]
[46527.717322] RSP: 0018:ffff880076babd88  EFLAGS: 00010206
[46527.717372] RAX: ffff88002cb4a600 RBX: ffff88002cb4a540 RCX: dead000000100098
[46527.717437] RDX: dead000000100100 RSI: 0000000000000000 RDI: 00000000ffffffff
[46527.717502] RBP: ffff880076babda8 R08: 0000000000004000 R09: 0000000000000000
[46527.717566] R10: ffffffffa02c3ac0 R11: ffff880076babdf8 R12: ffff8800668a0000
[46527.717632] R13: ffff880076babdf8 R14: ffff880067731800 R15: ffff880076344200
[46527.717698] FS:  00007fd696f258c0(0000) GS:ffff880100200000(0000) knlGS:0000000000000000
[46527.717772] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[46527.717824] CR2: 00007fd68f3bb000 CR3: 00000000688b2000 CR4: 00000000001406b0
[46527.717888] Stack:
[46527.717910]  fffffffffffffff2 ffff880076babdf8 0000000000000061 ffff880067731800
[46527.717991]  ffff880076babea8 ffffffff813c31bc ffff880076babdc8 ffff880076babdf8
[46527.718070]  ffff880076babdf8 ffffffffa02c3ac0 00007fffd0b0aa90 ffff880100000010
[46527.718150] Call Trace:
[46527.718182]  [<ffffffff813c31bc>] drm_ioctl+0x1ac/0x630
[46527.718239]  [<ffffffff8129e49b>] ? avc_has_perm+0xdb/0x1a0
[46527.718296]  [<ffffffff81078b9d>] ? sched_clock_local+0x1d/0x90
[46527.718356]  [<ffffffff81193be0>] do_vfs_ioctl+0x2d0/0x4b0
[46527.718410]  [<ffffffff812a0a0f>] ? file_has_perm+0x8f/0xa0
[46527.718466]  [<ffffffff81316983>] ? __this_cpu_preempt_check+0x13/0x20
[46527.718528]  [<ffffffff81193e49>] SyS_ioctl+0x89/0xa0
[46527.718577]  [<ffffffff81193dc1>] ? SyS_ioctl+0x1/0xa0
[46527.718629]  [<ffffffff8157a2d6>] system_call_fastpath+0x16/0x1b
[46527.718685] Code: 4c 89 f7 e8 e2 7b 33 e1 44 89 e0 5b 41 5c 41 5d 41 5e 5d c3 66 0f 1f 44 00 00 48 8b 51 68 48 39 d0 48 8d 4a 98 0f 84 a7 fe ff ff <f6> 42 40 0f 74 e9 8b 13 83 fa 01 0f 84 75 02 00 00 8d 4a ff 89 
[46527.719065] RIP  [<ffffffffa0240461>] i915_gem_set_tiling+0x251/0x510 [i915]
[46527.719157]  RSP <ffff880076babd88>
[46527.726376] ---[ end trace 833aa6839af8613d ]---

emerge --info:

# emerge --info
Portage 2.2.14 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop, gcc-4.8.3, glibc-2.19-r1, 3.18.1-gentoo x86_64)
=================================================================
System uname: Linux-3.18.1-gentoo-x86_64-Intel-R-_Celeron-R-_CPU_1007U_@_1.50GHz-with-gentoo-2.2
KiB Mem:     1872584 total,    347120 free
KiB Swap:    8388604 total,   8336844 free
Timestamp of tree: Fri, 26 Dec 2014 14:30:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.9-r1, 3.3.5-r1, 3.4.1
dev-util/ccache:          3.1.9-r4
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6-r1, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo steam-overlay java mv Local-overlay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core-avx-i -mno-avx -mno-aes -mno-rdrnd"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /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="-O2 -pipe -march=core-avx-i -mno-avx -mno-aes -mno-rdrnd"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_UA.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/steam /var/lib/layman/java /var/lib/layman/mv /usr/local/portage/my"
USE="X a52 aac acl acpi alsa amd64 apm apng bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr clang cli consolekit cracklib crypt cups curl cxx dbus dri dri2 dts dvd dvdr dynamic emboss encode exif extras fam fat firefox flac fontconfig fortran fpm gbm gd gdbm gif glamor gnutls gpm gtk help iconv icu ipv6 irmc ithreads jabber java jpeg jpeg2k laptop lcms ldap legacy-libudev libkms libnotify lxde mad matroska midi minizip mmx mng modules mp3 mp4 mpeg multilib mysql mysqli ncurses nls nptl nsplugin nspluginwrapper ntfs ogg openal opencl opengl openmp opus pam pango pcntl pcre pdf perl php png policykit postgres ppds pulseaudio python qt qt3support qt4 readline reiserfs s3tc samba sdl sensord session spell sql sqlite sse sse2 sse3 ssl startup-notification streaming svg symlink syslog tcpd threads tidy tiff timidity tk trayicon truetype udev udisks unicode upower usb utf8 va vdpau vorbis webkit wxwidgets x264 xcb xml xmp xv xvfb xvid xvmc zip zlib" ABI_X86="32 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" 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="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en ru uk" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

kernel config in attach
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-30 09:03:19 UTC
(In reply to NiTr0 from comment #0)
> Created attachment 392658 [details]
> kernel config
> 
> After a while, kswapd0 starts to eat 100% of CPU time (usually - at
> compilation time).

Looks like a memory leak. How much memory is X using at the time?

> Hacks like dropping caches/re-opening browser/restarting X don't help.
> 
> Also sometimes (rarely) X dies due to GPF in i915 with stack trace:

> [46527.716234] general protection fault: 0000 [#1] PREEMPT SMP 

...

> [46527.716993] CPU: 0 PID: 2235 Comm: X Tainted: G        W     
> 3.18.1-gentoo #1

That definitely looks like you have a memory leak in the X11 driver or the kernel driver.
Comment 2 NiTr0 2015-02-22 20:58:47 UTC
X uses not too much memory, and there was enough free RAM.
After kernel upgrade to 3.18.5 and some kernel config changes - it seems like trouble disappears.
Comment 3 Matt Turner gentoo-dev 2015-02-22 21:35:34 UTC
If the problem persists please report it upstream to https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel

There's not a lot we can do to fix driver bugs that aren't fixed upstream.