Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 166109 - xorg-server 1.2.0 leaks memory
Summary: xorg-server 1.2.0 leaks memory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 166035 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-09 18:27 UTC by Joel Cunningham
Modified: 2007-03-17 00:04 UTC (History)
0 users

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


Attachments
New ebuild for xorg-server. (xorg-server-1.2.0-r2.ebuild,16.06 KB, text/plain)
2007-03-13 17:26 UTC, gentoo
Details
Patchfile (to the files directory) (1.2.0-client-leak.patch,363 bytes, patch)
2007-03-13 17:28 UTC, gentoo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Cunningham 2007-02-09 18:27:22 UTC
Since I have upgraded to xorg-7.2, X has been consuming memory like you wouldn't believe it.  After 24hrs of running X it was using 220MB of RAM.  I am running KDE 3.5.6 with nvidia-drivers-1.0.9746.  I'm not using any kind of composite, just standard X.

I check the memory usage with top and htop, which shows X using an obscene amount, but with xrestop, it only shows about 40MB.  X's memory usage even increases when I leave it sitting over night.  I have talked with other Gentoo users and they has also reported high memory usage after moving to 7.2.

Reproducible: Always

Steps to Reproduce:
1.Run X (7.2)
2.Check top occasionally to watch X slam back RAM like candies.
3.Let it fester how ever long you want.




emerge --info:
Portage 2.1.2-r9 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r2 x86_64)
=================================================================
System uname: 2.6.19-gentoo-r2 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
Gentoo Base System version 1.12.9
Timestamp of tree: Fri, 09 Feb 2007 08:59:01 +0000
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.20
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=k8 -O2 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage/xeffects"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa amd64 arts berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups dbus dlloader dri dvd dvdr dvdread emboss encode fam firefox flac fortran gdbm gif gpm gstreamer gtk gtk2 hal iconv ipv6 isdnlog jpeg kde libg++ mad midi mikmod mp3 mpeg ncurses nls nptl nptlonly nvidia ogg opengl pam pcre perl png ppds pppd python qt qt3 qt4 quicktime readline reflection sdl session spell spl sse3 ssl tcpd tiff truetype truetype-fonts type1-fonts udev unicode vorbis xml xorg xv zlib" 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 mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-02-09 18:32:13 UTC
*** Bug 166035 has been marked as a duplicate of this bug. ***
Comment 2 Joshua Baergen (RETIRED) gentoo-dev 2007-02-10 18:39:33 UTC
This should be filed upstream.  Please find or file a bug at https://bugs.freedesktop.org and post the link here.  Thanks!
Comment 3 Joel Cunningham 2007-02-11 01:16:35 UTC
Turns out I was running an old version of freetype which contained some memory leaks.  Upgrading freetype to 2.3.1 and fontconfig to 2.4.2, has stopped the memory leak.  Maybe the xorg-x11 ebuild needs to be updated to include newer version of freetype so people don't have this problem with old deps that include memory leaks.
Comment 4 Joshua Baergen (RETIRED) gentoo-dev 2007-02-11 18:08:49 UTC
Re-opening for correct resolution.
Comment 5 Joshua Baergen (RETIRED) gentoo-dev 2007-02-11 18:13:15 UTC
Which versions of freetype and fontconfig were you using before?
Comment 6 Joel Cunningham 2007-02-11 18:21:19 UTC
I was using freetype 2.1.10-r2 and fontconfig 2.4.1 but I don't that it matters now, because I spoke too soon about those upgrades being a solution.

X's memory usage was staying down for about 4 or 5 hours, and thus I thought it was fine, but after that it went right back to growing and I gained another 40MB from just letting it sit overnight.

I've been trying to look for something at bugs.freedesktop.org, but the site has been down.
Comment 7 Joshua Baergen (RETIRED) gentoo-dev 2007-02-17 17:47:38 UTC
(In reply to comment #6)
> I've been trying to look for something at bugs.freedesktop.org, but the site
> has been down.
> 

Looks like it's back up.  I'm going to mark this upstream; please file a bug upstream at your leisure.
Comment 8 Marcin Kryczek (RETIRED) gentoo-dev 2007-03-13 00:06:17 UTC
seems there's already a patch availiable here: https://bugs.freedesktop.org/show_bug.cgi?id=10009. would be nice to have new xorg-server's revision in gentoo...
Comment 9 gentoo 2007-03-13 17:26:55 UTC
Created attachment 113191 [details]
New ebuild for xorg-server.
Comment 10 gentoo 2007-03-13 17:28:16 UTC
Created attachment 113193 [details, diff]
Patchfile (to the files directory)
Comment 11 gentoo 2007-03-13 17:30:06 UTC
Hi, 

    i've made a new ebuild with the patch. Any more help needed? :)
Comment 12 Joel Cunningham 2007-03-13 17:33:54 UTC
How long before this hits portage?
Comment 13 Joshua Baergen (RETIRED) gentoo-dev 2007-03-13 21:36:00 UTC
(In reply to comment #12)
> How long before this hits portage?
> 

No promises, but I've marked it for inclusion so it hits our TODO list.
Comment 14 Joshua Baergen (RETIRED) gentoo-dev 2007-03-13 21:36:36 UTC
Oh, in the meantime, you can try the new ebuild and see how much it improves your situation.
Comment 15 Marcin Kryczek (RETIRED) gentoo-dev 2007-03-14 19:18:38 UTC
i'm compiling it right now and'll report if that works.
in the meantime, while it's not availiable in portage, there are 2 workaround for this problem:
1. downgrade xorg-server to 1.1.1-r4 (it's obviuos)
2. downgrade nvidia-drivers to 1.0.96*. seems that leak only occur with 1.0.97* drivers (it's strange looking at the patch, but this "solution" was tested on my 2 systems and work well on both)
Comment 16 Joel Cunningham 2007-03-14 20:36:42 UTC
While it initially seemed like using the binary nvidia drivers was related to the leak, people have reported the leak with other drivers and hardware.

So I would say that one's solutions are to either downgrade xorg-server to 1.1.1-r4 or use the provided ebuild in an overlay.
Comment 17 Joshua Baergen (RETIRED) gentoo-dev 2007-03-17 00:04:27 UTC
krtek's ebuild (1.2.0-r2) and patch are in the tree.  Thanks for your patience.