Bug 10009 - xorg 7.2 (xorg-server-1.2.0) consumes memory
Summary: xorg 7.2 (xorg-server-1.2.0) consumes memory
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.2 (2007.02)
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-17 10:34 UTC by Joel Cunningham
Modified: 2007-03-17 02:19 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Simple connect/disconnect test case (386 bytes, text/x-csrc)
2007-03-09 19:03 UTC, Aaron Plattner
no flags Details

Description Joel Cunningham 2007-02-17 10:34:50 UTC
System: Gentoo Linux, amd64
Xorg: 7.2
Driver: nvidia drivers 1.0.9746
Desktop Env: KDE-3.5.6

When I upgraded to xorg-server-1.2.0, which is the 7.2 server component on Gentoo, X's memory usage would slowly increase until I shutdown/restarted the X server.

For example, leaving the server up for 24hrs would usually yield a 250MB memory footprint for X.  It would also gain memory overnight, when as far as I know nothing on the X server was really being used that much.

After having all the modular components for Xorg 7.2 installed, I downgraded the server component to that of 7.1.1 and the memory leak has completely gone away.

I have a thread going over at the Gentoo Forums if you would like to see other people having the same problem.  One forum member has noticed that everyone confirming the bug in the thread is using an nvidia card with proprietary drivers.  I'm not sure if this is a case of this only effect nvidia driver users, or nvidia driver users are the only ones who have taken part in discussion of the bug.

http://forums.gentoo.org/viewtopic-t-537634.html
Comment 1 Vladimir 2007-02-19 23:05:56 UTC
I can prove the issue and reverting to the old version of xorg-server-1.1.1 solves the problem.
Comment 2 Daniel Stone 2007-02-27 01:36:28 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 3 Michal Kwolek 2007-02-28 11:04:52 UTC
System: Gentoo Linux, amd64
Xorg: 7.2
Driver: nvidia drivers 1.0.9746
Desktop Env: KDE-3.5.6

1GiB RES, 1.2GiB Virt after 8 days of uptime.

No problems noticed in xrestop.

Very interesting /proc/pid/maps tho:
http://forum.pctuning.cz/zaloha/miho/maps.txt
Comment 4 x 2007-03-01 07:48:10 UTC
System: Gentoo Linux, x86
Xorg: 7.2
Driver: i810-1.7.4
Desktop Env: Gnome+Beryl

Same behaviour, I can see memory usage increasing when I move mouse over kiba-dock, but the leak is there even without kiba.
Comment 5 Andrew D. Keyser 2007-03-07 14:10:05 UTC
Same here;
Xorg: 7.2
Driver: nvidia 1.0.9746
Env: Gnome+Beryl (beryl alone w/gnome panel and fluxbox also exhibit this, seems to be WM/DE independent)


It's bad enough to fill up half a gb of ram *and* 500mb swap in about 2 days.

Comment 6 Marcin Kryczek 2007-03-08 06:21:41 UTC
i suppose it might be related with 64bit architecture. only one user wrotes, he has x86, but in fact he didn't write if he has 64bit procesor with 32bit system or not. i've got two computers with gentoo linux installed with very similar CFLAGS and environment. the main diffrence is that one is based on athlon-xp cpu and the other one is sempron. both systems are compiled with -march=athlon-xp however. i've noticed memory leaks in system with sempron, but everything is just fine on computer with athlon-xp
Comment 7 Andrew D. Keyser 2007-03-08 08:57:44 UTC
I've got two x86 systems, one prescott, one Core Duo, both compiled with  -march=prescott, both exhibit this bug.
Comment 8 x 2007-03-09 00:38:04 UTC
It is architecture agnostic, at least for x86+amd64...

CFLAGS="-O2 -march=i686 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
Intel(R) Pentium(R) M processor 1.60GHz
Comment 9 Aaron Plattner 2007-03-09 19:03:37 UTC
Created attachment 9064 [details]
Simple connect/disconnect test case

I can get runaway memory usage with the attached test case which simply opens and closes a display connection repeatedly.  With git master, I don't see this problem.
Comment 10 Aaron Plattner 2007-03-09 20:50:03 UTC
Found the fix:

commit 811675733e97416c990e6dc9c19271b43d96248d
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Thu Feb 15 19:09:00 2007 +0200

    os: fix client privates leak
    Minor leak here.  Oops.

Someone should cherry-pick that over to server-1.2-branch and release a new server.
Comment 11 Daniel Stone 2007-03-10 02:48:26 UTC
(In reply to comment #10)
> Someone should cherry-pick that over to server-1.2-branch and release a new
> server.

server-1.2-branch is kind of a trainwreck; if someone wants to do 1.2.1, they'll have to start again.  It's already on server-1.3-branch, though.

Comment 12 x 2007-03-10 03:30:07 UTC
I have patched xorg-server-1.2.0 with commit 811675733e97416c990e6dc9c19271b43d96248d and leak is still there :( I will try complete git tree later...
Comment 13 x 2007-03-12 11:05:54 UTC
My bad... Commit 811675733e97416c990e6dc9c19271b43d96248d seems to fix the leak... Can anyone else confirm that? 

(patched ebuild for gentoo here: http://sklad.krtek.net/xorg-server.tar.gz)
Comment 14 x 2007-03-13 00:08:29 UTC
As some other people (http://forums.gentoo.org/viewtopic-t-537634-postdays-0-postorder-asc-highlight-leak-start-75.html) has successed in fixing the leak with commit 811675733e97416c990e6dc9c19271b43d96248d, suggesting closing bug (FIXED? WONTFIX?)
Comment 15 x 2007-03-17 02:19:16 UTC
Nothing more can be done here... FIXED


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.