Bug 426539

Summary: Resource monitoring widgets causes Plasma Shell to use more and more memory/Plasma Shell does not free up memory
Product: plasmashell Reporter: homonomonom1984
Component: System MonitorAssignee: Marco Martin <notmart>
Severity: normal CC: nate, plasma-bugs
Priority: NOR    
Version: 5.19.5   
Target Milestone: 1.0   
Platform: Archlinux Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Journalctl output
mem check
Mem info
Caller/calle tab
Example of widget text disappearing

Description homonomonom1984 2020-09-14 21:01:11 UTC
Created attachment 131652 [details]
Journalctl output

When adding a resource monitoring widget, the text in the widget will distort. After rebooting the system, Plasma Shell will continually use more and more memory. After 3 days of use without rebooting, Plasmashell itself was using more than a GiB of memory. I don't know if it's related at all, but the continual memory usage of Plasma Shell increases when the text distorts.

1. Create/add resource managing widget, either pie or bar graph
2?. Change widget option colors 
3?. Resize widget
4?. Change widget from pie to line or visa versa.
5?. Add sensor details
6. Reboot system

Widget sensor detail text will either disappear or will partially disappear (I.E "Write speed" will become "Wr..." I have reason to believe this issue and the widgets itself is what is causing this, as removing all resource monitoring widgets will "solve" the issue, as Plasma Shell will not use up any memory anymore. 

Plasma Shell's memory usage will increase by 1-5 mebibytes per minute. Within 3 days without rebooting, Plasma Shell by itself uses more than a GiB of memory. Valgrind reports nothing out of the ordinary besides high memory usage and allocation. 

Expected valgrind to output many errors and possibly reports of a memory leak, but nothing seems wrong.

Linux/KDE Plasma: 5.8.8-arch1-1
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1

Display size: 1920 x 1080
GPU: RX 5700 XT
RAM: 16GB/15.5GiB

I have attached Valgrind logs, but they show nothing wrong. I have also attached journalctl logs.
Comment 1 homonomonom1984 2020-09-14 21:01:38 UTC
Created attachment 131653 [details]
Comment 2 homonomonom1984 2020-09-14 21:01:52 UTC
Created attachment 131654 [details]
Comment 3 homonomonom1984 2020-09-14 21:02:08 UTC
Created attachment 131655 [details]
mem check
Comment 4 homonomonom1984 2020-09-14 21:03:55 UTC
Created attachment 131656 [details]
Mem info

This is just from 4 hours of usage.
Comment 5 David Edmundson 2020-09-14 21:07:29 UTC
As you noted, valgrind isn't showing any memory being lost.

Does heaptrack show anything?
Comment 6 homonomonom1984 2020-09-14 21:11:08 UTC
Created attachment 131657 [details]
Comment 7 homonomonom1984 2020-09-14 21:11:32 UTC
(In reply to David Edmundson from comment #5)
> As you noted, valgrind isn't showing any memory being lost.
> Does heaptrack show anything?

I attached a screenshot. Heaptrack shows a ton of temporary allocaitons.
Comment 8 homonomonom1984 2020-09-14 21:14:46 UTC
Created attachment 131658 [details]
Caller/calle tab
Comment 9 homonomonom1984 2020-09-14 21:35:03 UTC
Created attachment 131659 [details]
Example of widget text disappearing

One last attachment, I promise. Just as another example, I added a custom system monitoring widget, and then rebooted my system, and the text is gone. The rate at which Plasma Shell uses memory seems to have increased as well.
Comment 10 homonomonom1984 2020-09-16 16:52:43 UTC
Not a bug. It turns out that Firefox was the cause of this, and affected Plasma Shell for some reason.
Comment 11 homonomonom1984 2020-09-16 17:20:11 UTC
I take that back. While removing Firefox helped, removing the resource monitoring widgets actually solved the memory issue. I thoroughly believe that the resource monitoring widgets are the cause of the increasing memory usage.
Comment 12 Nate Graham 2020-09-18 21:32:32 UTC

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