| Summary: | With large clipboard history, plasmashell memory usage grows rapidly and consumes all available RAM | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | Pawel <bednarczyk.pawel> |
| Component: | Clipboard widget & pop-up | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | grave | CC: | ahiemstra, bednarczyk.pawel, kde, nate |
| Priority: | VHI | Keywords: | wayland-only |
| Version First Reported In: | 5.27.2 | ||
| Target Milestone: | 1.0 | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=466320 | ||
| Latest Commit: | https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/68 | Version Fixed/Implemented In: | Latest release of the KDE Qt 5 patch collection, or Qt 6 |
| Sentry Crash Report: | |||
| Attachments: |
screenshot plasma memory usage
history clipboard clipboard defaults |
||
|
Description
Pawel
2023-02-28 09:02:52 UTC
see 466320 - this is the only thing that gets spammed in the log Do you have multiple screens? If so does this stop when you use `xrandr` to manually enforce a particular configuration? And do you have anything automatically changing screen settings outside of KScreen? Hi Nate, I only have 1 screen and I am not aware of anything changing my screen settings. Ok then it's probably not something screen-related. probably not. I have also tried since: 3) disabling libcamera in wireplumber 4) replacing wireplumber with pipewire-media-session 5) completely disconnecting the external camera steps 3-5 based on https://gitlab.freedesktop.org/pipewire … issues/385 note, this does not seem to reproduce on X11, only on wayland! That trace seems to suggest there's a large memory leak in the clipboard data engine. According to heaptrack, there's about 230 MiB of QArrayData leaked and 190 MiB of QMimeData instances. Those are created in response to wayland events, probably explaining why it happens on Wayland only. How much clipboard history have you set? Created attachment 156954 [details] history clipboard (In reply to Arjen Hiemstra from comment #8) > That trace seems to suggest there's a large memory leak in the clipboard > data engine. According to heaptrack, there's about 230 MiB of QArrayData > leaked and 190 MiB of QMimeData instances. Those are created in response to > wayland events, probably explaining why it happens on Wayland only. > > How much clipboard history have you set? Hi Adrian, 50 items - see attached. sorry, Arjen, not Adrian! Created attachment 156955 [details]
clipboard defaults
Resetting clipboard settings to defaults resolves the issue and makes the memory leak go away.
So one (or more) of the non-default options is causing the issue.
I think this a leak in QWaylandClipboard, surfaced since KSystemClipboard syncs to QClipboard, there was a qt6 commit to fix it. I opened a MR to backport it https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/68 I have been running the Wayland session with https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/68 applied and I can no longer reproduce this bug using the original clipboard settings. Plasma memory usage is sitting at ~325 MiB. Yay! And it looks like that backport was merged; closing! |