Bug 426539 - Resource monitoring widgets causes Plasma Shell to use more and more memory/Plasma Shell does not free up memory
Summary: Resource monitoring widgets causes Plasma Shell to use more and more memory/P...
Status: RESOLVED DUPLICATE of bug 424636
Alias: None
Product: plasmashell
Classification: Unclassified
Component: System Monitor (show other bugs)
Version: 5.19.5
Platform: Archlinux Packages Linux
: NOR normal
Target Milestone: 1.0
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-14 21:01 UTC by homonomonom1984
Modified: 2020-09-18 21:32 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Journalctl output (56.01 KB, text/plain)
2020-09-14 21:01 UTC, homonomonom1984
Details
leak-check=full (4.41 KB, text/plain)
2020-09-14 21:01 UTC, homonomonom1984
Details
leak-check=yes (4.41 KB, text/plain)
2020-09-14 21:01 UTC, homonomonom1984
Details
mem check (1.15 KB, text/plain)
2020-09-14 21:02 UTC, homonomonom1984
Details
Mem info (178.65 KB, image/png)
2020-09-14 21:03 UTC, homonomonom1984
Details
Heaptrack (40.92 KB, image/png)
2020-09-14 21:11 UTC, homonomonom1984
Details
Caller/calle tab (27.67 KB, image/png)
2020-09-14 21:14 UTC, homonomonom1984
Details
Example of widget text disappearing (22.68 KB, image/png)
2020-09-14 21:35 UTC, homonomonom1984
Details

Note You need to log in before you can comment on or make changes to this bug.
Description homonomonom1984 2020-09-14 21:01:11 UTC
Created attachment 131652 [details]
Journalctl output

SUMMARY
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.

STEPS TO REPRODUCE
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

OBSERVED RESULT
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 RESULT
Expected valgrind to output many errors and possibly reports of a memory leak, but nothing seems wrong.

SOFTWARE/OS VERSIONS
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

ADDITIONAL INFORMATION
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]
leak-check=full
Comment 2 homonomonom1984 2020-09-14 21:01:52 UTC
Created attachment 131654 [details]
leak-check=yes
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]
Heaptrack
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 ***