https://bugs.kde.org/show_bug.cgi?id=513768
Bug ID: 513768
Summary: kwin_wayland 100% CPU spinloop in
std::_Rb_tree_increment upon screen unlock (triggered
by wl_client_destroy)
Classification: Plasma
Product: kwin
Version First 6.5.4
Reported In:
Platform: Manjaro
OS: Linux
Status: REPORTED
Severity: crash
Priority: NOR
Component: wayland-generic
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 187930
--> https://bugs.kde.org/attachment.cgi?id=187930&action=edit
plasma-kwin_wayland's journal logs last 300 lines
SUMMARY
Overview: After unlocking the screen (Wayland session), the system UI
completely froze. kwin_wayland process consumed 100% CPU. I was able to SSH
into the machine. strace showed no output (indicating a user-space spinloop),
but attaching GDB revealed an infinite loop within
std::local_Rb_tree_increment, likely due to container corruption during the
cleanup of a Wayland client resource.
STEPS TO REPRODUCE
1. Log in to a Plasma Wayland session.
2. Lock the screen.
3. Wait for a few hours(in my case normally from 18:00 on last day to 10:00 on
next day, is 16 hours)
4. Unlock the screen.
OBSERVED RESULT
1. The screen freezes immediately after unlocking, mouse won't move and .
2. kwin_wayland process spikes to 100% CPU usage (observed through ssh
session).
3. dmesg shows no kernel panics or OOM errors (observed through ssh session).
4. strace -p <kwin_pid> shows no syscall output (silent spinloop) (observed
through ssh session).
EXPECTED RESULT
normally unlock the screen
SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.21.0
Qt Version: 6.10.1
Kernel Version: 6.12.62-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600G with Radeon Graphics
Memory: 32 GiB of RAM (30.6 GiB usable)
Graphics Processor: AMD Radeon Graphics
ADDITIONAL INFORMATION
some debug logs
1. GDB Backtrace: Attaching GDB to the frozen process shows thread 1 stuck in
an infinite loop inside std::_Rb_tree_increment, called during
wl_client_destroy. This suggests that ScreenLocker::KSldApp::doUnlock()
triggered a resource cleanup that may hit a corrupted std::map or std::set.
thread 1 (Thread 0x7fdc87cd6b80 (LWP 1473) "kwin_wayland"):
#0 0x00007fdc8e8cbca7 in std::local_Rb_tree_increment (__x=0x5559728491b0) at
/usr/src/debug/gcc/gcc/libstdc++-v3/src/c++98/tree.cc:65
#1 std::_Rb_tree_increment (__x=0x555972aa8380) at
/usr/src/debug/gcc/gcc/libstdc++-v3/src/c++98/tree.cc:85
#2 0x00007fdc91c3b54a in ?? () from /usr/lib/libkwin.so.6
#3 0x00007fdc8f2dcba0 in ?? () from /usr/lib/libwayland-server.so.0
#4 0x00007fdc8f2dcdd2 in wl_client_destroy () from
/usr/lib/libwayland-server.so.0
#5 0x00007fdc919e8377 in ?? () from /usr/lib/libkwin.so.6
#6 0x00007fdc8edd734f in ?? () from /usr/lib/libQt6Core.so.6
#7 0x00007fdc8e2fdad9 in ScreenLocker::KSldApp::doUnlock() () from
/usr/lib/libKScreenLocker.so.6
#8 0x00007fdc8e2fe370 in ?? () from /usr/lib/libKScreenLocker.so.6
#9 0x00007fdc8edd734f in ?? () from /usr/lib/libQt6Core.so.6
#10 0x00007fdc8ef9599f in ?? () from /usr/lib/libQt6Core.so.6
#11 0x00007fdc8ef98d24 in ?? () from /usr/lib/libQt6Core.so.6
#12 0x00007fdc8edd771a in ?? () from /usr/lib/libQt6Core.so.6
#13 0x00007fdc8ede23c0 in QSocketNotifier::event(QEvent*) () from
/usr/lib/libQt6Core.so.6
#14 0x00007fdc8ff021c0 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib/libQt6Widgets.so.6
#15 0x00007fdc8ed6a958 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() from /usr/lib/libQt6Core.so.6
#16 0x00007fdc8ef2dcb9 in
QEventDispatcherUNIXPrivate::activateSocketNotifiers() () from
/usr/lib/libQt6Core.so.6
#17 0x00007fdc8ef2e77c in
QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/libQt6Core.so.6
#18 0x00007fdc8fb34b73 in
QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() from /usr/lib/libQt6Gui.so.6
#19 0x00007fdc8ed75786 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib/libQt6Core.so.6
#20 0x00007fdc8ed6f3f1 in QCoreApplication::exec() () from
/usr/lib/libQt6Core.so.6
#21 0x000055595c53aaa4 in ?? ()
#22 0x00007fdc8e427635 in ?? () from /usr/lib/libc.so.6
#23 0x00007fdc8e4276e9 in __libc_start_main () from /usr/lib/libc.so.6
#24 0x000055595c540f75 in ?? ()
2. Journal Logs: Just before and during the freeze, journalctl shows errors
regarding unknown popups and DRM permission failures. It seems like the atomic
modeset failure might be related to the corrupted state leading to the crash.
blow log got from command `journalctl --user -u plasma-kwin_wayland`
... too many kscreenlocker_greet message
Dec 24 09:36:05 venus kscreenlocker_greet[75683]: Cannot attach popup of
unknown type
Dec 24 09:36:05 venus kscreenlocker_greet[75683]: Cannot attach popup of
unknown type
Dec 24 09:36:05 venus kscreenlocker_greet[75683]: Cannot attach popup of
unknown type
Dec 24 09:36:06 venus kwin_wayland[1473]: atomic commit failed: Permission
denied
Dec 24 09:36:06 venus kwin_wayland[1473]: Atomic modeset test failed!
Permission denied
Dec 24 09:36:06 venus kwin_wayland[1473]: Applying output configuration failed!
Dec 24 09:36:10 venus kwin_wayland[1473]: Atomic modeset test failed!
Permission denied
Dec 24 09:36:10 venus kwin_wayland[1473]: Applying output configuration failed!
I entered the password and try unlock the screen at Dec 24 09:36.
log file is too looooooong so I upload last 300 lines as attachment.
--
You are receiving this mail because:
You are watching all bug changes.