Bug 405590

Summary: Memory leak in CPU monitor widget
Product: [Plasma] plasmashell Reporter: Mario Ray Mahardhika <leledumbo_cool>
Component: System Monitor widgetsAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.15.3   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Mario Ray Mahardhika 2019-03-18 10:08:15 UTC
SUMMARY

Putting CPU monitor widget on desktop makes Xorg slowly but sure eating RAM until all RAM is eaten then the whole system freezes.

STEPS TO REPRODUCE
1. On a clean desktop, add CPU monitor widget
2. Open something like htop

OBSERVED RESULT
Xorg slowly eats RAM up to a point where the whole system will freeze.

EXPECTED RESULT
Xorg only has slight, one time RAM increase to accomodate the widget.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon 5.0.0-rc7/5.15.3
KDE Plasma Version: 5.15.3
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.1

ADDITIONAL INFORMATION
If you then remove the widget, RAM usage will stop raising at the current percentage. Re-adding the widget will make it start raising again.

A video demonstrating the leak is being uploaded, coming soon.
Comment 1 Mario Ray Mahardhika 2019-03-19 01:04:15 UTC
Video uploaded: https://youtu.be/of_3N-rMoXc

Sorry for the fan noise and keyboard typing sound.
Comment 2 Mario Ray Mahardhika 2019-03-19 14:52:28 UTC
I found a new fact that is actually applies to any widget that updates itself every certain period (practically every monitor widget). Only those which are static unaffected (e.g. calendar).
Comment 3 Marco Martin 2020-05-21 10:55:45 UTC
all system monitor widgets have been recently rewritten from scratch