After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606143 - [csw] aisleriot grows X server without bounds
[csw] aisleriot grows X server without bounds
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
csw
Depends on:
Blocks:
 
 
Reported: 2010-01-05 19:38 UTC by Christian Persch
Modified: 2010-01-11 15:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch (363 bytes, patch)
2010-01-07 06:11 UTC, Matthias Clasen
none Details | Review

Description Christian Persch 2010-01-05 19:38:39 UTC
In aisleriot, make sure the "Click to move" option is disabled in the Control menu, then move card stacks around using the mouse, while watching X server memory use in top.

Results:
X server VIRT grows continually, while RES and SHR stay about the same. Eventually, card stacks start leaving trails that will eventually take many seconds to disappear, while the system swaps madly.

This appears to be a problem that is caused by csw:
- it is *not* reproducible when running with GDK_NATIVE_WINDOWS=1 
- all reports of this problem are on gtk 2.18 / ubuntu 9.10 (e.g. https://bugs.launchpad.net/ubuntu/+source/gnome-games/+bug/503428 https://bugs.launchpad.net/ubuntu/+source/gnome-games/+bug/498669 https://bugs.launchpad.net/ubuntu/+source/gnome-games/+bug/483698 https://bugs.launchpad.net/ubuntu/+source/gnome-games/+bug/480523 https://bugs.launchpad.net/ubuntu/+source/gnome-games/+bug/472061 https://bugs.launchpad.net/ubuntu/+source/gnome-games/+bug/469172 )

This is also not reproducible if you enable the "Click to move" function.

I can reproduce this on a first-series EEEPC running Fedora 12 (i915 graphics driver).

It also appears to be dependent on the X server used, since I *cannot* reproduce this on my main machine which is running intrepid (still using gtk master for aisleriot, of course) with the nvidia driver.
Comment 1 Christian Persch 2010-01-05 19:41:44 UTC
I should also mention that closing aisleriot will release all that X server memory again. And valgrind shows no leaks in aisleriot or gtk+, and certainly not in the order of hundreds of MiB.
Comment 2 Matthias Clasen 2010-01-07 03:51:48 UTC
Running xrestop makes it clear that there's a heavy pixmap leak somewhere.
Comment 3 Matthias Clasen 2010-01-07 05:39:47 UTC
Looks like the leaks are somehow caused by the gdk_gc_set_clip_origin calls in the board-noclutter.c expose handler. Commenting those out makes it hard to drag the cards (because they become invisible), but makes the pixmap count largely stay constant.
Comment 4 Matthias Clasen 2010-01-07 06:11:51 UTC
Created attachment 150954 [details] [review]
a patch

Here is a patch that seems to fix the leak, both server-side, and the client-side leak of GdkPixmaps as well.

Alex, does this look right to you ?
Comment 5 Alexander Larsson 2010-01-11 11:01:52 UTC
Looks correct.