Bug 391063 - Memory Leak in Plasmashell
Summary: Memory Leak in Plasmashell
Status: RESOLVED DUPLICATE of bug 368838
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.12.2
Platform: Manjaro Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-25 20:16 UTC by kde_bug_report
Modified: 2022-09-04 10:23 UTC (History)
5 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 kde_bug_report 2018-02-25 20:16:19 UTC
Hello,
I have Plasma 5.12.2 with Qt 5.10.1. The suspected memory leak started with earlier versions of KDE Plasma, but I didn't have the time to track it down until now.

The suspected memory leak is with Plasmashell, which starts around ~80MB but grows to 300MB by 24 hours and to 2GB by two or three days. It continues but by then I kill and restart it. Plasmashell does not use memory increasingly, rather I think it just never releases memory. 

To reproduce the issue, it happens any of the following:
--I open the global application menu launcher (any of the 3 plasmoid versions of them) and then scroll through the application lists.
--I scroll through my three virtual desktops using keyboard ctl+alt+arrow keys.

It will increase memory usage per instance first by 60KB, then slowly to +100KB, to eventually almost 1MB each time. Which if interacting with the application menu, is each second of scrolling around.


I also removed all panels, all panel widgets, including the application menu, and scrolling between virtual desktops will still incrementally increase memory usage that is never released. 

Apologizes for not being more detailed than this. I am not too good with Linux as a beginner, but will try to give more details if you can instruct me.

Thank you.
Comment 1 boonhead.nl 2018-02-27 04:51:08 UTC
Hello my follow bug reporter :)

We might be experiencing the same issue. I have had an issue with plasmashell after upgrading from KDE Neon 5.8 LTS to 5.12 LTS, but I didn't report it yet as I did not have the skill set to investigate deeper and make a bug report with more detail.

Lucky for us, it might be that some smart people are already on it => https://bugs.kde.org/show_bug.cgi?id=368838
As I was searching similar bug reports I came across yours and thought your problem might be the same.

Could you check if your problem goes away if you run the following line in the terminal?

pkill plasmashell; QSG_RENDER_LOOP=threaded kstart plasmashell

It will kill the current plasmashell process, and then restart it using the QSG_RENDER_LOOP set to "threaded".

Upon conclusion, you might want to mark this bug a duplicate of 368838.

Thanx in advance, as your findings will be very helpful.
Comment 2 kde_bug_report 2018-02-28 00:16:14 UTC
(In reply to boonhead.nl from comment #1)

Okay, I ran the code in the terminal to run a new instance of plasmashell  set to threaded, however now the memory leak "hold" is far worse. My interactions with the global menu or switching virtual desktops are increasing my RAM usage by 1-2MB far faster now.

I go from ~80MB to ~150MB in just ten minutes.

I don't know if GPU information will help, but I have an AMD RX560 4GB card running the open source AMDGPU driver and Kernel 4.15.5.

What should I do next?
Comment 3 boonhead.nl 2018-03-04 12:00:32 UTC
Check the link of the other bug report in my previous comment. From what I've come to understand is that there are two --kind of similar-- bugs that can make plasmashell potentially hog memory (this is why there was also some confusion on the other bug report).

The problem I was experiencing seems to be a different bug than described in bug report #368838. But reading your description, I sounds like you do have the same bug as in the other bug report.

I suggest checking it out. Because for me it was a miss. For you it seems to match. But be warned, there is some confusion in the thread at first (partly caused by me :P).
Comment 4 Gauthier 2018-03-04 18:39:25 UTC
I have a similar issue here. Switched from Plasma 5.8 > 5.12 and experiencing increasing memory use from plasmashell without being able to revert it back unless restarting plasmashell. This is using Neon LTS with Qt 5.9.3. With Neon and Qt 5.10.0 user I do not experience the same bug.

I tried running plasma with QSG_RENDER_LOOP=threaded as indicated in the link but that did not improve the issue.
Comment 5 Gauthier 2018-03-04 18:46:23 UTC
Also I should add, my desktop background just uses simple image and no slideshow (slideshow is not used anywhere else on the desktop either).
Comment 6 D1mon 2018-03-07 12:21:29 UTC
I noticed that the memory is increasing when switching between the screens (KWin -> "Switch to Desktop 1"), the memory is increasing ~ 0.5mb. Accordingly, if you switch 200 times, the size will increase by 100mb.

Plasma: plasma-workspace 5.11.5-2
Comment 7 Alex Dănilă 2018-03-26 19:11:25 UTC
Hi,
I recently started to notice this on Debian (plasma-workspace 5.12.3) with all of Intel/Nouveau/Virtualbox. If there's any  information I could share apart from the Valgrind memcheck I'll atach?
Comment 8 David Edmundson 2018-03-26 20:42:39 UTC

*** This bug has been marked as a duplicate of bug 368838 ***