Created attachment 149323 [details] heaptrack screenshot SUMMARY *** I noticed plasmashell was, apparently, using more than 20 gigabytes of memory. I did a heaptrack capture for five minutes. In that time plasmashell allocated another 1.3 gigabytes. I've attached a heaptrack screenshot and will attempt to attach the log aswell. *** STEPS TO REPRODUCE 1. I've yet to consistently reproduce it. It happens from time to time. OBSERVED RESULT Plasmashell using all available memory and the system starts to swap. EXPECTED RESULT Plasmashell using less than 150 megabytes of memory. SOFTWARE/OS VERSIONS Linux: 5.15.38 KDE Plasma Version: 5.24.5 KDE Frameworks Version: 5.94.0 Qt Version: 5.15.3 ADDITIONAL INFORMATION I'm running plasma wayland with an AMD RX570 and not sure whether culprit is plasmashell, qt, mesa or amdgpu because the following shows up, alot, in wayland-session log: "... mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times! mesa: for the --simplifycfg-sink-common option: may only occur zero or one times! mesa: for the --global-isel-abort option: may only occur zero or one times! mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times! kwin_libinput: Libinput: client bug: timer event15 debounce short: scheduled expiry is in the past (-12ms), your system is too slow mesa: for the --simplifycfg-sink-common option: may only occur zero or one times! mesa: for the --global-isel-abort option: may only occur zero or one times! mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times! kf.plasma.quick: Couldn't create KWindowShadow for Osd_QMLTYPE_942(0x3a9d110) kf.plasma.quick: Couldn't create KWindowShadow for Osd_QMLTYPE_942(0x3a9d110) ..."
Created attachment 149324 [details] heaptrack log memleak
Thank you for the trace, that is helpful. It does not have all the relevant debug symbols though. Those for kguiaddons in this case in particular would enrich the trace substantially.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/59
(In reply to Méven Car from comment #2) > Thank you for the trace, that is helpful. > > It does not have all the relevant debug symbols though. That's not true, it is just I don't have the exact same debug symbols as you do, since I compile everything myself.
Git commit 04ddcecb5c91a79bce7443e2c43ed93450f435b1 by Méven Car. Committed on 01/06/2022 at 17:08. Pushed by meven into branch 'master'. WaylandClipboard: DataControlSource: delete m_mimeData in dtor As QClipboard::setMimeData in comments notes it passes ownership of the pointer. M +1 -0 src/systemclipboard/waylandclipboard.cpp https://invent.kde.org/frameworks/kguiaddons/commit/04ddcecb5c91a79bce7443e2c43ed93450f435b1
With the patch https://invent.kde.org/frameworks/kguiaddons/-/commit/04ddcecb5c91a79bce7443e2c43ed93450f435b1 applied there still seems to be a leak in plasma_engine_clipboard. I will attempt to attach a new heaptrack.
Created attachment 149937 [details] heaptrak of leak before dtor patch
(In reply to Allan Pedersen from comment #7) > Created attachment 149937 [details] > heaptrak of leak before dtor patch I made an error and didn't apply the patch correctly.
*** Bug 455625 has been marked as a duplicate of this bug. ***