Bug 496405 - Memory leak in Plasma shell and other KDE applications
Summary: Memory leak in Plasma shell and other KDE applications
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: 6.2.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-18 02:22 UTC by bin.wang
Modified: 2025-02-20 16:31 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bin.wang 2024-11-18 02:22:07 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY

Plasma shell and other KDE applications using too much memory:

```
wangbin   672864  0.8  7.2 6562240 3595144 ?     Ssl  Nov16  17:03 /usr/bin/plasmashell --no-respawn
wangbin   760286  0.2  5.7 5532672 2816472 ?     Ssl  Nov16   5:07 /usr/bin/krunner --daemon
wangbin   672846  0.2  5.0 3789384 2502220 ?     Ssl  Nov16   5:33 /usr/bin/kded6
wangbin   672916  0.2  4.8 3135384 2375968 ?     Ssl  Nov16   4:29 /usr/lib/org_kde_powerdevil
```

As shown above, plasmashell uses more than 3G memory while krunner and org_kde_powerdevil both uses more than 2G. Dolphin also used more than 2G before I close it.

STEPS TO REPRODUCE
1. Use KDE for more than 1 day.

OBSERVED RESULT

Memory usage for Plasma shell and other KDE applications increased a lot. Especially weird for applications like "/usr/lib/org_kde_powerdevil". 

EXPECTED RESULT

It shouldn't use so much memory.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.9.7-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-6600K CPU @ 3.50GHz
Memory: 47.0 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2

ADDITIONAL INFORMATION

Please let me know how to collect more data to debug it.
Comment 1 Nate Graham 2024-11-19 20:18:07 UTC
I notice your system has 47 Gb of memory. I suspect the system is simply noticing this and using more memory to speed things up. Is there an actual problem here? Is it causing any issues for you?
Comment 2 bin.wang 2024-11-19 20:25:31 UTC
Yes. Those kde applications + plasma shell combined sometimes uses more than 10G together. It eventually uses up to almost all available free memory and makes the system very slow, sometimes even freeze for a few seconds.
Comment 3 Nate Graham 2024-11-20 20:38:14 UTC
Ok, thanks. Sounds bad.
Comment 4 bin.wang 2024-11-26 00:09:33 UTC
Unlike in 485663, I don't even have `balooctl` installed and don't need to move large amount of files to trigger the memory leak.