| Summary: | Severe memory leak with kwin wayland and javafx app with es2 ( not on kwin x11 ) | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Alexandre Pereira <pereira.alex> |
| Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | major | CC: | joseph, kde |
| Priority: | NOR | Keywords: | efficiency-and-performance |
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
screenshot of connected to the computer in idle through ssh
full session log of WAYLAND_DEBUG=1 output |
||
|
Description
Alexandre Pereira
2021-07-26 23:30:53 UTC
Can you please provide an example program that suffers from this problem? As is, this bug report is somewhat inactioable due to the lack of information. Also, it will be helpful to have WAYLAND_DEBUG log of the app when the screen is off. (In reply to Vlad Zahorodnii from comment #1) > Can you please provide an example program that suffers from this problem? As > is, this bug report is somewhat inactioable due to the lack of information. > Also, it will be helpful to have WAYLAND_DEBUG log of the app when the > screen is off. Sorry, I understand that its not enough info. I tried WAYLAND_DEBUG, but since its a Xwayland app, it doesn't show anything. If you have suggestion for more info, or any question whatsoever, please feel let me know. I will keep searching for apps that trigger this, as it must be javafx with es2 engine and a lot of graphic work, so its not easy. Thank you. I have done more testing and found out that it is also triggered with the screensaver ( not only the power devil dpms turning off monitors ). So, with screensaver ( but not turning monitors off ) will also make this happen. I have been using kde/x11 and gnome/wayland all week to confirm that it doesn't happen there, and it doesn't. Attaching screenshot of running htop and wayland_debug output connected through ssh to the computer running the app and in idle mode. Attaching the tar.gz of the full session WAYLAND_DEBUG=1 output. Created attachment 140575 [details]
screenshot of connected to the computer in idle through ssh
Created attachment 140576 [details]
full session log of WAYLAND_DEBUG=1 output
well ... some good news: on wayland session, I can't seem to replicate the problem with KWIN_COMPOSE=Q environment variable. although ... not really great performance this way. hum... I think I found a solution. Gonna test it through all day tomorrow and see if it ever fails. If it doesn't, then I am sure I found a solution and post it here! Ok, so I tested this bug all day yesterday and I found the following: Using kwin rule, or breeze window decoration rule ( both work ) to hide the window titlebar/borders, and the bug doesn't happen. As long as windows don't have a titlebar, the bug doesn't happen. Next I tried replacing the breeze window decoration with another one, like oxygen, to test, and it triggered immediatly after screensaver. ( so the issue isn't particular to breeze ) This was tested in kde git in gentoo/opensuse and kde latest stable ( 5.22.4 ) in manjaro. I actually found this by accident, because I went back to X11 (where the bug also doesn't happen) and in X11 I like to have no titlebars for windows ( the breeze exception rules for class work on X11, but not on Wayland ). I know this seems very weird, but the bug is reproducible and easy to test. And I tested it alot of times to be sure. Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! is it ok to change this to "reported" ? I did gave more info. sorry if its not meant to be me to change it. Yes, it's fine. If you disable decoration shadows (in breeze deco settings), does memory usage increase? (In reply to Vlad Zahorodnii from comment #11) > Yes, it's fine. If you disable decoration shadows (in breeze deco settings), > does memory usage increase? I haven't tried that, but I will later today and report back! (In reply to Alexandre Pereira from comment #12) > (In reply to Vlad Zahorodnii from comment #11) > > Yes, it's fine. If you disable decoration shadows (in breeze deco settings), > > does memory usage increase? > > I haven't tried that, but I will later today and report back! So I tested this with the screensaver (meta+l keyboard shortcut). It is enough to trigger. With showing titlebar in kwinrules, but no shadows on breeze deco: it trigger the issue. It was confirmed by huge memory usage increase ( the mouse started lagging also ). With no titlebar in kwinrules, issue doesn't happen. this on kwin compiled on 28 set Any client side memory leak is mostly a problem in the client. Can you file a bug report to JavaFX and link here? Attaching the wayland_debug log above. Ideally it might be worth getting a log with "heaptrack" (In reply to David Edmundson from comment #14) > Any client side memory leak is mostly a problem in the client. > Can you file a bug report to JavaFX and link here? Attaching the > wayland_debug log above. > > Ideally it might be worth getting a log with "heaptrack" It only happens with kwin wayland with window titlebars. Window Titlebars hidden, and it doesn't happen. And I have been using the app every day since late September with this workaround without issues (which is fine by me, because I would use it with hidden titlebars even if no bug) Anyway, from what I have read and talked, JavaFX is working on native wayland. I also can't reproduce with open source JavaFX apps (at least the simple ones I have tried), and the app I use is comercial one. That is why I haven't open a bug on JavaFX side or gave an example here with an open source app. A similar issue appeared with the same application, and reported bug here: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1664 The issue was very tested and the fix was merged, being that the application is working properly, either with or without the workarounds in this report. Things are working properly now. |