Massive memory leak with Compiz when resizing windows in normal mode

Bug #564636 reported by Adam Lyall
This bug report is a duplicate of:  Bug #565981: [KMS] gem objects not deallocated. Edit Remove
34
This bug affects 8 people
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: compiz

When compiz resize plugin is set to "normal" mode if I begin resizing windows memory consumption begins to rapidly rise (observed in System Monitor) and very quickly begins dumping into the swap space. As this happens the system naturally becomes very sluggish as the hard drive is written too. Once I stop resizing windows and wait for the writes to swap space to finish the systems performance goes back to normal but as soon as I resize a window again the swap space usage increases again and thus slows the system down once again. Currently as I write this my swap space is at 1.2gb of 2gb used and shows no sign of stopping if I resize a window. It would probably use all my memory if I kept resizing application windows (happens with any app I tested) but I'm reluctant to test that theory as it would probably crash my system. The other resize modes do not cause this leak.

I have tested with Metacity with its composite turned on and I get no such issue. Memory usage remains as expected.

This is on a Sony Vaio CR laptop with an Intel x3100 gpu. I have also seen similar but not quite the same issue using a Radeon 9700 (r300) gpu. With that system however no memory leak occurs but after resizing the windows a few times window performance becomes extremely slow (and does not return to normal where as the Intel does). So I do not think it is quite the same bug so will probably open a report for that issue as well.

I have also tested both systems using todays daily live cd (downloaded 16/04/2010 8:46am) on a usb stick and the same issue still occurred.

I will be able to test another laptop with an Intel 4500HD GPU later today using a live usb so will report back on how that turned out.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: compiz 1:0.8.4-0ubuntu15
ProcVersionSignature: Ubuntu 2.6.32-21.31-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic i686
Architecture: i386
CompizPlugins: [core,ccp,move,resize,place,decoration,workarounds,text,regex,vpswitch,video,ring,extrawm,png,gnomecompat,imgjpeg,mousepoll,commands,shift,session,dbus,winrules,neg,svg,resizeinfo,snap,wall,animation,expo,fade,scale,ezoom,scaleaddon,staticswitcher]
Date: Fri Apr 16 12:48:56 2010
MachineType: Sony Corporation VGN-CR11S_L
PackageArchitecture: all
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
PciDisplay: 00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller [8086:2a02] (rev 0c)
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-21-generic root=UUID=20443279-212b-48e4-815d-64a791d9c125 ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions:
 xserver-xorg 1:7.5+5ubuntu1
 libgl1-mesa-glx 7.7.1-1ubuntu2
 libdrm2 2.4.18-1ubuntu3
 xserver-xorg-video-intel 2:2.9.1-3ubuntu4
 xserver-xorg-video-ati 1:6.13.0-1ubuntu3
SourcePackage: compiz
dmi.bios.date: 07/25/2008
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: R0231Q0
dmi.board.asset.tag: N/A
dmi.board.name: VAIO
dmi.board.vendor: Sony Corporation
dmi.board.version: N/A
dmi.chassis.asset.tag: N/A
dmi.chassis.type: 10
dmi.chassis.vendor: Sony Corporation
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvrR0231Q0:bd07/25/2008:svnSonyCorporation:pnVGN-CR11S_L:pvr01:rvnSonyCorporation:rnVAIO:rvrN/A:cvnSonyCorporation:ct10:cvrN/A:
dmi.product.name: VGN-CR11S_L
dmi.product.version: 01
dmi.sys.vendor: Sony Corporation
system: distro = Ubuntu, architecture = i686, kernel = 2.6.32-21-generic

Revision history for this message
Adam Lyall (magicmyth) wrote :
Revision history for this message
Adam Lyall (magicmyth) wrote :

Should probably have mentioned that this issue was not occurring a couple weeks ago (on either the Intel or Ati gpu) but started once I updated the systems on Sunday (Apr 11) I think. It does not occur on Karmic either.

Revision history for this message
Adam Lyall (magicmyth) wrote :

I can now confirm the same bug occurs on an Acer Aspire 5738z with an Intel GMA 4500M.
$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 09)

Tested with the same daily (16/04/2010 8:46am) live usb. In Karmic (the machine's current install) the issue does not occur.

Revision history for this message
Tournier Mathieu (mathieutournier) wrote :

Same problem with kwin (kde 4.4.2) and an ati X1400 mobility radeon card (using opensource drivers (mesa 7.7.1-1 , ati r500 1.3.0-2).
When I maximize a window, I notice a memory leak (about 5 Mo each time). Memory usage of all my processes (including Xorg) stay constant but the free memory of my laptop decreases.
This memory leak doesn't happen when desktop effects are disabled.

Revision history for this message
finalpatch (fengli) wrote :

Same problem with ATI Mobility 9600 using radeon driver. This leak is quite bad as it quickly renders the entire system unusable.

Revision history for this message
Travis Watkins (amaranth) wrote :

Considering this is happening with compiz and kwin as well as different open source drivers it must be something in xorg or in mesa. Reassigning to xorg for now, hopefully someone there will be able to narrow it down.

affects: compiz (Ubuntu) → xorg-server (Ubuntu)
Revision history for this message
finalpatch (fengli) wrote :

Not only does it leak memory on resizing in 'normal' mode, but also in other modes. 'Normal' mode leaks faster than the other modes because it updates window content much more frequently.

Revision history for this message
Adam Lyall (magicmyth) wrote :

I've tested with KDE4 Kwin on my Vaio CR (Intel) as well now and can confirm I get the same issue I described with compiz. Seems to take more effort though as I could not get Dolphin to cause the issue when resizing its window very quickly but System Settings' Appearance started chomping into my memory almost right away as I began resizing the window. I agree with Travis that this is looking more like a Xorg problem.

Revision history for this message
Bryce Harrington (bryce) wrote :

Can you narrow down the dates a bit more precisely? If the issue started on April 11th, we did not make any changes between Mar 31 and Apr 12th so it wouldn't make sense that this regression would be an xorg-server regression.

The change on Apr 12th was something specific to ARM and almost certainly couldn't cause this kind of problem. That is in xorg-server 2:1.7.6-2ubuntu3, patch 111_armel-drv-fallbacks.patch if you wish to check (you could comment out the patch in debian/series to test).

There was a series of xserver changes on April 14-16, all of which are believed to be safe but could be suspects I guess. So if you can pinpoint the date (or even better xserver versions) that the regression started it would help narrow down where we need to search.

Revision history for this message
LordPhoenix (lorphoenix) wrote :

I've got Same problem here with an ATI 9200 SE. Is there some tasks or test I can do to collect information to help?

Revision history for this message
Adam Lyall (magicmyth) wrote :

Hi Bryce,

Before the 11th I had not updated for more than a week (was away from the system for a while) on the Intel laptop. The issue may have been there for the Intel earlier and I did not notice it. I only picked it up recently as I was resizing Firefox with many tabs on a large (1900x1080) screen. The extra screen space in conjunction of having a relatively complex app (if counting the web page) caused my hard drive to really churn. I popped open System monitor to see the huge amount of swap space in use. I quickly realised it was resizing the window that was causing this. Most of the time I rarely resize windows (except to maximise) so this could easily have gone unnoticed for a while.

The ATI system was left without updates for nearly two weeks before I updated it on the 11th. Prior to updating the ATI system on the 11th I was testing the system quite a bit and was doing a lot of resizing of windows (admiring how smooth it was with compositing these days. Yay KMS and DRI2). It was all vary smooth. I updated the system and tried the same things again to look for regressions and soon found after resizing the windows a few times the systems window performance took a dramatic hit (dragging was laggy and very slow). So an update somewhere between two weeks before the 11th had likely caused the regression for the ATI. As I mentioned I'm not sure the ATI is exhibiting the exact same bug as it does not leak memory. Performance simply takes a hit but both cards exhibit the bad behaviour under the same conditions.

Is it possible to get a Daily live cd image from or before the 30th of March? I could then test to see for sure if this issue was present prior to the 31st update you mentioned.

Bryce Harrington (bryce)
Changed in xorg-server (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.