High Memory Usage from Plasmashell. Is it a memory leak?

Then gdb --pid "$(pidof plasmashell)" and the same process as described as High Memory Usage from Plasmashell. Is it a memory leak? - #19 by meven, this will freeze plasma until you exit gdb.

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope can be used to allow gdb to work properly.

It downloaded massive amounts of stuff, then I ran the command as yesterday and it froze the desktop. I’ll monitor the mem usage via ssh and kill the process and upload the file once the mem usage is high.

edit:
it said

NOTE: heaptrack detected DEBUGINFOD_URLS but will disable it to prevent
unintended network delays during recording
If you really want to use DEBUGINFOD, export HEAPTRACK_ENABLE_DEBUGINFOD=1
injection finished

so I ran it like this:

╭─sammael@viglen in ~ took 31s
[🧱] × HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack -p "$(pidof plasmashell)"

heaptrack output will be written to "/home/sammael/heaptrack.plasmashell.865542.zst"
injecting heaptrack into application via GDB, this might take some time...
injection finished

but the desktop now works so I hope all is good

1 Like

Told you in in my previous post.

ht tps://o.o5.ddns.net/plasma

HEAPTRACK_ENABLE_DEBUGINFOD was a better option.

Can you share some screenshot, of the previous file re-opende with this option enabled. This should improve the situation.

Yeah I realized later it was the gdb freezing the desktop, not the heaptrack.

I ran HEAPTRACK_ENABLE_DEBUGINFOD=1 heaptrack_gui and opened the file from yesterday, but it’s still called undefined function.

I got heaptrack running at the moment since previous post, will the output from that be more useful maybe?

Maybe, i am not sure worth checking.

It has been running ~hour, plasmashell is at 792M atm. Do you want the file now or should I let it run longer?

Should be already useful.

Try to take the same screenshot as you did High Memory Usage from Plasmashell. Is it a memory leak? - #18 by hugalafutro

ok, here’s the pic:

and here’s the file: htt ps://o.o5.ddns.net/plasma2

Thank you so much for the help and the effort.

Thank to it, I have identified a memory leak, and I have sent a patch.

2 Likes

Glad to be of any help! Out of curiosity (and if it’s easyt-ish to explain) what was causing it? It seems noone else using the distro has the issue so I was just wondering.

Thanks for your assistance!

What’s the output of

grep plugin= ~/.config/plasma-org.kde.plasma.desktop-appletsrc

It is very technical. Some memory wasn’t cleaned after use, the definition of a memleak.
This concerned new library code that arrived in Plasma 6.3.

It seems to be in use only in task manager code.
Basically if you have the habit of hovering over tasks in the task manager to pick at windows, each time it would leak memory.
It seems.

1 Like
plugin=org.kde.plasma.folder
wallpaperplugin=a2n.blur
plugin=org.kde.plasma.folder
wallpaperplugin=org.kde.image
plugin=org.kde.panel
wallpaperplugin=org.kde.image
plugin=luisbocanegra.panel.colorizer
plugin=org.kde.plasma.icontasks
plugin=org.kde.panel
wallpaperplugin=org.kde.image
plugin=org.kde.plasma.kickoff
plugin=org.kde.windowtitle
plugin=org.kde.plasma.appmenu
plugin=org.kde.plasma.panelspacer
plugin=luisbocanegra.panel.colorizer
plugin=org.kde.plasma.systemtray
plugin=org.kde.windowbuttons
plugin=org.kde.netspeedWidget
plugin=org.kde.plasma.catwalk
plugin=org.kde.plasma.digitalclock
plugin=org.kde.plasma.private.systemtray
wallpaperplugin=org.kde.image
plugin=org.kde.kdeconnect
plugin=org.kde.kscreen
plugin=org.kde.plasma.cameraindicator
plugin=org.kde.plasma.clipboard
plugin=org.kde.plasma.devicenotifier
plugin=org.kde.plasma.keyboardindicator
plugin=org.kde.plasma.keyboardlayout
plugin=org.kde.plasma.manage-inputmethod
plugin=org.kde.plasma.notifications
plugin=org.kde.plasma.volume
plugin=org.kde.plasma.battery
plugin=org.kde.plasma.brightness
plugin=org.kde.plasma.bluetooth
plugin=org.kde.plasma.networkmanagement
plugin=org.kde.plasma.mediacontroller

Indeed my assumption the leak was in plasma was wrong because @hugalafutro wasn’t correct in

Both use arch and kde 6.3.2 with just the default systray applets and icon only taskbar, no plasmoids, no widgets.

plugin=luisbocanegra.panel.colorizer

This one uses DBus Connection and is likely the leakage.

@hugalafutro try deactivating it, if this fixes your issue, you can report it to the plasmoid author at his github GitHub - luisbocanegra/plasma-panel-colorizer: Latte-Dock and WM status bar customization features for the default KDE Plasma panel

Sorry about my wrong assumption, I’m not that technical :smiley:

I will report at the Panel Colorizer!

We are already discussing with the plasmoid author on matrix btw.
We saw the issue in its code and potential improvement to make in our documentation so avoid it in the future (or code).

2 Likes