Summary: | Kwin memory leak | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Komorebi <markovs.i.mail> |
Component: | aurorae | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 80p3fy75dc, audvare, kde, ralf, the_archer_xz, varlesh |
Priority: | NOR | ||
Version: | 5.23.4 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Kwin memory usage
heaptrack screenshot kwin_x11 >1.8GB heaptrack |
Description
Komorebi
2021-10-18 19:16:10 UTC
Created attachment 142587 [details]
Kwin memory usage
Interesting... It will be very helpful if you could run kwin with heaptrack, but I'm not sure that it's feasible to run kwin + heaptrack for more even than a day. Can you verify whether alt-tab'ing constantly increases memory usage? I can't confirm alt+tabing increases memory usage. Will try heaptrack. ~1 day heaptrack https://drive.google.com/file/d/1fmY3vrwmtUeaAu34zql9NJmPJEWje5cX/view?usp=sharing I'm still running kwin with heaptrack and will upload one more snapshot later. Created attachment 142910 [details]
heaptrack screenshot
Are you getting endless messages in DBus? Maybe related: Oct 27 14:25:06 limelight dbus-daemon[2019]: [system] Rejected: destination has a full message queue, 0 matched rules; type="error", sender="(unset)" ((bus)) interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="1" destination=":1.39" (uid=1000 pid=2627 comm="/usr/bin/kwin_x11 ") Oct 27 14:25:06 limelight dbus-daemon[2019]: [system] Rejected: destination has a full message queue, 0 matched rules; type="error", sender="(unset)" ((bus)) interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="1" destination=":1.39" (uid=1000 pid=2627 comm="/usr/bin/kwin_x11 ") Oct 27 14:25:06 limelight dbus-daemon[2019]: [system] Rejected: destination has a full message queue, 0 matched rules; type="error", sender="(unset)" ((bus)) interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="1" destination=":1.39" (uid=1000 pid=2627 comm="/usr/bin/kwin_x11 ") Oct 27 14:25:06 limelight dbus-daemon[2019]: [system] Rejected: destination has a full message queue, 0 matched rules; type="error", sender="(unset)" ((bus)) interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="1" destination=":1.39" (uid=1000 pid=2627 comm="/usr/bin/kwin_x11 ") Oct 27 14:25:06 limelight dbus-daemon[2019]: [system] Rejected: destination has a full message queue, 0 matched rules; type="error", sender="(unset)" ((bus)) interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="1" destination=":1.39" (uid=1000 pid=2627 comm="/usr/bin/kwin_x11 ") Oct 27 14:25:06 limelight dbus-daemon[2019]: [system] Rejected: destination has a full message queue, 0 matched rules; type="error", sender="(unset)" ((bus)) interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="1" destination=":1.39" (uid=1000 pid=2627 comm="/usr/bin/kwin_x11 ") Oct 27 14:25:06 limelight dbus-daemon[2019]: [system] Rejected: destination has a full message queue, 0 matched rules; type="error", sender="(unset)" ((bus)) interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="1" destination=":1.39" (uid=1000 pid=2627 comm="/usr/bin/kwin_x11 ") Oct 27 14:25:06 limelight dbus-daemon[2019]: [system] Rejected: destination has a full message queue, 0 matched rules; type="error", sender="(unset)" ((bus)) interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="1" destination=":1.39" (uid=1000 pid=2627 comm="/usr/bin/kwin_x11 ") Oct 27 14:25:06 limelight dbus-daemon[2019]: [system] Rejected: destination has a full message queue, 0 matched rules; type="error", sender="(unset)" ((bus)) interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="1" destination=":1.39" (uid=1000 pid=2627 comm="/usr/bin/kwin_x11 ") Oct 27 14:25:06 limelight dbus-daemon[2019]: [system] Rejected: destination has a full message queue, 0 matched rules; type="error", sender="(unset)" ((bus)) interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="1" destination=":1.39" (uid=1000 pid=2627 comm="/usr/bin/kwin_x11 ") @Komorebi is memory leaked when using breeze window deco? I can confirm that, for me, spamming Alt-Tab visible increases the RAM utilization. The thing I noticed is that you can make kwin_x11 reach 500+ MB heap in under a minute by repeatedly opening and closing windows. After each open+close, it's like 2 to 5 MB higher, according to ksysguard. Video: https://www.youtube.com/watch?v=2CBsheEeg_4 I can confirm that, for me, spamming Alt-Tab visible increases the RAM utilization. The thing I noticed is that you can make kwin_x11 reach 500+ MB heap in under a minute by repeatedly opening and closing windows. After each open+close, it's like 2 to 5 MB higher, according to ksysguard. Video: https://www.youtube.com/watch?v=2CBsheEeg_4 (I'm not on Neon, though, but on Archlinux) Created attachment 143005 [details]
kwin_x11 >1.8GB
Same issue on Gentoo, the RAM usage keeps growing with time. The screenshot was taken after about 2 days of uptime.
I'm afraid it might have to do with the official nvidia driver. I posted about the subject on Reddit. 3 people using Mesa/AMDGPU don't have the issue, and I'm not able to replicate it either, as soon as I remove the nvidia driver package. Video without the proprietary nvidia driver: https://youtu.be/djzVQMEfQt8 Starts at ~70 MB, goes to ~100 after opening a few windows, instantly goes back to that after opening and closing 30+ windows. alt-tab spam also raises the value by no more than 0.3 MB (which is also de-allocated only seconds later) Is anyone here getting dbus-daemon spam in the log? Oct 29 17:57:50 limelight dbus-daemon[2006]: [system] Rejected: destination has a full message queue, 0 matched rules; type="error", sender="(unset)" ((bus)) interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.ServiceUnknown" requested_reply="1" destination=":1.38" (uid=1000 pid=2526 comm="/usr/bin/kwin_x11 ") It's not exactly causing a leak as I saw in that video (and I also use the Nvidia driver). But obviously it's very annoying as I have to filter dbus-daemon out when I try to check my log. Restarting fixes the issue temporarily. >@Komorebi is memory leaked when using breeze window deco? Yes >I'm afraid it might have to do with the official nvidia driver. >I posted about the subject on Reddit. 3 people using Mesa/AMDGPU don't have the issue, and I'm not able to replicate it either, as soon as I remove the nvidia driver package. I have Radeon RX550/550 Series, so there might be 2 different issues. >alt-tab spam also raises the value by no more than 0.3 MB (which is also de-allocated only seconds later) I'm not able to reproduce the issue by making some actions like alt+tabing, opening and closing windows, etc. Consumed memory grows over time by itself. The only way to reproduce the issue for me is just to wait for 2-3 days of uptime. I believe it's very important thing to take into account. @Komorebi that sounds like 2 different issues indeed. meeeh I confirm this too. On my system i'm have over 500MB kwin_x11 memory usage. But with restart it's use 151MB and growing again. On heaptrack it's call to <unresolved function> in libGLX_nvidia.so.0 Earlier i'm disable dbus spam with this instruction: https://forums.developer.nvidia.com/t/bug-nvidia-v495-29-05-driver-spamming-dbus-enabled-applications-with-invalid-messages/192892/9?u=rangelalvarado1 But anyway i see memory leak on KWin. Also i noticed unstable work and constant crashes... Created attachment 143955 [details]
heaptrack
should be fixed with https://invent.kde.org/plasma/kwin/-/merge_requests/1791 https://invent.kde.org/plasma/kwin/-/commit/8accc777a5b3ab1e53341f1838ed636652dc1221 will be shipped with 5.23.5. It would be great if somebody could confirm that it fixes the issue. Otherwise we could wait until 5.23.5 is released and revisit this bug. No longer happens to me. The system is up for 6 days and kwin consumes ~280MB of ram which is probably slightly more that before 5.23, but still less than in 5.23.0 When my custom themes are applied, kwin jumps up a few megabytes at a time whenever a window is opened and closed again. So kwin keeps consuming more ram until I have to kill it and start again. Is there a fix for this or something I can fix with my themes? These are my themes: https://www.pling.com/p/1406638 https://www.pling.com/p/1574340 (In reply to dreaperxz@gmail.com from comment #22) > When my custom themes are applied, kwin jumps up a few megabytes at a time > whenever a window is opened and closed again. So kwin keeps consuming more > ram until I have to kill it and start again. Is there a fix for this or > something I can fix with my themes? Can you confirm whether it's fixed in 5.23.5? In 5.23.5, I don't see it spiking up every 3-4 MB whenever I open a window
anymore. So it seems like it's fixed.
On Tuesday, January 11, 2022 1:52:29 A.M. MST you wrote:
> https://bugs.kde.org/show_bug.cgi?id=443990
>
> --- Comment #23 from Vlad Zahorodnii <vlad.zahorodnii@kde.org> ---
> (In reply to dreaperxz@gmail.com from comment #22)
>
> > When my custom themes are applied, kwin jumps up a few megabytes at a time
> > whenever a window is opened and closed again. So kwin keeps consuming more
> > ram until I have to kill it and start again. Is there a fix for this or
> > something I can fix with my themes?
>
> Can you confirm whether it's fixed in 5.23.5?
Thanks, closing the bug report. |