SUMMARY After update to plasma 6.5 freeze/misbehave of Xwayland client causes freeze of the kwin. It happens in wayland session. Update to 6.5.1 does not help. Roll back to 6.4.5 solves the issue. STEPS TO REPRODUCE 1. run X2GO client with QT_QPA_PLATFORM=xcb x2goclient. 2. Connect to remote server, wait till x2go remote window opens. 3. Close x2go remote window. 4. Repeat 4 .. 5 times. kwin 6.5 and 6.5.1 would freeze at least once. Closing x2go remote window sometimes results in bad state of x2goclient. It consumes 100% of one core. In previous plasma kwin versions that was not causing any problems. The client can be closed normally. In 6.5 and 6.5.1 the kwin freeze, it is event not possible to switch to console. OBSERVED RESULT In 6.5 and 6.5.1 the kwin freeze, it is event not possible to switch to console. EXPECTED RESULT Misbehaved Xwayland client can be closed just normally. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kde neon user edition KDE Plasma Version: 6.5 and 6.5.1 KDE Frameworks Version: 6.19.0 Qt Version: 6.9.2 ADDITIONAL INFORMATION The problem is similar to described in https://bugs.kde.org/show_bug.cgi?id=442846
As the message at the top of the summary says, if something crashed, we need a backtrace of it so we can figure out what's going on. Can you please attach a backtrace of the crash using the coredumpctl command-line program, as detailed in https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl ? If you don't have coredumps for kwin, this isn't a crash and there are some other things we can try.
(In reply to TraceyC from comment #1) > As the message at the top of the summary says, if something crashed, we need > a backtrace of it so we can figure out what's going on. Can you please > attach a backtrace of the crash using the coredumpctl command-line program, > as detailed in > https://community.kde.org/Guidelines_and_HOWTOs/Debugging/ > How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl ? > > If you don't have coredumps for kwin, this isn't a crash and there are some > other things we can try. There is no coredump, since it is not a crash, it is a freeze. If I connect via SSH to my laptop from other system I see 100% CPU usage by Xwayland process, and that is. There is nothing unusual in logs. The overall issue feel very similar to the old bug described in https://bugs.kde.org/show_bug.cgi?id=442846 It seems that kwin is waiting for something or blocked by something, but it is not crashed.
Thanks for the clarification. I'm switching the category from crash to normal, since there's no crash. Can you check kwin's logs when the hard freeze occurs? journalctl --boot --user-unit plasma-kwin_wayland > ~/log.txt Also, could you retrieve kwin's backtrace when the freeze occurs? You'll need to ssh in and attach a debugger to kwin process, e.g. sudo gdb -p $(pidof kwin_wayland) then type bt then press 'c' if it asks you if you want to continue paging Then copy-and-paste the output here. Thanks!
(In reply to TraceyC from comment #3) > Thanks for the clarification. I'm switching the category from crash to > normal, since there's no crash. > > Can you check kwin's logs when the hard freeze occurs? > > journalctl --boot --user-unit plasma-kwin_wayland > ~/log.txt > > Also, could you retrieve kwin's backtrace when the freeze occurs? You'll > need to ssh in and attach a debugger to kwin process, e.g. > > sudo gdb -p $(pidof kwin_wayland) > > then type > > bt > > then press 'c' if it asks you if you want to continue paging > Then copy-and-paste the output here. Thanks! That issue persists with plasma 6.5.2. The backtrace (i.e. sudo gdb -p $(pidof kwin_wayland)) is below: (gdb) bt #0 0x00007d225f71b4fd in __GI___poll (fds=0x7ffda0972468, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007d22632008ca in ??? () at /lib/x86_64-linux-gnu/libxcb.so.1 #2 0x00007d2263200ef0 in ??? () at /lib/x86_64-linux-gnu/libxcb.so.1 #3 0x00007d2263201e6e in xcb_wait_for_reply () at /lib/x86_64-linux-gnu/libxcb.so.1 #4 0x00007d22617d46f6 in ??? () at /lib/x86_64-linux-gnu/libKF6WindowSystem.so.6 #5 0x00007d22617cba20 in NETWinInfo::update(QFlags<NET::Property>, QFlags<NET::Property2>) () at /lib/x86_64-linux-gnu/libKF6WindowSystem.so.6 #6 0x00007d22617cdeaa in NETWinInfo::event(xcb_generic_event_t*, QFlags<NET::Property>*, QFlags<NET::Property2>*) () at /lib/x86_64-linux-gnu/libKF6WindowSystem.so.6 #7 0x00007d2262ca64c2 in KWin::X11Window::windowEvent(xcb_generic_event_t*) () at /lib/x86_64-linux-gnu/libkwin.so.6 #8 0x00007d2262ca6a58 in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) () at /lib/x86_64-linux-gnu/libkwin.so.6 #9 0x00007d22600e0800 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long long*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #10 0x000064d7d4786084 in ??? () #11 0x00007d2260146bd9 in ??? () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #12 0x00007d226014c893 in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #13 0x00007d226014d6c0 in QSocketNotifier::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #14 0x00007d22612c7e1d in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6 #15 0x00007d22600e5530 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #16 0x00007d226027317c in QEventDispatcherUNIXPrivate::activateSocketNotifiers() () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #17 0x00007d2260273caa in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #18 0x00007d2260d750f2 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6 #19 0x00007d22600ed8ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #20 0x00007d22600e7d9f in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #21 0x000064d7d4762188 in ??? () #22 0x00007d225f62a1ca in __libc_start_call_main (main=main@entry=0x64d7d4760180, argc=argc@entry=14, argv=argv@entry=0x7ffda0973cd8) at ../sysdeps/nptl/libc_start_call_main.h:58 #23 0x00007d225f62a28b in __libc_start_main_impl (main=0x64d7d4760180, argc=14, argv=0x7ffda0973cd8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffda0973cc8) at ../csu/libc-start.c:360 #24 0x000064d7d4768375 in ??? () The log collected via journalctl seems does not have anything useful. (see attachment) Killing Xwayland via ssh restores kwin response back.
Created attachment 186894 [details] kwin journal log
Thanks for getting that information. The kwin developers will take a closer look.
(In reply to TraceyC from comment #6) > Thanks for getting that information. The kwin developers will take a closer > look. Thanks! The issues happens in plasma/kwin 6.5.3. The back trace of kwin_wayland is below: #0 0x00007ceb0b51b4fd in __GI___poll (fds=0x7ffe1e0124a8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007ceb0f0308ca in ??? () at /lib/x86_64-linux-gnu/libxcb.so.1 #2 0x00007ceb0f030ef0 in ??? () at /lib/x86_64-linux-gnu/libxcb.so.1 #3 0x00007ceb0f031e6e in xcb_wait_for_reply () at /lib/x86_64-linux-gnu/libxcb.so.1 #4 0x00007ceb0d5d3e96 in ??? () at /lib/x86_64-linux-gnu/libKF6WindowSystem.so.6 #5 0x00007ceb0d5cb1d0 in NETWinInfo::update(QFlags<NET::Property>, QFlags<NET::Property2>) () at /lib/x86_64-linux-gnu/libKF6WindowSystem.so.6 #6 0x00007ceb0d5cd65a in NETWinInfo::event(xcb_generic_event_t*, QFlags<NET::Property>*, QFlags<NET::Property2>*) () at /lib/x86_64-linux-gnu/libKF6WindowSystem.so.6 #7 0x00007ceb0eab1342 in KWin::X11Window::windowEvent(xcb_generic_event_t*) () at /lib/x86_64-linux-gnu/libkwin.so.6 #8 0x00007ceb0eab18d8 in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) () at /lib/x86_64-linux-gnu/libkwin.so.6 #9 0x00007ceb0c0c9220 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long long*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #10 0x00006134ec9332a4 in ??? () #11 0x00007ceb0c099999 in ??? () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #12 0x00007ceb0c144ad3 in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #13 0x00007ceb0c144c70 in QSocketNotifier::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #14 0x00007ceb0d43df0d in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6 #15 0x00007ceb0c0d36e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #16 0x00007ceb0bfa38ac in QEventDispatcherUNIXPrivate::activateSocketNotifiers() () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #17 0x00007ceb0bfab209 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #18 0x00007ceb0cb6c292 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6 #19 0x00007ceb0c0d4f53 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #20 0x00007ceb0c0d80ef in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt6Core.so.6 #21 0x00006134ec90f8c6 in ??? () #22 0x00007ceb0b42a1ca in __libc_start_call_main (main=main@entry=0x6134ec90d8c0, argc=argc@entry=14, argv=argv@entry=0x7ffe1e013d38) at ../sysdeps/nptl/libc_start_call_main.h:58 #23 0x00007ceb0b42a28b in __libc_start_main_impl (main=0x6134ec90d8c0, argc=14, argv=0x7ffe1e013d38, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe1e013d28) at ../csu/libc-start.c:360 #24 0x00006134ec9159e5 in ??? () Killing of Xwayland process helps to restore system response back.
I too had this happen today, Xwayland got stuck processing a circular linked list. After printing some pointer values I forced a crash using GDB and this is the resulting backtrace: > (gdb) bt > [snip] > #9 <signal handler called> > #10 damageRegionProcessPending (pDrawable=pDrawable@entry=0x560f689d9030) at ../xwayland-24.1.9/miext/damage/damage.c:292 > #11 0x0000560f546184e3 in damageCopyArea (pSrc=0x560f67413510, pDst=0x560f689d9030, pGC=0x560f663a6300, srcx=<optimized out>, srcy=<optimized out>, width=<optimized out>, height=618, dstx=0, dsty=0) at ../xwayland-24.1.9/miext/damage/damage.c:778 > #12 0x0000560f545f77ee in compRestoreWindow (pWin=<optimized out>, pPixmap=0x560f67413510) at ../xwayland-24.1.9/composite/compalloc.c:251 > #13 0x0000560f545fcde3 in compCheckRedirect (pWin=pWin@entry=0x560f689d9030) at ../xwayland-24.1.9/composite/compwindow.c:181 > #14 0x0000560f545fdd3f in compUnrealizeWindow (pWin=0x560f689d9030) at ../xwayland-24.1.9/composite/compwindow.c:292 > #15 0x0000560f545f681a in UnrealizeTree (pWin=pWin@entry=0x560f689d9030, fromConfigure=fromConfigure@entry=0) at ../xwayland-24.1.9/dix/window.c:2805 > #16 0x0000560f545fa0cb in UnmapWindow.isra.0 (pWin=0x560f689d9030, fromConfigure=fromConfigure@entry=0) at ../xwayland-24.1.9/dix/window.c:2863 > #17 0x0000560f545b9771 in ProcUnmapWindow (client=<optimized out>) at ../xwayland-24.1.9/dix/dispatch.c:947 > #18 0x0000560f545c2794 in Dispatch () at ../xwayland-24.1.9/dix/dispatch.c:550 > #19 0x0000560f5453963d in dix_main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ../xwayland-24.1.9/dix/main.c:277 > #20 main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ../xwayland-24.1.9/dix/stubmain.c:34 Doing some postmortem debugging I cannot find the circular list anymore, but there's a suspiciously garbage pNext pointer, possibly indicating a use-after-free or race condition. It may also be caused by the way I crashed the process, I'll try to get more data the next time it happens.