Bug 450119 - Plasma slow/freezes on resume - possible memory leak?
Summary: Plasma slow/freezes on resume - possible memory leak?
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: 5.24.0
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-13 02:56 UTC by Joe
Modified: 2022-04-19 04:35 UTC (History)
6 users (show)

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


Attachments
oom log output (83.29 KB, text/x-log)
2022-02-13 02:56 UTC, Joe
Details
plasmashell lots of memory on resume (233.57 KB, image/png)
2022-02-14 04:10 UTC, Joe
Details
even more memory and growing quickly after a minute. (268.74 KB, image/png)
2022-02-14 04:10 UTC, Joe
Details
valgrind_log (910.96 KB, application/x-7z-compressed)
2022-02-22 18:04 UTC, pqwoerituytrueiwoq
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe 2022-02-13 02:56:26 UTC
Operating System: Arch Linux
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.8-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2
NVIDIA Driver: 510.47.03

On wake-up/resume, I had a notification that graphics had crashed/restarted (OK, that happens reasonable often). However, I tried to dismiss the notification and noticed it was... frozen. As was the rest of Plasma Shell/toolbar. I could still interact with Firefox, and things like opening the task menu, adjust volume (using keyboard keys) did still work - it was just super delayed/lag - i.e. took 10-30+ seconds to register a click on the taskbar and do the action. 

I was able to get system monitor open where PlasmaShell was essentially at 100% on one core.

Looking at the journalctl logs (see attached), looked like there was crazy memory leaks (didn't see anything about the graphics crash/reset in there, though). After the OOM killed plasmashell, I was able to run 'kstart5 plasmashell' and all was right in the world (when plasma shell was killed, all of my windows stayed open and luckily I still had a konsole open that I could type into).
Comment 1 Joe 2022-02-13 02:56:59 UTC
Created attachment 146654 [details]
oom log output
Comment 2 Joe 2022-02-14 04:10:01 UTC
Created attachment 146695 [details]
plasmashell lots of memory on resume
Comment 3 Joe 2022-02-14 04:10:28 UTC
Created attachment 146696 [details]
even more memory and growing quickly after a minute.
Comment 4 Joe 2022-02-14 04:12:48 UTC
OK, just happened again on resume. Lots of lag. Was able to get ksysguard open via konsole (which was responsive) and take two screen shots showing plasmashell just... growing in memory usage pretty quickly. It was also pegging 1 cpu 100% (4% cpu usage, with 12 cores/24 threads.

I would definitely say a pretty crazy memory leak.
Comment 5 Joe 2022-02-14 04:13:24 UTC
Also, killing plasmashell and manually restarting it on the command line fixed everything again.
Comment 6 Marco Martin 2022-02-14 08:16:00 UTC
indeed seems like plasmashell was oom killed
Comment 7 Joe 2022-02-20 05:17:48 UTC
Upgraded to 5.24.1 and Framworks 5.91. and have had this happen multiple times when resuming from sleep. Really, Plasmashell just takes off to the races consuming all of the memory it can until eventually the OOM killer takes care of it.
Comment 8 pqwoerituytrueiwoq 2022-02-22 18:04:32 UTC
Created attachment 147054 [details]
valgrind_log

I have noticed that plasmashell eats more and more ram over time usage remains constant till sleep mode is used and on wake it gobbles more and more, i typically use sleep twice a day and after week plasmshell can be using 4GB+ ram
you can take a screenshot of its ram before entering sleep and look at it after sleep (the time spent in sleep mode may be relevant)

i have no slow downs nor have i noticed any other side effects (until i end up using swap space), perhaps OP is having NVIDIA driver issues

i used valgrind to log data for between 2 or 3 hours with a couple sleep session and journalctl did not give any useful data, giving 0 lines of data after starting
followed instructions here: https://community.kde.org/Plasma/Debugging

i could use valgrind a few days if that will help, just be aware that will be a lot of gigs to decompress (this is already 2.5GB with under 3 hours)

Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.1
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.16.8-051608-generic (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series
 * Dual Monitors @1080p (144Hz) each over display port
Comment 9 David Edmundson 2022-03-13 21:51:48 UTC
That log is confusing, most is from /usr/bin/php8.1

I couldn't see much from plasma
Comment 10 Joe 2022-03-13 21:58:18 UTC
(In reply to David Edmundson from comment #9)
> That log is confusing, most is from /usr/bin/php8.1
> 
> I couldn't see much from plasma

What would you need? I can try to grab it next time it happens.
Comment 11 YAFU 2022-03-20 01:01:44 UTC
Hello.

Distro: KDE Neon user edition (Updated - X11)
Nvidia GTX 960 - 510.54

I have the same kind of problem as the user who opened the report and it also started happening from about the same date.
Actually, KDE/Plasma has always given me some kind of problems when resuming from suspend mode, whether related to Kwin and effects and compositing problems, or Plasma slowness issues and plasmashell incremental memory usage every time I resume from suspend mode (needed to kill and restart plasmashell). But these kinds of problems were not as frequent as the one that started happening about a month ago. Now the problem occurs about 1 out of 3 times wehen resume from suspend mode. Killing plasmashell and restarting the process fixes the problem (but it's very annoying to have to do this so frequently)
Comment 12 Bug Janitor Service 2022-04-04 04:34:43 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Bug Janitor Service 2022-04-19 04:35:07 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!