Bug 294497 - kded4 power managment service leaks a lot memory on every suspend/resume
Summary: kded4 power managment service leaks a lot memory on every suspend/resume
Status: RESOLVED UNMAINTAINED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: 4.11
Assignee: Dario Freddi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-20 13:50 UTC by Maxim Levitsky
Modified: 2018-09-04 15:43 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
valgrind log (85.42 KB, application/x-gzip)
2012-02-20 21:13 UTC, Maxim Levitsky
Details
Lshw of my laptop (20.02 KB, text/plain)
2012-12-21 08:25 UTC, Uroš Gaber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Levitsky 2012-02-20 13:50:18 UTC
Version:           unspecified (using KDE 4.8.0) 
OS:                Linux

Every suspend/resume, kded4 adds ~5MB to its memory.
Disabling power managment service 'fixes' the issue.

Reproducible: Always

Steps to Reproduce:
Suspend/resume, or just reload kernel 'battery' module.

Actual Results:  
KDED4 uses huge amounts of memory, and it grows on each suspend

Expected Results:  
No leaks.

Leaks appear to consist mostly of DBUS buffers each more that 1MB in size.
valgrind logs don't show much.

valgrind log: https://bugs.kde.org/attachment.cgi?id=66522
Comment 1 Dario Freddi 2012-02-20 15:38:22 UTC
Looks like UPower/GIO are the cause here. Care to install glib debug packages to understand better what's going on here?
Comment 2 Maxim Levitsky 2012-02-20 21:05:09 UTC
Maybe. I installed libglib2.0-0-dbg, and this is new valgrind log:
http://pastie.org/3422290

I actually tried to debug this using powerdevil sources, but combination of lack of time (especially to compile it, its not trivial), I couldn't locate the source of this leak.

I am using kubuntu BTW, the 12.04 unreleased version, but this bug was in 11.10 as well, and its one of the reason I updated, as it gets on my nerves.
Comment 3 Maxim Levitsky 2012-02-20 21:13:13 UTC
Created attachment 68970 [details]
valgrind log

Idea of putting valgrind log to pastebin wasn't that successful :-)
Comment 4 Maxim Levitsky 2012-03-28 11:34:45 UTC
Any update? This bug is really unpleasant.
Comment 5 Dario Freddi 2012-04-09 23:44:01 UTC
Sorry for forgetting about this. I will inspect the new valgrind log tomorrow, thanks for bumping the bug.
Comment 6 Uroš Gaber 2012-04-27 21:57:54 UTC
In Kubuntu 12.04 64-bit this problem still exists.
Comment 7 David Greengas 2012-05-11 14:19:06 UTC
I can also confirm this bug. I am on Kubuntu 12.04 and increasingly I am seeing KDED4 consume 1.5G of memory or more on a system with 2G total. Killing the kded4 fixes the problem and makes the system responsive again.
Comment 8 Kevin MacPherson 2012-06-06 17:26:50 UTC
Having this same issue after switching from Gnome to KDE on Ubuntu 12.04.
Comment 9 Dario Freddi 2012-06-07 09:22:33 UTC
Just saying that I didn't forget about this issue that I'm striving to reproduce on other PCs. I can say it's driving me mad, though. I hope I'll have something better to say soon.
Comment 10 Emil Sedgh 2012-07-02 18:36:27 UTC
Im not sure if I have the same issue, but after resuming from suspend, kded4 starts eating my memory until I kill the process and start it again.

(Not 5Mb after each unsuspend, kded4's memory constantly and continuesly grows after the resume here)

Please note that when I unplug the adapter, it stops leaking. The moment I plug it back in, leaking starts again (Almost 1MB per second)

Im available on #kde-devel if you need to contact me.
Comment 11 Uroš Gaber 2012-08-12 19:10:17 UTC
When can we expect that this bug will be fixed. It is becoming annoying.
Comment 12 Michał 2012-10-25 10:45:59 UTC
When it will be fixed???!! I am waiting more than a year for power-management to fix memry leak! 

This is serious issue! Why it is not fixed?
Comment 13 Emil Sedgh 2012-10-25 12:35:36 UTC
Do you guys happen to have a broken battery?
It seems to me that this bug is reproducable only when I use a broken battery.
Comment 14 Uroš Gaber 2012-10-25 12:40:08 UTC
Mine is broken. It is on 44% capacity. On my another laptop with same version of kubuntu (12.04), this bug doesn't affect laptop.
Comment 15 Mike Vaughn 2012-10-25 13:24:15 UTC
I'm having this issue with a non-broken battery (just purchased this year, still holds the same ~4-hour charge it did when I got it). kded4 was using ~16MB of RAM before putting the system to sleep; its usage increased by ~28MB with each subsequent suspend/resume. http://imgur.com/a/wBLCN . *Please* let me know anything I can do to help resolve this -- I'm just a user, so I don't have any experience with debugging, but I might be willing to learn if it means getting this fixed.
Comment 16 Laurent Bonnaud 2012-11-07 15:25:06 UTC
*** This bug has been confirmed by popular vote. ***
Comment 17 Mike Vaughn 2012-12-07 22:59:04 UTC
Just chiming in to say this seems to be fixed in Kubuntu 12.10 (using KDE SC 4.9.3). What's odd is I was using the same version of KDE under Kubuntu 12.04 when the problem was still there, so I'm not sure if the fix is from something the Kubuntu devs did.
Comment 18 Uroš Gaber 2012-12-18 11:54:52 UTC
Any news on fixing this bug in 12.04? Is there anything I can help do find what is causing this bug?
Comment 19 Christoph Feck 2012-12-20 20:00:11 UTC
Uroš, according to comment #17, this should be fixed in newer versions. Please try and add your feedback.
Comment 20 Uroš Gaber 2012-12-21 08:15:06 UTC
(In reply to comment #19)
> Uroš, according to comment #17, this should be fixed in newer versions.
> Please try and add your feedback.

Hi. I installed kde version 4.9.4 on Kubuntu 12.04 with kde backports:
sudo apt-add-repository ppa:kubuntu-ppa/backports -y
sudo apt-get update
sudo apt-get upgrade
Bug is still there. I uploaded video of 10min my laptop being uptime, where you'll see how fast ram usage rises. 
http://www.megafileupload.com/en/file/380061/kded4-eating-memory-webm.html
Comment 21 Uroš Gaber 2012-12-21 08:25:21 UTC
Created attachment 75953 [details]
Lshw of my laptop

I attached my hardware information. May be it's hardware related.
Comment 22 Christoph Feck 2012-12-21 13:11:55 UTC
Uroš, comment #17 suggest the bug is fixed in 12.10.
Comment 23 Oliver Henshaw 2013-03-20 18:27:08 UTC
Does anyone still see this on latest 4.9.x or on 4.10?
Comment 24 Vincent Fortier 2013-05-08 12:25:05 UTC
Having this problem as well using Ubuntu 13.04.  From what I read like all others it's happenning only on my old HP laptop.  Interestingly this problem does not happend on my newer HP 6460 laptop.

I had opened bug #319496 which now I beleive to be identical to this one or to #271934.  kded4 memory slowly jumps up to 1.5g or RAM after a few suspend/resume.

I have also opened up a launchpad bug entry at https://bugs.launchpad.net/ubuntu/+source/kde4libs/+bug/1177137

After a while the system becomes barely usable / unresponsive due to swap being used and eventually in totality.
Comment 25 Vincent Fortier 2013-05-08 14:31:13 UTC
Actually it also does it on my newer laptop, just at a slower rate...:

HP ProBook 6460b (recent)
1st boot
 2419 fortierv  20   0 1306m  42m  25m S   0,0  0,5   0:02.21 kded4
suspend
 2419 fortierv  20   0 1306m  42m  25m S   0,0  0,5   0:02.98 kded4                                                                                     2419 fortierv  20   0 1307m  43m  25m S   0,0  0,6   0:04.87 kded4
reboot
 2428 fortierv  20   0 1306m  42m  25m S   0,0  0,5   0:01.82 kded4
suspend
 2428 fortierv  20   0 1394m  44m  27m S   0,0  0,6   0:05.03 kded4


HP EliteBook 8530p (old)
 2513 megalout  20   0 1562m 407m  26m S   0,0 10,6   0:26.09 kded4
 2513 megalout  20   0 1756m 561m  26m S   0,0 14,6   0:30.85 kded4
 2513 megalout  20   0 1975m 731m  28m S   0,0 19,0   0:44.23 kded4
Disabling power management
logout/login
25085 megalout  20   0 1107m  35m  22m S   0,3  0,9   0:00.61 kded4
cannot suspend anymore due to power mgm being disabled
25085 megalout  20   0 1107m  36m  22m S   0,0  0,9   0:01.15 kded4
Comment 26 Andrew Crouthamel 2018-09-04 15:43:56 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug. Please try again with the latest version and submit a new bug to frameworks-solid if your issue persists. Thank you!