Very high memory usage

Bug #760161 reported by Matt Zimmerman
68
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Unity
Invalid
Medium
Unassigned
compiz (Ubuntu)
Expired
Medium
Unassigned
unity (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: compiz

Lately, I've been noticing a consistent memory shortage on my system, with increasing amounts of swap being used, and long delays with lots of disk activity during resumes. I think the culprit is:

mdz 1827 1.3 15.1 2226364 465156 ? Sl Apr10 62:16 compiz

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: compiz-core 1:0.9.4+bzr20110407-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-8.41-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,decor,compiztoolbox,move,regex,grid,imgpng,vpswitch,resize,animation,workarounds,mousepoll,snap,gnomecompat,place,wall,session,expo,ezoom,staticswitcher,fade,scale]
CompositorRunning: compiz
DRM.card0.DVI.D.1:
 status: disconnected
 enabled: disabled
 dpms: Off
 modes:
 edid-base64:
DRM.card0.LVDS.1:
 status: connected
 enabled: enabled
 dpms: Off
 modes: 1680x1050 1680x1050
 edid-base64: AP///////wAkTYcoAAAAAAAPAQOAIRV4CrylmFhViygkUFQAAAABAQEBAQEBAQEBAQEBAQEBHC+Q0GAaD0AgMBMAS88QAAAZRSeQ0GAaD0AgMBMAS88QAAAZAAAADwCzCjKzCigUAQAyDAAAAAAA/gBMUDE1NFcwMi1UTDA2AL8=
DRM.card0.VGA.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1920x1200 1600x1200 1680x1050 1280x1024 1440x900 1280x960 1280x800 1024x768 800x600 800x600 640x480
 edid-base64: AP///////wBMLeYDNjJXVCMSAQMONyJ4Kv4hqFM3riQRUFQjCACpQIGAgUCBAJUAswABAQEBKDyAoHCwI0AwIDYAJlQhAAAaAAAA/QA4PB5REQAKICAgICAgAAAA/ABTeW5jTWFzdGVyCiAgAAAA/wBIVkRRODAwNDkwCiAgANc=
Date: Wed Apr 13 20:36:29 2011
DistroCodename: natty
DistroVariant: ubuntu
ExecutablePath: /usr/bin/compiz
GraphicsCard:
 Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) [8086:2a02] (rev 0c) (prog-if 00 [VGA controller])
   Subsystem: Lenovo T61 [17aa:20b5]
   Subsystem: Lenovo T61 [17aa:20b5]
MachineType: LENOVO 6465CTO
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcEnviron:
 LANGUAGE=en_GB:en
 LANG=en_GB.UTF-8
 SHELL=/bin/zsh
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=305dde78-d20a-4248-aaf4-09447b7c5791 ro quiet splash vt.handoff=7
ProcVersionSignature_: Ubuntu 2.6.38-8.41-generic 2.6.38.2
Renderer: Unknown
SourcePackage: compiz
UpgradeStatus: Upgraded to natty on 2011-02-10 (61 days ago)
XorgConf: Error: [Errno 13] Permission denied: '/etc/X11/xorg.conf'
dmi.bios.date: 01/21/2008
dmi.bios.vendor: LENOVO
dmi.bios.version: 7LETB0WW (2.10 )
dmi.board.name: 6465CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr7LETB0WW(2.10):bd01/21/2008:svnLENOVO:pn6465CTO:pvrThinkPadT61:rvnLENOVO:rn6465CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 6465CTO
dmi.product.version: ThinkPad T61
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:0.9.4+bzr20110407-0ubuntu2
version.ia32-libs: ia32-libs 20090808ubuntu11
version.libdrm2: libdrm2 2.4.23-1ubuntu6
version.libgl1-mesa-dri: libgl1-mesa-dri 7.10.1-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.10.1-0ubuntu3
version.xserver-xorg: xserver-xorg 1:7.6+4ubuntu3
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.0-0ubuntu4
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.14.0-4ubuntu6
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110107+b795ca6e-0ubuntu6

Revision history for this message
Matt Zimmerman (mdz) wrote :
Revision history for this message
Matt Zimmerman (mdz) wrote :

I tried compiz --replace, which seemed to work (redrew all of my windows, messed up my workspaces), but resulted in two compiz processes running:

mdz 1827 1.3 18.1 2181580 557564 ? Dl Apr10 62:31 compiz
mdz 24782 2.8 0.7 347156 21592 pts/0 Sl 20:40 0:03 compiz --replace

and more continuous hard disk thrashing.

Then, the older compiz process actually started to consume *more* resident memory:

mdz 1827 1.3 24.0 2181580 738676 ? Dl Apr10 62:32 compiz

at which point I tried to strace it to see what was going on:

perseus:[~] strace -p 1827
Process 1827 attached - interrupt to quit
+++ killed by SIGSEGV (core dumped) +++

Revision history for this message
Matt Zimmerman (mdz) wrote :

Note, this is with a classic desktop (not Unity)

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Thanks Matt,
We are aware that in some case, compiz --replace doesn't kill the older compiz process (there is no evidence when this happen unfortunately).
We are looking for memory leak in unity, but if you see some in compiz itself as well, we should have a look there. Did you notice any particular action triggering this memory leak?

Changed in unity:
assignee: nobody → Sam "SmSpillaz" Spilsbury (smspillaz)
milestone: none → 3.8.8
status: New → Confirmed
importance: Undecided → Medium
Changed in compiz (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

(adding the unity task to be tracked by Sam in the dx team)

Revision history for this message
David Barth (dbarth) wrote :

The task for tracking the memory leak is https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/758248

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 760161] Re: Very high memory usage

On Thu, Apr 14, 2011 at 07:29:23AM -0000, David Barth wrote:
> The task for tracking the memory leak is
> https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/758248

Are you saying that's believed to be the same issue, even though 758248 is
with Unity and my bug is with classic?

--
 - mdz

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Thu, Apr 14, 2011 at 07:21:41AM -0000, Didier Roche wrote:
> We are aware that in some case, compiz --replace doesn't kill the older
> compiz process (there is no evidence when this happen unfortunately).

Is there a bug open for that issue?

> We are looking for memory leak in unity, but if you see some in compiz
> itself as well, we should have a look there. Did you notice any particular
> action triggering this memory leak?

No particular action, no. After reporting this bug, I watched a DVD last
night, and then suspended my laptop (after stopping the film).

After resuming this morning, I see:

mdz 24782 1.2 8.0 578848 245560 pts/0 Sl Apr13 9:09 compiz --replace

and the memory usage is creeping up quickly without any explicit WM action from
me:

perseus:[~] while sleep 1; do date; ps u 24782; done
Thu Apr 14 09:19:42 BST 2011
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
mdz 24782 1.2 8.0 579732 246400 pts/0 Sl Apr13 9:11 compiz --replac
Thu Apr 14 09:19:43 BST 2011
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
mdz 24782 1.2 8.0 579876 246440 pts/0 Sl Apr13 9:11 compiz --replac
Thu Apr 14 09:19:44 BST 2011
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
mdz 24782 1.2 8.0 579796 246456 pts/0 Sl Apr13 9:11 compiz --replac
Thu Apr 14 09:19:45 BST 2011
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
mdz 24782 1.2 8.0 579780 246476 pts/0 Sl Apr13 9:11 compiz --replac
Thu Apr 14 09:19:46 BST 2011
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
mdz 24782 1.2 8.0 579888 246488 pts/0 Sl Apr13 9:11 compiz --replac
Thu Apr 14 09:19:47 BST 2011
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
mdz 24782 1.2 8.0 579888 246488 pts/0 Sl Apr13 9:11 compiz --replac
Thu Apr 14 09:19:48 BST 2011
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
mdz 24782 1.2 8.0 579888 246500 pts/0 Sl Apr13 9:11 compiz --replac

--
 - mdz

Revision history for this message
Matt Zimmerman (mdz) wrote :

Note that because compiz crashed previously when I straced it, I have a core dump which could be used for analysis if that's helpful.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Sure, can you upload to core dump in case we can have a look

The other bug mentioned by David is a global valgrind run for compiz and we only track the Nux mem leak fix in it.

On the --replace where older compiz process doesn't stop, there is no bug tracking it. We just experienced that within the team (and should not impact normal users as compiz is only restarted by gnome-session after a crash). Sam had a look at it last week IIRC without founding particular evidence of the issue (and we are prioritizing other more "main usage" bugs).

Revision history for this message
David Barth (dbarth) wrote :

Matt, can you detail the applications that you used prior to suspending the system:
- was that totem playing the DVD or another one?
- where you using firefox or chromium (with version differences if not using the standard natty load)
- any other graphical application, apart from the browser, that would have a lot of stacked windows?

Was you browser open with a high number of windows or tabs? >50 > 100?

Revision history for this message
Matt Zimmerman (mdz) wrote :

The compiz --replace issue is bug 760480

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Thu, Apr 14, 2011 at 08:40:12AM -0000, Didier Roche wrote:
> Sure, can you upload to core dump in case we can have a look

What's the best way to share it with you? I'm not keen to attach publicly
it in Launchpad as it could contain personal data.

> The other bug mentioned by David is a global valgrind run for compiz and
> we only track the Nux mem leak fix in it.

OK, so since this bug occurs without unity, it's a separate issue.

> On the --replace where older compiz process doesn't stop, there is no
> bug tracking it. We just experienced that within the team (and should
> not impact normal users as compiz is only restarted by gnome-session
> after a crash). Sam had a look at it last week IIRC without founding
> particular evidence of the issue (and we are prioritizing other more
> "main usage" bugs).

I will file a bug about this then.

--
 - mdz

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Thu, Apr 14, 2011 at 08:57:39AM -0000, David Barth wrote:
> Matt, can you detail the applications that you used prior to suspending the system:
> - was that totem playing the DVD or another one?

VLC

> - where you using firefox or chromium (with version differences if not using the standard natty load)

Chromium, one window with about 20 tabs

> - any other graphical application, apart from the browser, that would have a lot of stacked windows?

I don't think so, but I'll attach a dump of all running processes in my session.

--
 - mdz

Revision history for this message
Matt Zimmerman (mdz) wrote :
Revision history for this message
Matt Zimmerman (mdz) wrote :

It's continuing to steadily leak memory throughout the morning:

mdz 24782 1.2 7.1 625616 218084 pts/0 Sl Apr13 10:25 compiz --replace

Soon I will need to shut it down again. I will try closing applications and killing processes to see if there is any effect on the leak.

Revision history for this message
Matt Zimmerman (mdz) wrote :

- Closing Chromium had no effect, the leak continues at a similar rate

- Switching workspaces seems to make it go faster (but this is hard to
  measure objectively)

- Closing Gwibber had no effect

- Closing all open Nautilus windows had no effect

- Closing all open Empathy windows had no effect

- Closing Skype had no consistent effect (it seemed to slow down for a bit
  but then resumed)

- Closing LibreOffice had no effect

- Closing XChat had no effect

Now I'm down to only terminal windows and it's still leaking away.

--
 - mdz

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
David Barth (dbarth) wrote :

On 04/14/2011 11:08 AM, Matt Zimmerman wrote:
> On Thu, Apr 14, 2011 at 08:40:12AM -0000, Didier Roche wrote:
>> Sure, can you upload to core dump in case we can have a look
> What's the best way to share it with you? I'm not keen to attach publicly
> it in Launchpad as it could contain personal data.
Can bzip2 and share it with me via U1? and i'll distribute to
appropriate developers it we need to analyse that at this level.

David

Revision history for this message
Matt Zimmerman (mdz) wrote :

I've rebooted into a fresh session, and have been monitoring compiz to see if anything triggers the problem. Nothing so far:

reboot and login
- memory usage stable
switch desktops
- goes up a small amount
- stabilizes again
suspend
resume
- memory usage stabilizes
switch desktops a lot
- stays stable
opened xchat-gnome
- small increase, stabilized
opened chromium
- very small increase, stable
opened nautilus
- moderate increase, stable
open VLC and play a DVD
- very small increase, stable
fullscreen VLC
- very small increase, stable
- mdz 1801 1.5 0.6 280488 20800 ? Sl 10:27 0:10 compiz
opened gwibber
- very small increase, stable
various ordinary work
- mdz 1801 1.5 0.6 281680 21412 ? Sl 10:27 0:17 compiz
more ordinary work, played a video in Youtube
- mdz 1801 1.5 0.7 281864 21656 ? Sl 10:27 0:34 compiz
more ordinary work, started Empathy
- mdz 1801 1.5 0.7 281936 21756 ? Sl 10:27 0:40 compiz

After almost an hour of normal work, including a suspend/resume cycle, memory usage is still normal and steady.

Revision history for this message
David Barth (dbarth) wrote :

On 04/14/2011 11:22 AM, Matt Zimmerman wrote:
> - Closing Chromium had no effect, the leak continues at a similar rate
>
> - Switching workspaces seems to make it go faster (but this is hard to
> measure objectively)
>
> - Closing Gwibber had no effect
>
> - Closing all open Nautilus windows had no effect
>
> - Closing all open Empathy windows had no effect
>
> - Closing Skype had no consistent effect (it seemed to slow down for a bit
> but then resumed)
>
> - Closing LibreOffice had no effect
>
> - Closing XChat had no effect
>
> Now I'm down to only terminal windows and it's still leaking away.
Thanks for all the info.

I've looked into the precess list and find no obvious reason either. Can
you check the list of plugins you have enabled?

gconftool-2 -R /apps/compiz-1

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@David: the list is available through my apport compiz hook:

See:
CompizPlugins: [core,bailer,detection,composite,opengl,decor,compiztoolbox,move,regex,grid,imgpng,vpswitch,resize,animation,workarounds,mousepoll,snap,gnomecompat,place,wall,session,expo,ezoom,staticswitcher,fade,scale]

and GconfCompiz.txt

Revision history for this message
Matt Zimmerman (mdz) wrote :
Revision history for this message
David Barth (dbarth) wrote :

On 04/14/2011 12:29 PM, Matt Zimmerman wrote:
> ** Attachment added: "compiz gconf settings"
> https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/760161/+attachment/2033614/+files/compiz-gconf.txt
Thanks.

The main difference i can spot, is that you have the imgpng plugin
active, whereas i don't.

Then it may be down to some particular options like mipmapping.

You do have mipmapping enabled in the switcher plugin, whereas we've
turned that to 'disable' by default to avoid GL issues with certain drivers.

Can you try disabling both to see if that has an effect on the speed at
which the leak happens?

Changed in unity:
milestone: 3.8.8 → 3.8.10
Changed in unity:
milestone: 3.8.10 → 3.8.12
Revision history for this message
David Barth (dbarth) wrote :

I'm moving this bug to the backlog, until more elements can help confirm a way to reproduce the anomaly.

Changed in unity:
milestone: 3.8.12 → backlog
status: Confirmed → Incomplete
Changed in compiz (Ubuntu):
status: Confirmed → Incomplete
Changed in unity (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

We're closing this bug since it is has been some time with no response from the original reporter. However, if the issue still exists please feel free to reopen with the requested information. Also, if you could, please test against the latest development version of Ubuntu, since this confirms the bug is one we may be able to pass upstream for help.

Changed in compiz (Ubuntu):
status: Incomplete → Expired
status: Expired → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

this was closed by mistake, setting it back to incomplete.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for compiz (Ubuntu) because there has been no activity for 60 days.]

Changed in compiz (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for unity (Ubuntu) because there has been no activity for 60 days.]

Changed in unity (Ubuntu):
status: Incomplete → Expired
Omer Akram (om26er)
Changed in unity:
status: Incomplete → Invalid
status: Invalid → Incomplete
Changed in compiz (Ubuntu):
status: Expired → Incomplete
Changed in unity (Ubuntu):
status: Expired → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for compiz (Ubuntu) because there has been no activity for 60 days.]

Changed in compiz (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for unity (Ubuntu) because there has been no activity for 60 days.]

Changed in unity (Ubuntu):
status: Incomplete → Expired
Omer Akram (om26er)
Changed in unity:
status: Incomplete → Invalid
milestone: backlog → none
assignee: Sam Spilsbury (smspillaz) → nobody
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.