Bug 393929 - Plasmashell gobbles all my memory leak
Summary: Plasmashell gobbles all my memory leak
Status: REOPENED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: 5.12.4
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-05-07 00:42 UTC by whoopsdecade
Modified: 2022-03-31 00:16 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
System monitor (39.26 KB, image/png)
2018-05-07 00:42 UTC, whoopsdecade
Details
massif output (244.63 KB, text/plain)
2018-05-18 14:20 UTC, whoopsdecade
Details
massif output 2 (271.15 KB, text/plain)
2018-05-28 19:06 UTC, whoopsdecade
Details
massif output 3 (196.89 KB, text/plain)
2019-11-25 23:30 UTC, whoopsdecade
Details

Note You need to log in before you can comment on or make changes to this bug.
Description whoopsdecade 2018-05-07 00:42:04 UTC
Created attachment 112455 [details]
System monitor

Plasmashell keeps on consuming more and more of my RAM and it never lets go of any of it (see attachment). Right now I'm on Fedora 27 and this happens on every session, very predictable. I usually do not turn off my laptop, I just suspend it (My uptime right now is 11 days). I had the same issue happen on a different laptop before I upgraded to the one I currently have (I've only been using Fedora and KDE for the last two months, longtime ubuntu user before). I use no widgets other than whatever comes by default with Fedora. People say that Plasmashell should only need around 400MB, mine has gone past the 1gb mark before so something must not be right. 

A screenshot it's probably not enough to report this kind of issue, just let me know what do I need to get and I will get it and attach it to the bug.
Comment 1 Rex Dieter 2018-05-07 21:55:45 UTC
Do you use slideshow wallpaper?
Comment 2 David Edmundson 2018-05-14 14:37:54 UTC
In any case I can't do anything with a screenshot of a sysetm monitor. 

It's probably 368838. Please retest with Qt5.11. If you still have an issue please upload a log from massif.
Comment 3 whoopsdecade 2018-05-14 14:59:54 UTC
(In reply to Rex Dieter from comment #1)
> Do you use slideshow wallpaper?

No, I do not.

(In reply to David Edmundson from comment #2)
> It's probably 368838. Please retest with Qt5.11. If you still have an issue
> please upload a log from massif.

I don't think it's 368838 since I don't use the slideshow addon. Where can I read up on how to get a massif log?

Been out of the country so I haven't been able to follow up on this as I should I apologise.
Comment 4 whoopsdecade 2018-05-18 14:20:04 UTC
Created attachment 112730 [details]
massif output
Comment 5 whoopsdecade 2018-05-18 15:40:36 UTC
(In reply to David Edmundson from comment #2)
> In any case I can't do anything with a screenshot of a sysetm monitor. 
> 
> It's probably 368838. Please retest with Qt5.11. If you still have an issue
> please upload a log from massif.

I added a massif output. I restarted my computer since I first reported the problem. The plasmashell process has been increasing its memory consumption steadily as expected and it's now claiming 647k of memory, if I don't restart the computer it's clear it will go over 1gb of ram soon. Let me know if you would need any more information.
Comment 6 whoopsdecade 2018-05-28 19:06:30 UTC
Created attachment 112931 [details]
massif output 2

Added a new log. This one was generated a coupe of hours after the first one I posted but I forgot to attach it here.
Comment 7 Christoph Feck 2018-05-28 22:51:08 UTC
Is this massif output created with Qt 5.11?
Comment 8 whoopsdecade 2018-05-30 04:47:18 UTC
In reply to Christoph Feck from comment #7)
> Is this massif output created with Qt 5.11?

Infocenter says Qt is 5.9.4. I'm on Fedora 27.
Comment 9 Christoph Feck 2018-05-30 18:49:42 UTC
Thanks for the information. Developer comment #2 suggests fixes have been made in Qt 5.11 which could affect this issue. Please add the debug/log files when you can still reproduce with this recent version.
Comment 10 Andrew Crouthamel 2018-09-28 03:09:53 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Andrew Crouthamel 2018-10-28 03:40:23 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 12 whoopsdecade 2019-11-25 23:29:25 UTC
I updated KDE and I'm still experiencing what seems like a memory leak. Which was expected because I do not use the extension linked to the previous bug someone mentioned.. anyways, I'm attaching a new massif output. Please check it out. Plasmashell is sitting at 1.2GB from an initial <200MB and it just keeps going up and up. It's kept happening all this while btw I just had not posted anything.
Comment 13 whoopsdecade 2019-11-25 23:30:27 UTC
Created attachment 124118 [details]
massif output 3
Comment 14 whoopsdecade 2019-11-25 23:31:11 UTC
Current KDE info:
plasmashell 5.15.5
Qt: 5.12.5
KDE Frameworks: 5.59.0
kf5-config: 1.0
Comment 15 Iyán Méndez Veiga 2020-03-02 17:03:41 UTC
I confirm this bug. After 5 days without reboot, plasmashell is using about >7GB in my case.
Comment 16 Iyán Méndez Veiga 2020-03-02 17:04:53 UTC
KDE Plasma: 5.18.2
KDE Frameworks: 5.67.0
Qt: 5.14.1
Kernel: 5.5.5
Comment 17 whoopsdecade 2020-03-03 00:24:04 UTC
(In reply to Iyán Méndez Veiga from comment #16)
> KDE Plasma: 5.18.2
> KDE Frameworks: 5.67.0
> Qt: 5.14.1
> Kernel: 5.5.5

Can you post the massif output? It would help them debug this. 

PD: I seriously don't know why they seem to be ignoring this... I'm sure this issue is widespread but people stay mum or just don't pay attention until you have a popular publication write an article on it (like the gnome a few years ago).
Comment 18 David Edmundson 2020-03-03 00:27:59 UTC
We are not ignoring this. I read the massif logs, they just don't say a lot.

It is not that widespread. Which probably means any issue isn't actually on our level. Some sort of social media influence won't help this go any faster.
Comment 19 David Edmundson 2020-03-03 00:34:13 UTC
Given massif doesn't show anything, heaptrack might be worth a shot, it works on a different level.

You can also try kcmshell5 qtquicksettings and change the render backend to software. Whether that "leaks" or not will indicate if it's GL related or not.
Comment 20 whoopsdecade 2020-03-03 03:51:05 UTC
I'm on a Dell Inpsiron 15 Intel i7-8550U for what it's worth.
Comment 21 David Edmundson 2020-03-03 09:49:16 UTC
Remarking as needsinfo based on my comments above
Comment 22 Iyán Méndez Veiga 2020-03-03 10:18:16 UTC
I will try to provide a massif file in the following days and also try to change render backend to software. Anything else I could do to help?
Comment 23 Bug Janitor Service 2020-03-18 04:33:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 24 Bug Janitor Service 2020-04-02 04:33:11 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 25 whoopsdecade 2020-05-19 22:09:00 UTC
I set the backend to software and I'm still seeing continuous increase in memory consumption from plasmashell. This is after reinstalling OS.. these are my libraries now:
plasmashell 5.18.3
Qt: 5.13.2
KDE Frameworks: 5.68.0
kf5-config: 1.0

I'll try to compile heaptrack and post that in the following days.
Comment 26 whoopsdecade 2020-08-06 15:57:03 UTC
The plasmashell process is consuming 1.1GB right now with system uptime of 20 days. The plasmashell memory consumption just keeps increasing, steadily, over time denoting a memory leak as reported. I have never seen it consume something as dramatic as 7gb in 5 days but it's clear to me if I don't restart the session for 120 days it could get close to that (if plasmashell doesn't restart itself as it does every now and then :sigh:). 

The heaptrack was uploaded here https://www.dropbox.com/s/6u6q6ato6jr2k7o/heaptrack.plasmashell.495556.gz since even compressed it's around 52MBs. It encompasses a couple of hours. Please note that heaptrack is still running but I don't know if it is supposed to finish by itself or if it's just going to keep running while the process is still going. Please let me know so I can kill it or leave it running for longer if you need me to. If you need anything else please just let me know.
Comment 27 whoopsdecade 2020-08-06 16:00:28 UTC
RE: heaptrack file. The rendering backend is set to software and it's been that way since it was recommended here, just got around to doing the heaptrack. Throughout this time I saw plasmashell leak memory just the same as before, maybe leaking at a lower rate but leaking nonetheless.
Comment 28 whoopsdecade 2020-08-12 12:33:40 UTC
Heaptrack finished, I uploaded the new file to the same dropbox url. The end result was 433.63MB! Is that normal? Heaptrack was taking too long so I did put the laptop to sleep in between, not sure if that had an effect. Plasmashell was consuming 1.3GB by the end of the heaptrack. In any case, it's here: https://www.dropbox.com/s/6u6q6ato6jr2k7o/heaptrack.plasmashell.495556.gz
Comment 29 Quartz 2021-10-21 18:17:13 UTC
Bump x2. 

I'd appreciate if this bug takes priority - it might be causing other accidental threads being created in relation to memory leaks and mistaking side effects in other places (such as I did with plasma widgets).

It makes it impossible to keep a desktop linux distro running KDE for several days and it's making the desktop environment give a really poor impression and experience.
Comment 30 Iyán Méndez Veiga 2021-10-21 18:23:17 UTC
I have a spare laptop where I can test this again for a long time. To be honest, it's been a while since I notice a large memory usage by plasmashell on my desktop, but it is also true that I don't tend to keep very long uptimes these days.

Can someone point me in the right direction to collect useful logs, massif, etc.?
Comment 31 Iyán Méndez Veiga 2021-10-21 18:25:59 UTC
Okay, found this:
https://community.kde.org/Plasma/Debugging#Full_log_of_memory_leaks_with_Valgrind

I guess it's a good start. I will read and prepare the laptop and leave it running for a week or so. Hope it helps.
Comment 32 whoopsdecade 2021-10-21 18:32:34 UTC
Unfortunately the KDE team is not interested in even acknowledging this issue. I think they know of this bug and can reproduce it easily they just don't want to acknowledge it. I managed to get a co-worker to reproduce it on his own machine with no knowledge of his setup, I simply told him to not power-off his machine for several days and the memory leak was very apparent: plasmashell memory consumption ballooned. In short, it's a widespread memory leak but either very few people use KDE or very few use KDE and leave the PC powered on for more than a single day. Such a shame.
Comment 33 whoopsdecade 2021-10-21 18:39:58 UTC
Btw, the workaround I've been using is setting up a script to run every couple of days or so to restart plasmashell automatically: 
kquitapp5 plasmashell || killall plasmashell && kstart5 plasmashell

It's not as traumatic as other options to restart plasmashell that I tried. Your windows get reordered and that's about it. I can't even tell when it ran and it keeps plasmashell memory usage in check.
Comment 34 Iyán Méndez Veiga 2021-10-21 18:43:12 UTC
I don't think it's that generalized and I also don't think they would not acknowledge if they knew this is a real issue for sure, why would they? I think it's hard to replicate, probably it depends on some specific hardware combination and probably most Plasma developers restart plasmashell very often.

If we can still observe this on 5.23 maybe we should also change the version in the bug report.
Comment 35 Iyán Méndez Veiga 2021-10-21 18:47:35 UTC
By the way, David Edmundson suggested using heaptrack, because the massif files didn't help. Do you know how to do this? Probably, keep uploading the big files that do not give any hint to developers is not useful to anyone.
Comment 36 Nate Graham 2021-10-21 19:00:19 UTC
With my "member of the KDE team" hat on:

I acknowledge this bug but cannot reproduce it, and memory leak bugs in general are incredibly hard to debug, even in the best case scenario where the reporter has localized the issue to just a specific widget or triggering behavior. It requires specialized skill that I unfortunately do not have, which is why I don't generally do much with bug reports about memory leaks.
Comment 37 whoopsdecade 2021-10-21 19:50:35 UTC
@Iyán: why don't you drop the snark and run heaptrack yourself? I already did my bit. Or just keep running interference for the KDE team here, that will surely help solve the issue.
Comment 38 Iyán Méndez Veiga 2021-10-21 20:02:07 UTC
(In reply to whoopsdecade from comment #37)
> @Iyán: why don't you drop the snark and run heaptrack yourself? I already
> did my bit. Or just keep running interference for the KDE team here, that
> will surely help solve the issue.

Hey, no need to be rude! I didn't ask you to do anything... I will try to do both the valgrind and heaptrack (once I figure out how).

I just pointed out, after reading all the messages here, that David asked for something no one provided (yet). Since you bump this today (I honestly forgot about it), that's why I mention it...
Comment 39 Kishore Gopalakrishnan 2021-10-22 04:54:53 UTC
Since this report has seen a recent spurt of activity, I'll just note that bug 422755 seems to be a more reproducible manifestation of the same issue.
Comment 40 Nate Graham 2021-10-22 17:34:26 UTC
Can anyone experiencing this verify that opening the activity sidebar triggers it reliably?
Comment 41 Iyán Méndez Veiga 2021-10-22 19:28:06 UTC
Hi Nate,

Unfortunately no, I don't observe that. I left the bash script running for 1 hour on both devices, and memory was more or less the same after stopping the script.
Comment 42 whoopsdecade 2022-03-31 00:16:22 UTC
I don't seem to be getting this memory leak on Fedora 34, KDE info:
Qt: 5.15.2
KDE Frameworks: 5.85.0
kf5-config: 1.0

BUT I also changed machines to a 11gen Intel i7 w/ Xe graphics from an 8th gen i7 so who knows if that has anything to do with it but with an uptime of 31 days, with close to the same use, plasmashell has never gone over 350m in memory. Sitting at 281M now so it's fluctuating depending on use which it's good. One less thing to worry about :)