wnck-applet has memory leak

Bug #576751 reported by rindlis on 2010-05-07
This bug affects 14 people
Affects Status Importance Assigned to Milestone
gnome-panel (Ubuntu)

Bug Description

Binary package hint: gnome-panel

Ubuntu 10.04 released
fresh install
one Kernel upgrade:
Linux 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:28:05 UTC 2010 x86_64 GNU/Linux

I added a third panel on the left side.

From System Monitor
wnck-applet Sleeping 0 0 1951 70.4 MiB poll_schedule_timeout
/usr/lib/gnome-panel/wnck-applet --oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory --oat-ior-fd=18

5/5/2010 6:06 4.6 MB wnck-applet after reboot
5/6/2010 9:16 60.6 MB
5/6/2010 13:13 70.2 MB
5/6/2010 21:28 96 MB

logging out and back in brings it back to 4.6 MB

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gnome-panel 1:2.30.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Thu May 6 21:50:59 2010
ExecutablePath: /usr/lib/gnome-panel/wnck-applet
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
 PATH=(custom, user)
SourcePackage: gnome-panel

rindlis (rindlis) wrote :
Gregory Smith (gsmith) wrote :

I'm seeing a severe memory leak in wnck-applet (and gnome-panel, too) related to auto-hide.

If I set 'autohide' property in the bottom panel (it has the default stuff on it but I have widened it to 48 pixels), then *each* hide operation adds about 2 MB to wnck-applet, and likewise each 'show' adds about 2 MB. Likewise 'gnome-panel' grows in memory size on each of these operations, but it seems not by as much (maybe 0.8 to 1.1 MB). As I make these observations there are 9 open apps shown in the panel.

I also have 2.6.32-22-generic x86_64 and nvidia

This system has 8 CPUs (really, 4 HT) and 16 GB of RAM; I'm running a 'Twinview' dual monitor setup. Machine was built as 9.10 and updated to 10.4 without troubles.

With auto-hide turned off, it seems reasonably OK. I've seen some growth in memory size, but it could be normal and bounded from what I've seen. Will turn off auto-hide and see how it goes.

rindlis (rindlis) wrote :


In my case, workspace switching causes the memory increase of the wnck-apple.

Having the System Monitor on display on one workspace, I switch to an other workspace containing an open window and immediately back.

Each time the wnck-applet has a memory increases by 0.2 MB and the gnome-panel by 0.1 MB.

Removing the Window List applet from the bottom panel fixes the memory increase and the wnck-applet stays always at 6.8 MB (after reboot). However the Window List is an important applet and I do not want to be without it.

Here is a list of other things I tried:

1. Removing Compiz.

2. Increasing or decreasing the number of Desktops.

3. Different workspace switching: using mouse pinter, mouse wheel, keyboard Ctrl-Alt-right/left, Alt-Tab, Super-Tab.

4. gconftool-2 --set -t bool /apps/panel/global/locked_down true > locks all panels.

5. killall gnome-panel > refresh all panels.

6. sudo killall wnck-applet > clears out three bottom panel applets (except trashcan).

7. Reinstalling the three panels Window List, Window Selector, Workspace Switcher.

8. Reboot after each step.

9. Remove third panel on the left.

No matter what I did, 10.04 used more and more memory. After just 2 days, wck-applet was at 57.3 MB) and gnome-panel at 44.4 MB. Total memory use was 80 % of my 2 GB of memory and I have to reboot to bring it back down to an initial 40 %.

On a completely unrelated note, I was also unhappy about the default themes Ambiance (too dark) and Radiance (too light and washed out). So I experimented with
using Radiance and mixing in the controls from Ambiance. But then I found the theme Finery (improved Radiance theme) and installed it => Bingo!

All memory problems gone, wck-applet stays at 3.9 MB, gnome panel stays at 6.0 MB, total memory use after 2 days is only 50%, and I am using my third panel.

So now I started testing out different themes and check for memory increase. I found that only Ambiance and Radiance are causing memory increase, all others themes are OK.

Further, after first using Finery, I can then switch back to Ambiance, and as long I do not change anything (like colors or window border), Ambiance is now OK too. However, as soon that I modify Ambiance, or I use Radiance, the memory increase is starting again.

Conclusion: the memory leak is caused by a combination of things: Window List applet, themes Ambiance or Radiance and workspace switching (or auto-hide, see above).

Fixes: 1. Use another theme than Ambiance or Radiance.
          2. Switch first to the theme Finery and then back to Ambiance.
          3. Remove Window List applet from the bottom panel.


Gregory Smith (gsmith) wrote :

With auto-hide turned off I'm seeing the same increase you describe, from switching workspaces (I'm using Ambiance). Will try Finery.

rindlis (rindlis) wrote :

Another, related bug:

After my fresh install of 10.04 and using Ambiance:

Right-click on a panel > Click on: New Panel > No new panel shows up > log-out > log-in > new panel shows up the right side.

This bug also disappears by installing and using the theme Finery and then switching back to Ambiance.


 Re: New panel doesn't shows up immediately upon its adding


 Ubuntu 'new panel' question

rindlis (rindlis) wrote :


I did a reprofiling at bootup.

This resulted in a lower memory and cache use, fixed the wck-applet memory leak with theme Radiance and gave a faster bootup. Very impressive result. I have no memory leak anymore.

Perhaps reprofiling is the correct solution for all memory and panel related problems?
Should it be activated automatcially once after each fsck test? After an installation of a new kernel?

 TIP: Improve bootup speed by reprofiling bootup

Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please try to obtain a valgrind log following the instructions at https://wiki.ubuntu.com/Valgrind and attach the file to the bug report. This will greatly help us in tracking down your problem.

Changed in gnome-panel (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
rindlis (rindlis) wrote :


Thank you for looking at my bug report.

The Valgrind log tracks the memory usage of a specific program.

Which program do you want me to run the Valgrin log on?

1. wnck-applet is not a program and does not run by itself.

2. gnome-panel is started at login and upon running it again, it gives the error: Cannot register the panel shell: there is already one running.

Please advise.

Sebastien Bacher (seb128) wrote :

wkck-applet can be run from the command line before adding the applet to the configuration

rindlis (rindlis) wrote :

from my command line:

wnck-applet: command not found

whereis wnck-applet

which wnck-applet

wkck-applet: command not found

whereis wkck-applet

which wkck-applet

Sebastien Bacher (seb128) wrote :

the path is in the bug description you sent...

rindlis (rindlis) wrote :

Uups, should read my own bug report, sorry about that.

Here is what I did:

sudo apt-get install valgrind

sudo killall wnck-applet (this removes all 4 applets from bottom panel, except trash)

G_SLICE=always-malloc G_DEBUG=gc-friendly /usr/bin/valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind.log /usr/lib/gnome-panel/wnck-applet

let valgrind run for about 1 minute until it stops

post log file: /home/username/valgrind.log

Massimo Cora' (pescio) wrote :

I'm using ubuntu 10.04 at work, and I keep gnome session up for weeks and weeks.
This morning I saw a 250 MB memory usage for wnck-applet, and 350 for gnome-panel.

I killed and restarted them, now they're with low memory, but the leak is somewhere there and must be fixed.
Maybe notifying gnome devs should be the best thing to do.

Rodan Bury (bury-rodan) wrote :

I've been using Ubuntu 10.04 for a month now (I decided to switch to Linux completely after several experiments). The experience I had a a user with Ubuntu 10.04 would have been great if it wasn't for this memory leak.

I could see through the system monitor the memory used for wnck-applet growing higher by the hour. After 10 hours of use or more, it ofter reached at least 1Go of memory for wkck-applet alone. Without including the high use of SWAP memory.

Basically, it resulted in Ubuntu crashing every one or two days. Which means that in one month with Ubuntu I had more crashes than two years with Vista.

I disabled the autohide fonction of the bottom panel, which seemed to improve the situation a little. But the memory leak problems are far from being solved. And this autohide fonction is very convenient, so I'm unhappy with this temporary fix.

"Maybe notifying gnome devs should be the best thing to do." ----> I strongly support this idea. :-)

Tom Davidson (tjd-mit) wrote :

See also bug 17787, eventually marked as invalid, from 2005:
wnck-applet causes X to leak like crazy on hide/unhide

Changed in gnome-panel (Ubuntu):
status: Incomplete → New
Pedro Villavicencio (pedro) wrote :

Thanks for sent it upstream.

Changed in gnome-panel (Ubuntu):
status: New → Triaged
mtvoid (mtvoid) wrote :

Reading the report at https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/17787 might give a clue to the source of the problem. The real culprit seems to be the transparency of the panel. The panel with the wnck-applet needs to have both auto-hide and transparency enabled for the memory leak to show up (I just checked now, even if auto-hide is off and only transparency is enabled, switching workspaces causes a leak). After disabling transparency by changing the panel background to None (but keeping auto-hide enabled), I am no longer seeing the memory leak on my system. Can others confirm if they are seeing similar results?

Changed in gnome-panel:
importance: Unknown → High
status: Unknown → New

Hi everybody,

I am using UNE 10.10 without unity (starting on netbook 2D session) on a samsung nb30.
Thanks mtvoid, that was it! I also got the memory leak fixed after removing the transparency setting of the panel. I can now fully enjoy wnck-applet!

_Fikret_ (tozakfikret) wrote :

I have the same problem. I use ubuntu 10.04 if mouse over top sidebar only gnome-panel memory increase. Nut if mouseover on bottom bar gnome-panel memory increase as well as wnck-applet memory usage is increasing.
İf I uncheck transparency, problem solving.

Aditya Devarakonda (aditya08) wrote :

Hey guys,

I had the same issue but transparency was the issue. It would be nice to have this solved though, it adds a little bit more flavour to the linux experience.

I’ve got the same problem, wnck-applet is now at 356MB and gnome-panel at 502MB. Trying to switch off transparency, but keep autohide.

Changed in gnome-panel:
status: New → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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