Massive memory leak in compiz

Bug #154210 reported by Ramesh Dharan
18
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
New
Undecided
Unassigned
Nominated for Gutsy by karlrt
Nominated for Hardy by karlrt

Bug Description

I'm running the Gutsy release bits, with the NVIDIA 100.14.19 closed/proprietary driver and compiz enabled with full desktop effects.

Compiz is leaking 3MB of memory every time I open and close a window. That is to say, I can see resident memory usage in 'top' (not just virtual address space) increasing steadily, and every time I open and close a terminal window I see it jump by 3MB.

I just had to power-cycle my system because compiz.real was using 1.7GB of resident memory, and it locked up the machine when I tried killing it.

Revision history for this message
Ramesh Dharan (rrdharan) wrote :

This is on an AMD64 host, NVIDIA card is an NV44 (Quadro NVS 285).

Revision history for this message
Ramesh Dharan (rrdharan) wrote :

I'm attaching a zip file of my Compiz settings - all the XML files from ~/.gconf/apps/compiz.

Revision history for this message
zzwave (zzwave) wrote :

I've got same conditions and same bug.

Revision history for this message
Jussi Kivilinna (jukivili) wrote :

Same problem when enabling "normal" visual effects, the bigger open/closed window the larger memory leak.

Gutsy, amd64, integrated NVIDIA 6100 (driver 100.14.19).

Revision history for this message
Vipul Mathur (vipul) wrote :

Just a quick note to confirm.

I have the same hardware as evilspy above and I see the same bug.

I upgraded from Feisty to Gutsy (release).

Revision history for this message
kikvors (kikvors) wrote :

Count me in.
Using 100.14.19 driver with fresh install of Gutsy.
GeForce 7400 video card, core2 duo.

Revision history for this message
Sasa Markovic (saxon-eunet) wrote :

Just my two cents:

With everything fully up-to-date, I can only say:

gutsy + nvidia-glx-new + compiz = total disaster

I have an ASUS M2NPV-VM motherboard with an integrated NVidia GeForce 6150GPU. I use the following compiz plugins: Cube, Expo, Rotate Cube, Viewport Switcher, Animations, Water Effect, Windows Decoration, Wobbly Windows, Image loading plugins, Cube Caps, Dbus, Resize info, Video Playback, Application Switcher, Move Window, Place Windows, Scale, Resize Window.

It leaks memory as a rotten barrel and makes my (once beautiful) Ubutnu almost useless. Two or three hours of work and it's dead as a rat. Compiz takes 600-700Mb of 1Gb RAM available, the machine starts swapping and and soon - it's gone.

This was my easisest way to reproduce this bug:

1) Open Thunderbird and Firefox
2) Minimize Thunderbird, Maximize Thunderbird, Minimize Firefox, Maximize Firefox
3) Repeat step 2 and watch how comipz.real leaks memory. You don't need to rotate the cube at all.

After repeating step (2) ten times, memory usage of compiz increased from 275Mb to 433Mb :(

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 5504 sasam 15 0 433m 398m 364m S 1.3 40.8 0:37.62 compiz.real

IMHO, this is a *critical* issue: gutsy, nvidia nad compiz are common on many ubuntu installations and god knows how many users will encounter this problem as soon as they upgrade to gutsy.

Revision history for this message
Skippy le Grand Gourou (lecotegougdelaforce) wrote :
Download full text (6.2 KiB)

Tell me if this is the wrong place for me, since my config is a bit different. However, if this is the same issue, my contribution might point to other leads.

So, I'm using ArchLinux but I don't think it is distro-related, Compiz with default effects, and I'm running the free radeon driver for my Radeon 9200 Pro (Rv280), so the main difference is that I don't use a nvidia graphic card (however my mainboard is a nvidia :-D).

What I observe is that if I let my computer on for a long time, it will randomly freeze, and when I come back I will have to perform a hard reboot, while the screen shows a static xscreensaver screenshot.

/var/log/messages say oom-killer was invoked several times because all swap was used (0KB free). Here is a snaphot of all processes using more than 20% of the memory just before the freeze (ps aux | awk '$4>20 { print $0}') : a X burst, then compiz increases.
--------------------------------------- 8< ------------------------------------------
Sun Nov 25 03:30:02 CET 2007
root 10444 8.2 24.9 323804 128912 tty7 Ds+ Nov23 208:35 X :0 -auth /home/goug/.serverauth.10392
goug 10571 1.2 46.3 267536 239116 ? D Nov23 30:54 compiz --replace --sm-disable --ignore-desktop-hints ccp --indirect-rendering
Sun Nov 25 03:49:30 CET 2007
goug 10571 1.2 74.8 498536 385784 ? D Nov23 31:22 compiz --replace --sm-disable --ignore-desktop-hints ccp --indirect-rendering
Sun Nov 25 04:07:52 CET 2007
goug 10571 1.2 77.1 498536 397916 ? D Nov23 31:41 compiz --replace --sm-disable --ignore-desktop-hints ccp --indirect-rendering
Sun Nov 25 04:20:22 CET 2007
goug 10571 1.2 77.8 498536 401636 ? D Nov23 31:55 compiz --replace --sm-disable --ignore-desktop-hints ccp --indirect-rendering
--------------------------------------- 8< ------------------------------------------

Here are some samples appearing in /var/log/messages :
--------------------------------------- 8< ------------------------------------------
Nov 25 03:35:30 DeepThought XXX invoked oom-killer: gfp_mask=0xa01d2, order=0, oomkilladj=0
Nov 25 03:35:31 DeepThought [<c015ea5f>] out_of_memory+0x17f/0x1c0
Nov 25 03:35:31 DeepThought [<c016065c>] __alloc_pages+0x2dc/0x300
Nov 25 03:35:31 DeepThought [<c01621a9>] __do_page_cache_readahead+0x159/0x2d0
Nov 25 03:35:31 DeepThought [<c035f7be>] io_schedule+0x1e/0x30
Nov 25 03:35:31 DeepThought [<c035fc1b>] __wait_on_bit_lock+0x5b/0x70
Nov 25 03:35:31 DeepThought [<c015b670>] sync_page+0x0/0x50
Nov 25 03:35:31 DeepThought [<c015b653>] __lock_page+0x53/0x60
Nov 25 03:35:31 DeepThought [<c01626cc>] do_page_cache_readahead+0x4c/0x70
Nov 25 03:35:31 DeepThought [<c015ddc5>] filemap_fault+0x2a5/0x470
Nov 25 03:35:31 DeepThought [<c016793f>] __do_fault+0x5f/0x3f0
Nov 25 03:35:31 DeepThought [<c016a03d>] handle_mm_fault+0x11d/0x760
Nov 25 03:35:31 DeepThought [<c0139507>] __atomic_notifier_call_chain+0x27/0x50
Nov 25 03:35:31 DeepThought [<c01221eb>] do_page_fault+0x45b/0x6f0
Nov 25 03:35:31 DeepThought [<c011c257>] ack_ioapic_quirk_irq+0x47/0xc0
Nov 25 03:35:31 DeepThought [<c017c4c7>] filp_close+0x47/0x80
Nov 25 03:35:31 DeepThought [<c0121d90>] do_page_fault+0x0/0x6f0
Nov 25 03:35:31 ...

Read more...

Revision history for this message
Skippy le Grand Gourou (lecotegougdelaforce) wrote :

And sorry for reopening this duplicate, but I think the "original one" is too nvidia-oriented for me to post in...

Revision history for this message
Adrian Penisoara (adrian.penisoara) wrote :

I see the same problem with compiz.real process growing in size, but with an Intel video card:

ady 5512 0.3 67.2 1554180 1380664 ? S Dec03 4:11 /usr/bin/compiz.real --ignore-desktop-hints --replace --indirect-rendering --sm-client-id default0 ccp

That comes around 1.3Gb of resident memory on a 2Gb RAM machine. Hardware is Dell OptiPlex GX620 with an Intel 82945G/GZ video chipset driven by the "intel" xorg driver, OS is Ubuntu Gusty 7.10 amd64 freshly installed. So this quite excludes the video driver as a root cause.

Machine has been perfectly running previously with Ubuntu Gutsy 7.10 i386 (32bit). This leads me thinking there is an issue in Compiz when compiled as 64bit binary. Let me know what other data you would need me to upload.

I think it's best that we unlink this bug from #151168 since that one is directly tied to the NVIDIA driver.

Revision history for this message
Skippy le Grand Gourou (lecotegougdelaforce) wrote :

After disabling xscreensaver and screen power management as specified on several websites, my computer has been running without any problem for 5 days. However, I notice that X is eating more and more memory. The command "top" gives currently :
  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10223 root 20 0 416m 116m 6220 S 4.0 23.1 146:12.77 X

Hope this will be of interest...

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.