Summary: | Memory leak in plasmashell on opening activity manager sidebar repeatedly | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Kishore Gopalakrishnan <kishore96> |
Component: | Activity Switcher | Assignee: | Ivan Čukić <ivan.cukic> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | 2012gdwu+k2, alex765, blaueshawaiihemd, kde, me, nate, plasma-bugs, qydwhotmail |
Priority: | NOR | Keywords: | efficiency |
Version: | 5.19.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=442844 | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Output of valgrind on repeadtedly triggering the activity manager sidebar |
Description
Kishore Gopalakrishnan
2020-06-10 15:21:09 UTC
I'm able to reproduce this on Fedora 32 with Plasma 5.18.5, Frameworks 5.70.0 and Qt 5.14.2 I should add that I'm also on an X11 session on amdgpu, but I could still reproduce this with the compositor toggled off (alt+shift+f12). I can reproduce this in a Wayland session as well. In X11, setting `export QSG_RENDER_LOOP="basic"` in `~/.xprofile` (suggested on some other reports of memory leaks) does not help. Created attachment 136910 [details]
Output of valgrind on repeadtedly triggering the activity manager sidebar
Hi, I am attaching the valgrind output from a run of plasmashell. On opening it in Massif-Visualizer, I can see a linear growth of heap memory under `QObjectPrivate::connectImpl(QObject const*, int, QObject const*, void**, QtPrivate::QSlotObjectBase*, Qt::ConnectionType, int const*, QMetaObject const*) (qobject.cpp:5050)`. Hopefully this is useful to find out the root cause of this bug.
Here are the steps I used to generate this file:
```
kquitapp5 plasmashell #Kill already running plasmashell
valgrind --tool=massif plasmashell
#Do stuff to trigger the memory leak (run the script in my report for a while or just click around on various widgets)
kquitapp5 plasmashell #Kill plasmashell after some time.
```
In case you want me to compile any other packages with debug symbols or pass any other options to valgrind, please let me know.
Here is the heaptrack output (64MB file; I didn't pass any special options to heaptrack), after repeatedly opening the activity manager for about 20 min. It shows a huge leak in "QImageData::create". Not sure how helpful this is. https://drive.google.com/file/d/14qCFKkS8L8Own7NVCbOiXSN3Ji_VLitx/view?usp=sharing In Plasma 5.21.4, Qt 5.15.2, Frameworks 5.80, on a Wayland session in Fedora 34, I can successfully reproduce this leak with that bash script. Maybe this is a Qt bug, not sure, but since it does occur, I'll mark it as confirmed. I cannot reproduce this on two different computers: Desktop PC Operating System: Arch Linux KDE Plasma Version: 5.23.1 KDE Frameworks Version: 5.87.0 Qt Version: 5.15.2 Kernel Version: 5.14.14-arch1-1 (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-4790K CPU @ 4.00GHz Memory: 15.5 GiB of RAM Graphics Processor: NVIDIA GeForce GTX 1070/PCIe/SSE2 Laptop Operating System: Arch Linux KDE Plasma Version: 5.23.1 KDE Frameworks Version: 5.87.0 Qt Version: 5.15.2 Kernel Version: 5.14.14-arch1-1 (64-bit) Graphics Platform: X11 Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz Memory: 15.4 GiB of RAM Graphics Processor: Mesa Intel® Xe Graphics I cannot reproduce it in an X11 session on amdgpu either. Could be a driver bug. Can the bug still be reproduced today? I can still reproduce this bug on Plasma 5.23.3, Fedora 35. Maybe this is Wayland-exclusive. I will give this the wayland keyword. I can reproduce this on X11 (this is in a VM; will test on my main machine tomorrow): Operating System: Arch Linux KDE Plasma Version: 5.23.4 KDE Frameworks Version: 5.88.0 Qt Version: 5.15.2 Kernel Version: 5.10.83-1-lts (64-bit) Graphics Platform: X11 Processors: 4 × AMD EPYC-Rome Processor Memory: 1.4 GiB of RAM Graphics Processor: virgl I can still reproduce this on a machine that uses amdgpu. Plasmashell's memory consumption went from 150 MB to 650 MB in 40 minutes when I left the loop from the initial comment running. Operating System: Arch Linux KDE Plasma Version: 5.23.4 KDE Frameworks Version: 5.88.0 Qt Version: 5.15.2 Kernel Version: 5.15.6-arch2-1 (64-bit) Graphics Platform: X11 Processors: 8 × AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx Memory: 21.5 GiB of RAM Graphics Processor: AMD Radeon Vega 8 Graphics |