Summary: | KWin-5.17.4 hangs inside loop in QXcbConnection::getTimestamp() | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Jaak Ristioja <jaak> |
Component: | platform-x11-standalone | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | aspotashev, kde, postix, shngmao, vojtech |
Priority: | NOR | Flags: | jaak:
X11+
|
Version: | 5.17.4 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Jaak Ristioja
2019-12-10 09:24:07 UTC
>Investigation of the hanged kwin_x11 process with GDB has shown that QXcbConnection::getTimestamp() never returns.
But it is active inside peekQueue?
(In reply to David Edmundson from comment #1) > But it is active inside peekQueue? When I attached to the process with GDB I got this backtrace, and ran some number of "finish" commands, until it the command no longer returned. The stack frame which did not return was QXcbConnection::getTimestamp() unless I misinterpreted the output. Same problem on Fedora 31: kwin_x11 hangs on start, consuming 100% CPU (1 CPU core). KDE Plasma Version: 5.17.4 KDE Frameworks Version: 5.64.0 (In reply to Alexander Potashev from comment #3) > Same problem on Fedora 31: kwin_x11 hangs on start, consuming 100% CPU (1 > CPU core). > > KDE Plasma Version: 5.17.4 > KDE Frameworks Version: 5.64.0 Cannot reproduce upon reboot. Before reboot I tried to restart kwin_x11 from command line and it hanged again. After a while I got an error like this on the command line: """ Couldn't start kglobalaccel from org.kde.kglobalaccel.service: QDBusError("org.freedesktop.DBus.Error.NoReply", "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.") """ ...however according to GDB kwin_x11 was still stuck on line 335 in kglobalaccel.cpp inside method KGlobalAccelPrivate::updateGlobalShortcut() here: const QList<QKeySequence> scResult(shortcutFromIntList(result)); Hi, it seems I'm having a very similar problem on my system. However, in my case, this only happens upon logout and there's no noticeable CPU comsumption. After I log out of KDE, sometimes (about 10% cases) there will be a hanging kwin_x11 process left behind, which is stuck in QXcbConnection::getTimestamp() and needs to be SIGKILLed (SIGTERM won't help). If not killed, the next login will lead to botched session where kwin and plasma fail to start, but krunner and other session components work. Backtrace of kwin_x11 when stuck after logout: #0 0x00007f456f3fcf04 in QXcbConnection::getTimestamp() () at /usr/lib/libQt5XcbQpa.so.5 #1 0x00007f456f418663 in QXcbNativeInterface::getTimestamp(QXcbScreen const*) () at /usr/lib/libQt5XcbQpa.so.5 #2 0x00007f456f4194e4 in QXcbNativeInterface::nativeResourceForScreen(QByteArray const&, QScreen*) () at /usr/lib/libQt5XcbQpa.so.5 #3 0x00007f457651b9c7 in QX11Info::getTimestamp() () at /usr/lib/libQt5X11Extras.so.5 #4 0x00007f45768e4619 in KWin::Platform::updateXTime() () at /usr/lib/libkwin.so.5 #5 0x00007f457689f2ec in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) () at /usr/lib/libkwin.so.5 #6 0x00007f457550ec67 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () at /usr/lib/libQt5Core.so.5 #7 0x00007f456f3fb703 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () at /usr/lib/libQt5XcbQpa.so.5 #8 0x00007f456f3fcc79 in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5XcbQpa.so.5 #9 0x00007f456f42006e in () at /usr/lib/libQt5XcbQpa.so.5 #10 0x00007f457551013c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5 #11 0x00007f45755185c4 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5 #12 0x000055e39cfc6412 in () #13 0x00007f4574eb5002 in __libc_start_main () at /usr/lib/libc.so.6 #14 0x000055e39cfc694e in _start () (In reply to Vojtěch Král from comment #5) > Hi, > it seems I'm having a very similar problem on my system. > However, in my case, this only happens upon logout and there's no noticeable > CPU comsumption. > After I log out of KDE, sometimes (about 10% cases) there will be a hanging > kwin_x11 process left behind, which is stuck in > QXcbConnection::getTimestamp() and needs to be SIGKILLed (SIGTERM won't > help). If not killed, the next login will lead to botched session where kwin > and plasma fail to start, but krunner and other session components work. > > Backtrace of kwin_x11 when stuck after logout: > > #0 0x00007f456f3fcf04 in QXcbConnection::getTimestamp() () at > /usr/lib/libQt5XcbQpa.so.5 > #1 0x00007f456f418663 in QXcbNativeInterface::getTimestamp(QXcbScreen > const*) () at /usr/lib/libQt5XcbQpa.so.5 > #2 0x00007f456f4194e4 in > QXcbNativeInterface::nativeResourceForScreen(QByteArray const&, QScreen*) () > at /usr/lib/libQt5XcbQpa.so.5 > #3 0x00007f457651b9c7 in QX11Info::getTimestamp() () at > /usr/lib/libQt5X11Extras.so.5 > #4 0x00007f45768e4619 in KWin::Platform::updateXTime() () at > /usr/lib/libkwin.so.5 > #5 0x00007f457689f2ec in > KWin::Workspace::workspaceEvent(xcb_generic_event_t*) () at > /usr/lib/libkwin.so.5 > #6 0x00007f457550ec67 in > QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) > () at /usr/lib/libQt5Core.so.5 > #7 0x00007f456f3fb703 in > QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () at > /usr/lib/libQt5XcbQpa.so.5 > #8 0x00007f456f3fcc79 in > QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () > at /usr/lib/libQt5XcbQpa.so.5 > #9 0x00007f456f42006e in () at /usr/lib/libQt5XcbQpa.so.5 > #10 0x00007f457551013c in > QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at > /usr/lib/libQt5Core.so.5 > #11 0x00007f45755185c4 in QCoreApplication::exec() () at > /usr/lib/libQt5Core.so.5 > #12 0x000055e39cfc6412 in () > #13 0x00007f4574eb5002 in __libc_start_main () at /usr/lib/libc.so.6 > #14 0x000055e39cfc694e in _start () I have the same: "kwin_x11 runs infinitely on getTimestamp()". The reason is the DISPLAY is closed but `peek` cannot be notified on DISPLAY being invalidated. I have found a solution, I will submit a pull request soon. I have put two merge requests: * https://invent.kde.org/plasma/kwin/-/merge_requests/438 * https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/439 Can you still reproduce it with some more recent Plasma version, like 5.24.5? A lot has changed since, but I don't remember seeing this issue for a very long while now. Might have been fixed by those merge requests. Thanks! :) |