Bug 466261 - plasmashell suddenly consumes over 1 GiB of memory, no longer allows launching programs
Summary: plasmashell suddenly consumes over 1 GiB of memory, no longer allows launchin...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (other bugs)
Version First Reported In: 5.27.1
Platform: Arch Linux Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-22 20:10 UTC by Nicolas F.
Modified: 2024-08-27 20:32 UTC (History)
4 users (show)

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


Attachments
heaptrack of plasmashell exhibiting the issue (702.22 KB, application/zstd)
2023-02-22 20:10 UTC, Nicolas F.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas F. 2023-02-22 20:10:21 UTC
Created attachment 156615 [details]
heaptrack of plasmashell exhibiting the issue

SUMMARY
Something, not sure what, causes plasmashell to consume 1.3 GB of memory. Additionally, new programs can no longer be launched from the application launcher, showing the error
"Resource error (fork failure): Cannot allocate memory"

With the dmesg output:
[ 1827.216162] __vm_enough_memory: pid: 3772, comm: plasmashell, no enough memory for the allocation

This was not an issue in plasma 5.26, and started happening with 5.27.0

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux 6.1.12
(available in About System)
KDE Plasma Version: 5.27.1
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Heaptrack shows huge RSS size, but no specific allocation that caused the heap to grow so large.
Comment 1 Nate Graham 2023-02-24 19:17:30 UTC
Do you have external monitors?

Do you have an NVIDIA GPU?

Do you use the nvidia-settings app to turn on or off monitors?
Comment 2 Nicolas F. 2023-02-25 16:22:39 UTC
No external monitors, AMD integrated GPU (Vega 8).
Comment 3 Nate Graham 2023-02-27 16:19:51 UTC
Thanks for the info.
Comment 4 Nicolas F. 2023-03-04 10:10:54 UTC
Here's another heaptrack that was captured from the moment plasmashell started, where it exhibits the same issue pretty much immediately. I don't know how to interpret the output, it doesn't *seem* to be tracking the actual problematic allocations, hinting at something more sinister: https://overviewer.org/~pillow/up/6c583e01f5/heaptrack.plasmashell.65921.zst

As an aside node, my current plasmashell process is consuming 2 GiB of memory right now and also doesn't allow me to launch applications through the menu. It seems to get worse over time
Comment 5 Nicolas F. 2023-03-06 18:49:12 UTC
I did some more testing. plasmashell enters its broken memory-hogging non-application-launching state the moment I search for "k" in the application launcher. This happens with *all* search plugins disabled, i.e. no results being returned.
Comment 6 Nate Graham 2023-03-06 18:55:22 UTC
Does KRunner also begin to consume excessive memory when you use KRunner to search for "k"?
Comment 7 Nicolas F. 2023-03-06 18:58:49 UTC
(In reply to Nate Graham from comment #6)
> Does KRunner also begin to consume excessive memory when you use KRunner to
> search for "k"?

No, KRunner continues to work as normal and does not consume excessive amounts of memory.
Comment 8 Nate Graham 2023-03-06 19:22:09 UTC

*** This bug has been marked as a duplicate of bug 465705 ***
Comment 9 Nicolas F. 2023-03-06 19:26:24 UTC
Don't think that's the same bug, removing the ScreenMapping section from my appletsrc and restarting plasmashell does not resolve the issue.
Comment 10 Nate Graham 2023-03-06 20:20:32 UTC
Ok, thanks.
Comment 11 Nicolas F. 2023-07-04 08:37:00 UTC
This is still an issue in 5.27.6. Is there any additional info I can provide to help narrow this down? Another machine using the same plasma version doesn't have this issue, so I assume it's either some configuration or hardware causing this.
Comment 12 Nate Graham 2024-08-20 16:41:24 UTC
Many things have changed under the hood in the past year. Can I ask you to report whether this is still reproducible in any capacity in Plasma 6.1.4 or later?
Comment 13 Nicolas F. 2024-08-27 20:32:06 UTC
Hasn't happened since the switch to Plasma 6 for me.