Bug 216661 - plasma memory leak in task thumbnails
Summary: plasma memory leak in task thumbnails
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: 4.5 and older
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-29 14:33 UTC by Amichai Rothman
Modified: 2012-05-16 11:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amichai Rothman 2009-11-29 14:33:40 UTC
Version:            (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

After 17 days of uptime (Kubuntu karmic, KDE 4.3.2), I noticed in htop that plasma-desktop is taking up 800MB of memory (RES), as well as 30 hours of cpu time. Note that I have no fancy widgets anywhere, just a desktop folder and a comic strip (now removed) which barely ever changes, nothing too dynamic or social. I managed to isolate one cause for the memory leak (there may likely be others, and cpu usage is yet to be explained): the taskbar window thumbnails.

Steps to recreate:
0. enable the taskbar thumbnails effect if not already on.
1. open htop and some other task.
2. move the mouse pointer over the first taskbar icon, until the thumbnail is shown.
3. slide the mouse over to the second taskbar icon, until the thumbnail is shown.
4. look at plasma-desktop memory usage in the htop window.
5. goto step 2.

Pretty quickly you can see that the small memory increments with each thumbnail display mount up to megabytes of memory, which don't seem to ever be released. in 2 weeks of uptime with very normal use (no thumbnail OCD of any kind :-) ) it's quite possible that this would rise to 800MB.

Note: I just restarted the system, with a fresh plasma-desktop taking 70MB. Easily recreated making it rise to 75MB in two minutes, so that can rule out any long-lasting artifacts from the previous run having anything to do with it.
Comment 1 Beat Wolf 2009-12-14 13:12:35 UTC
i cannot reproduce this here with 4.3.3 an a nvidia graphics card. is this still an issue for you?
Comment 2 Amichai Rothman 2010-01-04 16:34:38 UTC
I just upgraded to 4.3.4 (from kubuntu backports), with latest nvidia drivers (190.53), fresh after reboot, and I'm seeing the same leak when following the steps above.

btw before the upgrade and reboot the uptime was around 20 days, and plasma-desktop took up about 700M. After reboot it started at just below 70MB - and rising.
Comment 3 Amichai Rothman 2010-01-24 15:45:22 UTC
Another small update: 20 days more uptime, 896MB. Interesting thing is, I've had desktop effects off for the past couple of days, yet I noticed plasma-desktop was at 849MB sometime yesterday, so it's still leaking regardless of effects...

I've tried recreating the leakage as described in this bug, and although it takes much longer (many more moves between application buttons), it still seems to recreate the leak. As before, this may be the only leak involved, or there may be others.

I do hope this gets fixed by 4.4 release, as it doesn't allow a system to remain stable/workable for long.

It seems I'm not allowed to change the bug status, so I'm assuming a maintainer will. If there's any other info required to diagnose this, I'd be happy to provide it - let me know what u need (and how to obtain it).
Comment 4 Beat Wolf 2010-01-24 15:48:42 UTC
as long as nobody else can reproduce it, it can only be fixed by an accident... so don't expect any fixes soon as long as there is no easy to reproduce way to reproduce that works for everybody.
Comment 5 Aaron J. Seigo 2010-05-22 02:39:08 UTC
the thumbnail leakage may be due to x.org drivers or (less likely) compositing in kwin ... the code in plasma is correct currently, though; i can certainly make x.org memory usage go up, but it eventually drops again. which is what is expected. 

as for the comment #3, try removing widgets to see if that helps any. i just closed a memory consumption issue in the microblogging widget (will be in 4.5), so there are issues to be found still (though we're nailing them one by one :)

in any case, what Beat says is right: without a way to reproduce, this report is not actionable.
Comment 6 Amichai Rothman 2010-05-24 14:39:11 UTC
Thanks for the update!

Regarding removing widgets, the only ones I have on the desktop are the desktop folder view and a post-it note widget (which doesn't change much), and whatever comes by default on the panel (K-menu, quick-access widget, clock, etc.) - really not much to remove.

To update on my experience, I very recently upgraded to Kubuntu 10.04 with KDE 4.4.2 and the latest NVidia drivers (195.36.15). I can no longer reproduce the memory leak using the same steps described in the original report, so it looks like luckily, someone fixed this particular leak by mistake :-)

However, I think other leaks still exist, as the plasma-desktop process is currently up to ~600M (and it ain't going back down after a few days). I had the ktorrent widget on the desktop for about 1 day, so that may be related - I'll try to investigate further.

In short, I think at this point it would be ok to close this particular bug report, but there are still other serious memory-related issues - perhaps I can open a generic bug (probably won't be too useful for fixing, but might draw out more comments or info from others), and of course if I manage to pinpoint any steps to reproduce the leaks as I have for this one, I will open specific bugs.

As before, I would be happy to learn what additional info/techniques can be used or provided to help pinpoint the leaks, which on my system are very reproducible and have been for months.

Thanks in any case for doing what you can :-)
Comment 7 Amichai Rothman 2010-05-27 13:13:34 UTC
I opened a separate issue for ktorrent plasmoid leak - https://bugs.kde.org/show_bug.cgi?id=238948.
Comment 8 Myriam Schweingruber 2012-05-16 11:29:41 UTC
Closing as there was no movement on this report since KDE 4.3.x. Feel free to reopen if you can reproduce this with KDE 4.8.3 or later.