Bug 495468 - KDE plasma memory leak
Summary: KDE plasma memory leak
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kdebase-workspace
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-13 10:59 UTC by Mark Nagy
Modified: 2009-05-26 14:11 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-26 14:11:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark Nagy 2009-04-13 10:59:17 UTC
Description of problem:
Plasma (the KDE 4 panel) seems to have a memory leak.  On my system, with 1GB of RAM, it starts out at about 2.8% memory usage, but gradually grows to at least 52.3% (the percentage it was at last time when I got sick of waiting for all the swapping/paging delays and restarted it).  Yes I know a gigabyte of RAM isn't nearly what the most powerful systems use these days, but if you're thinking of making some dismissive judgment on that basis, at least first consider:  What would a panel app that was running fine on less than 3MB be doing with over 500 later on?  I didn't make any setting changes in between, and this has happened repeatedly for some time now, through several yum updates of KDE.

Version-Release number of selected component (if applicable):
4.2.1-7.fc10.i386 is the version I currently have, but the trouble started before this (I've forgotten how long before) and I wouldn't be surprised if it was still there in the next release.

How reproducible:
Completely reproducible as far as I know.

Steps to Reproduce:
1.  Boot Fedora 10
2.  Log on to KDE and check plasma's memory usage (e.g. using top)
3.  Keep using the system for some time without rebooting or otherwise restarting plasma (a day should be more than enough)
4.  Check plasma's memory usage again
5.  If you want further confirmation, "kill" the plasma process and use KDE's alt-f2 command line to run it again.  The new plasma process should start with the old low memory usage level again, even with the same settings and the same running applications.
  
Actual results:
Total memory usage grows and grows, by at least an order of magnitude eventually, apparently with no upper limit but that of the hardware.

Expected results:
Unless there is a dramatic change in plasma's settings, its memory usage should plateau somewhere close to where it starts.

Additional info:  I've seen it claimed on at least one web site that this problem was fixed in version 4.2, but I've got 4.2.1 and it's not fixed there.  I've seen it claimed on at least one web site that the problem is caused by some NVidia driver, but I'm using an ATI card right now.  It kind of looks as though people have been trying unsuccessfully to wish this problem away for a while, but who knows...

Comment 1 Mark Nagy 2009-04-13 11:04:41 UTC
Where I said "running fine on less than 3MB" I meant "running fine on less than 30MB"; the point is essentially the same, but sorry about the typo...

Comment 2 Steven M. Parrish 2009-04-13 11:44:46 UTC
Thank you for the bug report.  This issue needs to be addressed by the upstream developers.  Please submit a report at http://bugs.kde.org. You are requested to add the bugzilla link here for tracking purposes. Please make sure the bug isn't already in the upstream bug tracker before filing it.

Comment 3 Mark Nagy 2009-04-13 12:31:13 UTC
OK, they have a few possibly-related bug reports, some of them linking to each other in circles - I'll have to look at this some more for a while and see if I can either definitely identify it with an existing report or submit a new one without having that dismissed or deflected one way or another...

Comment 4 Rex Dieter 2009-04-13 12:41:40 UTC
We can help, post the bugs you've found so far... or if in doubt, file a new one.

In the meantime, please list output of
rpm -q qt kdelibs

and list all plasma widgets you use (in particular, if using anything not in fedora currently).

Comment 5 Mark Nagy 2009-04-13 13:48:30 UTC
So far, I haven't tried filing a new bug report, because from the output under some existing reports it looks like the developers would be inclined to respond with some version of "we're sick of this subject; look at all the other bug reports like this, and then go away you fool," but anyway...

# rpm -q qt kdelibs
qt-4.4.3-15.fc10.i386
kdelibs-4.2.1-4.fc10.i386

I am running the task manager, system tray, show desktop, and application launcher widgets.  I have one panel at the top of the screen and one at the bottom, both set to auto hide.  I was originally running a digital clock widget, but I closed it, for reasons described below, and that does *not* appear to have solved the problem.

The bug report that looked most promising to me initially (for what it's worth) was "Bug 184394 – Plasma use more memory over time" but "karaluh" seems to have deflected that as "propably a duplicate of [Bug 183191]".  Bug 183191 is "possible memory leak in digital clock...".  When I saw that one, I removed the digital clock widget from my plasma panel and restarted plasma again, but it looks like the memory usage is still rising (from about 25MB to about 36MB in the last hour or so).

Karaluh also comments that "Bug 182900 – Twitter widget leaks memory" might be a duplicate of Bug 184394, and comments under Bug 183191, "see also: [Bug 184394 and Bug 182900]".  I have never used Twitter.

Under "Bug 183646 – plasma leaks into X11 pixmap memory", one person has added a comment describing what sounds like the problem I am seeing here, only to be accused of "pollut[ing]" the bug report because "X11 pixmap memory" is not "resident memory" and because he mentions NVidia drivers, which "have had separate issues documented elsewhere".  I don't know enough to distinguish "X11 pixmap memory" from "resident memory", and as I said I am using an ATI card.

So, at a first glance, at least, the problem I see on the KDE bug site seems very similar to the problem I had searching the web in general:  Various people are reporting what sounds like it *might* be the same bug, but it is invariably either chalked up to things that don't apply in my case or otherwise dismissed.

Comment 6 Rex Dieter 2009-04-13 13:58:36 UTC
One thing worth trying is to see if kde-4.2.2 currently in updates-testing helps for you.

Another common element between you and the reporter of upsream bug #183191 is the "show desktop" widget.

And, for the digikal clock widget, do you ever use the "show seconds" option? (but likely not it, since you recently removed it...)

You mention plasma keeps using more memory, but you haven't quantified this.  Please provide numbers of initial values and approximate rate of growth (for reproducibility and comparison).

Comment 7 Mark Nagy 2009-04-13 14:13:48 UTC
First, I'm not sure why you are saying I didn't quantify the rate.  Do you simply mean you want more precision?  Because I did say both that it had grown from something on the order of 30MB to over 500 before I restarted because of slowness and that it took about an hour to get from about 25MB to 36MB after I removed the clock.  It looks like the rate is somewhat variable though, so getting much more precision without already knowing the cause(s) might be problematic...

I wasn't using the "show seconds" option on the digital clock.  I will see what happens when I remove "show desktop"...

Comment 8 Mark Nagy 2009-04-13 15:37:42 UTC
Well, the memory usage is still growing noticeably so far, although it will take a day or two to see if it gets ridiculously high like before I suppose.  Each time I removed an applet the system subjectively seemed a bit faster, and it looks like the rate of memory usage increase is lower too now although I haven't seen enough to quantify or be certain of the difference yet.  Of course I wouldn't know but I wonder if the fact that this is associated with various different widgets and features could be because it is a general plasma problem after all, but of some kind that these other things can all aggravate.

Comment 9 Mark Nagy 2009-04-14 02:13:08 UTC
Plasma memory usage on my system is now up from 26m to 78m so far in the 10 1/2 hours since the preceding comment.  This is with no clock or show-desktop widgets.  It continues to look more to me (in my admittedly non-expert opinion) like upstream Bug 184394 ("Plasma use more memory over time",  https://bugs.kde.org/show_bug.cgi?id=184394) was on the right track - there might be some widgets and widget functions that make this problem worse, but it still seems like a general plasma problem, not a duplicate of something narrower.

Comment 10 Mark Nagy 2009-04-14 22:27:28 UTC
Memory usage for the same plasma process is now up to 152MB (as of about 6:30, roughly 31 hours after the last restart).  It seems pretty clear that removing the widgets didn't stop the memory leak, although it seems to have slowed it down.

Comment 11 Mark Nagy 2009-04-20 04:27:58 UTC
(In reply to comment #6)
> One thing worth trying is to see if kde-4.2.2 currently in updates-testing
> helps for you.
> 
> Another common element between you and the reporter of upsream bug #183191 is
> the "show desktop" widget.
> 
> And, for the digikal clock widget, do you ever use the "show seconds" option?
> (but likely not it, since you recently removed it...)
> 
> You mention plasma keeps using more memory, but you haven't quantified this. 
> Please provide numbers of initial values and approximate rate of growth (for
> reproducibility and comparison).  

I replied partly to this in a previous comment (before I noticed the "reply" links) but as to the subject of kde-4.2.2 from updates-testing:

I didn't want to install a possibly-unreliable test KDE on the system I was actively using so I installed Fedora 10 from scratch on my nephew's old computer.   That has an NVidia card but I didn't install the proprietary drivers, or any other third-party software, just Fedora packages.  I left it running for 24 hours with kde-4.2.1 first for comparison, and plasma's memory usage went from about 29MB to about 54MB in that period of time for no apparent reason.  It was still rising a few hours later when I last checked.  Then I tried the same thing with kde-4.2.2 and plasma's memory usage went from about 28MB to about 67MB in the same time period, give or take a few minutes or so.  Of course these particular figures aren't huge by modern standards, but in any case I have yet to see any situation where the memory usage with either version doesn't continually rise over time, eventually reaching the point where plasma is the top memory user on the system, with no apparent upper limit to how much memory it will eventually try to grab.  I can keep using the system by periodically restarting plasma, but having seen the figure exceed 500MB and keep going on a few occasions, and seeing that others have apparently been trying to point out something similar for some time, I don't think it should be too much of a stretch to consider this a real plasma bug (probably corresponding most closely to upstream bug https://bugs.kde.org/show_bug.cgi?id=184394).

Comment 12 Steven M. Parrish 2009-05-26 14:11:41 UTC
Here is the response given by the Plasma devs in the above mentioned bug.

Comment #4 From  Aaron J. Seigo   2009-04-26 04:41:45   (-) [reply] -------

"won't go chasin' waterfalls.." sing it with me: "vague reports with no way to
reproduce aren't closable ..."

that said, we nailed a number of slow leaks, e.g. on each started job.


So it appears upstream is aware of the situation.  There is nothing the KDE-SIG can do other than wait for upstream to find and stomp these issues so for now will close this as UPSTREAM.


Note You need to log in before you can comment on or make changes to this bug.