Bug 496405 - Memory leak in Plasma shell and other KDE applications
Summary: Memory leak in Plasma shell and other KDE applications
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (other bugs)
Version First Reported In: 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-06-30 03:47 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.
Comment 5 Nate Graham 2025-05-16 15:24:20 UTC
Thanks again for the bug report, and sorry we weren't able to look into this yet. A lot of things have changed since this was reported; can I ask you to see if the problem still happens at all in Plasma 6.3.5 or later? Or if you can, the Plasma 6.4 beta would be even better. Thanks a lot!
Comment 6 Bug Janitor Service 2025-05-31 03:47:41 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 7 bin.wang 2025-05-31 03:49:40 UTC
This issue seems to be resolved. I don't see memory leak behavior anymore.
Comment 8 Bug Janitor Service 2025-06-15 03:47:30 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2025-06-30 03:47:25 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.