Bug 241849

Summary: plasma leaks memory
Product: [Unmaintained] plasma4 Reporter: anton <benderamp>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aseigo, asraniel, bjoern, kde, kfunk, luizromario, mick22, notmart, zanetu
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description anton 2010-06-15 21:56:17 UTC
Version:           unspecified
OS:                Linux

kde 4.5 beta2 from opensuse unstable, 84 bit

I have noted that I have low free memory on laptop, system monitor showed me that plasma has eaten about 500mb in the "memory" column which seemed to be innormal. I have made killall plasma-desktop and restarted it - this time it showed about 60mb in same column.

Then I have left comp for about 3-4 hours without switching it off and also without making any actions with it, then returned to it, reloaded few pages in konqueror, then looked at system monitor again and see that plasma-desktop process takes 265mb and constantly takes 2-3% cpu (and while I was writting this message, the memory ammount was raised to 268mb and it slowly grows up).

I have 3 picture frame plasmoids on desktop, one quick launch plasmoid on desktop, 2 network monitor plasmoids (one on the panel, another on the desktop), on the panel - trash, yaWP, xeyes, task manager, show desktop, tray, power manager, device manager, clocks and app launcher.

Reproducible: Didn't try
Comment 1 Nicolas L. 2010-06-15 22:06:38 UTC
can you try to remove all the applets/widgets and only use one ( to see which one leaks )
Comment 2 Marco Martin 2010-06-15 22:15:14 UTC
can you try leaving the widgets one by one open in plasmoidviewer?
one of them should grow as well
Comment 3 anton 2010-06-15 22:25:42 UTC
This seems to be systray. I have dropped another instance to plasmoidviewer window and it immediately started to eat 2% cpu and slowly eating memory with same speed as plasma-desktop process. At the same time another window of plasmoidviewer with yaWP does not eat any cpu and constantly takes 15.7mb of memory (though I was initially thout about this plasmoid as of the source of the leak).
Comment 4 anton 2010-06-15 22:38:03 UTC
This seems to be much like the fault of ktorrent (Version 4.0.0). Though it does not have any active downloads/uploads, when I closed it, plasma started to take 0-1% of cpu and contant growth of memory consumption has stopped (or became much slower - must check after some time). When started ktorrent again, cpu returned to 2-3% and memory consumption speed became visible to the eye again.
Comment 5 Marco Martin 2010-06-15 22:42:27 UTC
Ktorrent updates the icon quite often.
there was a similar bug fixed the other day, so it could be fixed.
i will do some tests on that as well
Comment 6 anton 2010-06-16 13:36:27 UTC
I have checked after few hours - memory continued to leak (currently it is 90mb vs 50 at start), but much slower than with ktorrent. I will check if that was fixed with next beta.
Comment 7 Romário Rios 2010-06-17 07:13:56 UTC
Version: KDE SC 4.4.85 (ArchLinux packages)
OS: Linux

I can confirm it. Right now, plasma-desktop is using 524.6 MiB of RAM - and increasing. A few days ago, after I left the computer turned on for three days, It was using around 1.2 GiB. And I haven't changed my desktop since I installed 4.4.85 - i.e., I have no widgets on the desktop.
Comment 8 Michael Meier 2010-07-05 15:54:46 UTC
I had this problem with 4.4.85. Seems to be gone with 4.4.90.
Comment 9 Björn Ruberg 2010-09-17 19:48:55 UTC
Does this persist in the final 4.5 releases?
Comment 10 Beat Wolf 2010-09-17 19:53:07 UTC
For me plasma leaks with the animated kopete systray icon, and this still happens in 4.5.1
Comment 11 Aaron J. Seigo 2010-09-18 06:45:43 UTC
a few major memory leaks in KImageCache and KSharedCache were found and fixed and will appear in 4.5.2. it's likely this is what the original reporter was seeing. no one has, to my knowledge, checked if the intermittent reports about systray icon leakage and those fixes are related. i wouldn't be surprised, though: there was a 3x in-memory cache which meant that pixmaps would fill up 100s of MB in this cache over time.
Comment 12 Romário Rios 2010-09-18 12:12:04 UTC
The situation is a lot better now than it was when I was CC'ed to this bug. But there is still some high memory consumption and high CPU usage without an appearant reason sometimes.
Comment 13 Aaron J. Seigo 2011-12-02 22:27:04 UTC
i consider this issue with the caching fixed, as much as it will be.