Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 471074 - x11-drivers/xf86-video-intel-2.21.7 causes shared memory leak
Summary: x11-drivers/xf86-video-intel-2.21.7 causes shared memory leak
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-23 12:32 UTC by Octave Berry
Modified: 2013-05-27 15:07 UTC (History)
1 user (show)

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


Attachments
emerge --info (emerge--info,6.69 KB, text/plain)
2013-05-23 15:54 UTC, Roman Žilka
Details
conkyrc (minimal-conkyrc,298 bytes, text/plain)
2013-05-23 20:14 UTC, Octave Berry
Details
emerge --info (emerge--info.txt,5.63 KB, text/plain)
2013-05-24 20:11 UTC, jms
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Octave Berry 2013-05-23 12:32:34 UTC
Having upgraded x11-drivers/xf86-video-intel to version 2.21.7, I noticed that the Shmem field reported in /proc/meminfo keeps increasing until the whole system memory gets filled. Killing the X server resets this count to a normal value.

After having masked recent upgrades and re-enabled them one by one, I found that the bug occurs only with this version installed (not present in 2.21.6 currently present in tree).

By the way, the problem seems to happen regardless of the kernel kind (gentoo or hardened), xorg version (both 1.14.1 and 1.13.4 shows the same behavior).

Reproducible: Always

Steps to Reproduce:
1. Upgrade x11-drivers/xf86-video-intel to version 2.21.7
Actual Results:  
/proc/meminfo shows a Shmem increasing constantly for no apparent reason

Expected Results:  
Stable memory consumption

amber ~ # emerge --info
Portage 2.1.12.1 (hardened/linux/amd64, gcc-4.7.3, glibc-2.17, 3.9.2-gentoo x86_64)
=================================================================
System uname: Linux-3.9.2-gentoo-x86_64-Intel-R-_Core-TM-_i5-2540M_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:     8155232 total,   7137736 free
KiB Swap:   10484728 total,  10484728 free
Timestamp of tree: Thu, 23 May 2013 06:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.4, 3.2.4, 3.3.2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6, 1.13.2
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo spring paddymac armagetron systemd x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7-avx -mtune=corei7-avx -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/shorewall /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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 /usr/bin/startx"
CXXFLAGS="-march=corei7-avx -mtune=corei7-avx -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://gentoo.imj.fr/pub/gentoo/ http://mirrors.linuxant.fr/distfiles.gentoo.org/ http://gentoo.modulix.net/gentoo/ http://de-mirror.org/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://ftp.halifax.rwth-aachen.de/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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/Spring /var/lib/layman/paddymac /var/lib/layman/armagetron /var/lib/layman/systemd /usr/local/portage"
SYNC="rsync://rsync.fr.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 amr apng avx bash-completion berkdb bluetooth bzip2 cdda cddb cjk cli clock cracklib crypt cscope cups curl cxx dbus dc1394 declarative device-mapper dirac directfb djvu dri dts dvb dvd eap-sim ebook embedded encode exif faac fasteap fbcon ffmpeg fftw flac fluidsynth fontconfig frei0r fuse gbm gdal gdbm geos gif gmp go gpm graphics graphite graphviz gs gstreamer hardened hdri iconv icu ieee1394 imagemagick iproute2 ipv6 jbig jpeg jpeg2k justify kde kerberos lcms libass libnotify libv4l2 llvm lzma mad matroska midi mikmod mmx mng mod modules mp3 mpeg mtp mudflap multilib multitarget mysql ncurses netlink network nls nptl ntfsprogs objc objc++ objc-gc ogg openal openexr opengl openmp osmesa outputs pam pax_kernel pcre pdf pic png postgres proj pstricks pulseaudio python qt3support qt4 raw readline reports rtmp rtsp ruby schroedinger sdl semantic-desktop session shout skins smp sna speex sql sqlite sqlite3 sse sse2 sse3 sse4_1 ssl ssse3 svg system-sqlite systemd taglib tcpd theora threads tiff truetype twolame udev unicode unlock-notify urandom usb utils v4l v4l2 vaapi video vim-pager vim-syntax vorbis vpx webkit webp wma-fixed wmf wps x264 xattr xcb xetex xinerama xml xv xvid 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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 proxy proxy_http" APACHE2_MPMS="event" 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" DRACUT_MODULES="crypt lvm systemd" 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 ubx" GRUB_PLATFORMS="pc efi-64 multiboot" INPUT_DEVICES="keyboard mouse evdev keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="arm i386 x86_64 ppc ppc64 mips mips64" QEMU_USER_TARGETS="arm i386 x86_64 ppc ppc64 mips" RUBY_TARGETS="ruby19 ruby18" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

amber ~ # cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz
stepping        : 7
microcode       : 0x25
cpu MHz         : 780.000
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3
cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi
flexpriority ept vpid
bogomips        : 5187.72
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:
Comment 1 Roman Žilka 2013-05-23 15:54:15 UTC
Created attachment 348999 [details]
emerge --info

2.21.7 works fine here. I have amd64/hardened and a Sandy Bridge i5 too. Maybe it's the UXA?... (I get some serious wrongness with SNA, a different kind of wrongness.)

How long does it take for the shared mem to deplete completely?
Comment 2 Octave Berry 2013-05-23 16:33:16 UTC
On my machine, it eats around 4Mb/s.

As I was using sna, I just gave a try and recompiled with -sna uxa and I don't observe this behavior in this mode.
Comment 3 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-05-23 17:40:15 UTC
Check with xrestop whether it is an application that causes runaway memory usage.

If not, then please report this upstream at https://bugs.freedesktop.org/ and provide the link to the report here.
Comment 4 Octave Berry 2013-05-23 20:14:14 UTC
Created attachment 349028 [details]
conkyrc
Comment 5 Octave Berry 2013-05-23 20:16:18 UTC
Okay, xrestop does not shows any hogging process.

However, I was able to reproduce the problem with a minimum set of programs running. It happens when there is X + sna, xcompmgr and conky running.

I attached a minimal conkyrc that triggers the bug.

You can reproduce this with this set of commands
$ X -ac -terminate :0 &
$ DISPLAY=:0 xcompmgr &>/dev/null&
$ DISPLAY=:0 conky &>/dev/null&

Versions and useflags for these programs : 

app-admin/conky-1.9.0-r2 was built with the following:
USE="X curl imlib lua lua-cairo lua-imlib math moc ncurses portmon truetype vim-syntax -apcupsd -audacious -debug -eve -hddtemp -iostats -mpd -nano-syntax (-nvidia) -rss -thinkpad -weather-metar -weather-xoap -wifi -xmms2"


x11-misc/xcompmgr-1.1.6 was built with the following:
USE="(multilib)"

Should I still report that upstream or do you have any more insights ?
Comment 6 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-05-23 20:18:20 UTC
The problem could still be related to hardened, but that is not likely. So you can report upstream.
Comment 7 jms 2013-05-24 20:09:17 UTC
well not sure if need to open another bug for this one..
I encountered one problem with
x11-drivers/xf86-video-intel-2.21.7
can't take proper screenshot with ksnapshot 
using capture mode
-Rectangular Region
-Freehand region

Screen become black and mouse drawing the region to take a snapshot produce artefacts

downgrading to =x11-drivers/xf86-video-intel-2.21.6
solved the problem

ksnapshot-4.10.3
Comment 8 jms 2013-05-24 20:11:00 UTC
Created attachment 349096 [details]
emerge  --info
Comment 9 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-05-27 15:07:14 UTC
Looks like someone else was faster to report this upstream, who then fixed it in 2.21.8.