Summary: | Crash in KeyboardInterface::sendKey | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | BK <amusing.random.alias> |
Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | dashonwwIII, kde, nate, ry |
Priority: | NOR | ||
Version: | 5.27.10 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/b1af25bf90c611cfcff26fed3920674462eb36b9 | Version Fixed In: | 6.1.0 |
Sentry Crash Report: | |||
Attachments: | kwin crash log |
Description
BK
2024-02-05 21:25:22 UTC
The crash happens when sending a key event, not sure how a crash could occur at that point *** This bug has been marked as a duplicate of bug 472922 *** I seem to have a similar problem. It doesn't happen frequently, but usually I'm not doing anything. I remember coming back from getting a drink and both monitors went black and firefox crash handler popped up. All of the Qt apps survived though, so yay for that. I tried looking for a cordump with coredumpctl, but it says unavailable for kwin. Apps like dolphin or kate are available, but not kwin_wayland. I tried attaching to the process, but ran into some kind of permission issue. I'm unsure of how to get any usable logs. Please advise on how to do so. Created attachment 167873 [details]
kwin crash log
kwin_wayland seems to crash once a day for me. Usually I am not doing anything. I've had it happen a few times when I wasn't even home. I followed the instructions on the kde developer website and managed to get a log with gdb which I will attach now.
If my problem is a different issue, then let me know to file a different bug report. Just wanted to add my system details: Operating System: EndeavourOS KDE Plasma Version: 6.0.2 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: 6.7.9-zen1-1-zen (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor Memory: 62.7 GiB of RAM Graphics Processor: NVIDIA GeForce RTX 3080/PCIe/SSE2 Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-7C95 System Version: 1.0 I've been experiencing this crash for a while as well on an AMD running NixOS resulting in the same backtrace which BK lists in the journalctl output: Thread 1 (Thread 0x7fa17dac1380 (LWP 147914)): #0 0x00007fa185601d60 in KWaylandServer::ClientConnection::client() const () from /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/lib/libkwin.so.5 #1 0x00007fa185614b24 in KWaylandServer::KeyboardInterfacePrivate::keyboardsForClient(KWaylandServer::ClientConnection*) const () from /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/lib/libkwin.so.5 #2 0x00007fa185614f79 in KWaylandServer::KeyboardInterface::sendKey(unsigned int, KWaylandServer::KeyboardKeyState, KWaylandServer::ClientConnection*) () from /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/lib/libkwin.so.5 #3 0x00007fa185407401 in KWin::KeyboardInputRedirection::processKey(unsigned int, KWin::InputRedirection::KeyboardKeyState, std::chrono::duration<long, std::ratio<1l, 1000000l> >, KWin::InputDevice*) () from /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/lib/libkwin.so.5 #4 0x00007fa183973c35 in void doActivate<false>(QObject*, int, void**) () from /nix/store/h8jsqbn5bpci7v8gaxy7hrp2xc0s804v-qtbase-5.15.12/lib/libQt5Core.so.5 #5 0x00007fa185322bfc in KWin::InputDevice::keyChanged(unsigned int, KWin::InputRedirection::KeyboardKeyState, std::chrono::duration<long, std::ratio<1l, 1000000l> >, KWin::InputDevice*) () from /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/lib/libkwin.so.5 #6 0x00007fa1855c3405 in KWin::LibInput::Connection::processEvents() () from /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/lib/libkwin.so.5 #7 0x00007fa1839684c0 in QObject::event(QEvent*) () from /nix/store/h8jsqbn5bpci7v8gaxy7hrp2xc0s804v-qtbase-5.15.12/lib/libQt5Core.so.5 #8 0x00007fa18273e04e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /nix/store/h8jsqbn5bpci7v8gaxy7hrp2xc0s804v-qtbase-5.15.12/lib/libQt5Widgets.so.5 #9 0x00007fa18393c978 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /nix/store/h8jsqbn5bpci7v8gaxy7hrp2xc0s804v-qtbase-5.15.12/lib/libQt5Core.so.5 #10 0x00007fa18393f9b1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /nix/store/h8jsqbn5bpci7v8gaxy7hrp2xc0s804v-qtbase-5.15.12/lib/libQt5Core.so.5 #11 0x00007fa183991ae0 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /nix/store/h8jsqbn5bpci7v8gaxy7hrp2xc0s804v-qtbase-5.15.12/lib/libQt5Core.so.5 #12 0x000000000056a96d in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () #13 0x00007fa18393b373 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /nix/store/h8jsqbn5bpci7v8gaxy7hrp2xc0s804v-qtbase-5.15.12/lib/libQt5Core.so.5 #14 0x00007fa183943876 in QCoreApplication::exec() () from /nix/store/h8jsqbn5bpci7v8gaxy7hrp2xc0s804v-qtbase-5.15.12/lib/libQt5Core.so.5 #15 0x000000000044e897 in main () I use the Bismuth tiling plugin but otherwise have a straightforward plasma configuration. it mostly happens when I am hitting an Emacs keybinding with a Ctrl modifier, but sometimes happens at random. Operating System: NixOS 23.11 KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.113.0 Qt Version: 5.15.12 Kernel Version: 6.1.90 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 7640U w/ Radeon 760M Graphics Memory: 60.7 GiB of RAM Graphics Processor: AMD Radeon Graphics This crash has been happening to me multiple times a day some days for about three months now. does anyone have any advice to root-cause and debug this? I am prepared to patch and compile kwayland and kwin_wayland at least from source, and can decently printf debug, but don't really know much about how wayland works to really have a conceptual understanding of what is happening on this codepath. But it happens most regularly when i press ctrl-backspace, which i do in both of my primary applications emacs and firefox, as a muscle memory. It happened while I was drafting this comment. [rrix@virtuous-cassette:~]$ sudo coredumpctl list | grep kwin_wayland [sudo] password for rrix: Mon 2024-04-15 20:09:01 PDT 5657 1000 1000 SIGSEGV missing /nix/store/8hwpp6dgndnihkg2gbwkvqllv3hjsg8y-kwin-5.27.10/bin/.kwin_wayland-wrapped - Mon 2024-04-15 22:31:34 PDT 393757 1000 1000 SIGSEGV missing /nix/store/8hwpp6dgndnihkg2gbwkvqllv3hjsg8y-kwin-5.27.10/bin/.kwin_wayland-wrapped - Tue 2024-04-16 09:42:25 PDT 410080 1000 1000 SIGSEGV missing /nix/store/8hwpp6dgndnihkg2gbwkvqllv3hjsg8y-kwin-5.27.10/bin/.kwin_wayland-wrapped - Fri 2024-04-19 17:57:46 PDT 461114 1000 1000 SIGSEGV missing /nix/store/8hwpp6dgndnihkg2gbwkvqllv3hjsg8y-kwin-5.27.10/bin/.kwin_wayland-wrapped - Mon 2024-04-22 17:06:28 PDT 5764 1000 1000 SIGSEGV missing /nix/store/8hwpp6dgndnihkg2gbwkvqllv3hjsg8y-kwin-5.27.10/bin/.kwin_wayland-wrapped - Tue 2024-04-23 09:57:43 PDT 185495 1000 1000 SIGSEGV missing /nix/store/8hwpp6dgndnihkg2gbwkvqllv3hjsg8y-kwin-5.27.10/bin/.kwin_wayland-wrapped - Sat 2024-04-27 11:35:21 PDT 273848 1000 1000 SIGSEGV missing /nix/store/8hwpp6dgndnihkg2gbwkvqllv3hjsg8y-kwin-5.27.10/bin/.kwin_wayland-wrapped - Tue 2024-04-30 14:52:11 PDT 5924 1000 1000 SIGSEGV missing /nix/store/8hwpp6dgndnihkg2gbwkvqllv3hjsg8y-kwin-5.27.10/bin/.kwin_wayland-wrapped - Mon 2024-05-06 13:22:22 PDT 5623 1000 1000 SIGSEGV present /nix/store/8hwpp6dgndnihkg2gbwkvqllv3hjsg8y-kwin-5.27.10/bin/.kwin_wayland-wrapped 15.3M Mon 2024-05-06 20:06:06 PDT 211479 1000 1000 SIGSEGV present /nix/store/8hwpp6dgndnihkg2gbwkvqllv3hjsg8y-kwin-5.27.10/bin/.kwin_wayland-wrapped 16.5M Tue 2024-05-07 22:25:10 PDT 283556 1000 1000 SIGSEGV present /nix/store/8hwpp6dgndnihkg2gbwkvqllv3hjsg8y-kwin-5.27.10/bin/.kwin_wayland-wrapped 16.7M Tue 2024-05-07 22:26:29 PDT 631249 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 9.4M Tue 2024-05-07 22:32:00 PDT 634884 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 8.3M Tue 2024-05-14 19:31:29 PDT 639991 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 20.3M Tue 2024-05-14 19:32:23 PDT 1765630 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 7.8M Fri 2024-05-17 18:02:07 PDT 5670 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 15.0M Sun 2024-05-19 21:32:47 PDT 5714 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 13.8M Sun 2024-05-19 23:11:33 PDT 27291 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 14.1M Sun 2024-05-19 23:41:46 PDT 42049 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 12.5M Mon 2024-05-20 00:18:35 PDT 47675 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 9.4M Mon 2024-05-20 11:08:22 PDT 53705 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 11.9M Mon 2024-05-20 11:17:08 PDT 60377 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 13.5M Mon 2024-05-20 11:54:00 PDT 64847 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 16.0M Mon 2024-05-20 11:56:54 PDT 82622 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 9.9M Mon 2024-05-20 12:25:42 PDT 86677 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 13.3M Mon 2024-05-20 14:30:55 PDT 130550 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 13.5M Mon 2024-05-20 16:36:59 PDT 147914 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 11.3M Tue 2024-05-21 13:56:01 PDT 185985 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 13.9M Tue 2024-05-21 14:04:15 PDT 323032 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 8.5M Tue 2024-05-21 14:56:49 PDT 327953 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 9.6M Tue 2024-05-21 15:06:13 PDT 341071 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 10.2M Tue 2024-05-21 15:08:22 PDT 345423 1000 1000 SIGSEGV present /nix/store/pphwrqfrkbngq394cpxv1pi98i1a54ys-kwin-5.27.11/bin/.kwin_wayland-wrapped 8.0M I'm sorry, I should have added that as an attachment or filtered the output. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5813 Git commit 79ef1be57bc4710973e7f90754a72391b258f2c2 by David Edmundson. Committed on 03/06/2024 at 10:23. Pushed by davidedmundson into branch 'master'. xwayland: Avoid crash if processing keys after xwayland is disconnected Whilst the XWayland input filter only runs whilst XWayland is running there is hypothetical window between the wayland connection to xwayland being disconnected and handleXwaylandFinished, the process exiting. This should be guarded correctly. M +5 -1 src/xwayland/xwayland.cpp https://invent.kde.org/plasma/kwin/-/commit/79ef1be57bc4710973e7f90754a72391b258f2c2 Git commit b1af25bf90c611cfcff26fed3920674462eb36b9 by David Edmundson, on behalf of David Edmundson. Committed on 03/06/2024 at 10:24. Pushed by davidedmundson into branch 'Plasma/6.1'. xwayland: Avoid crash if processing keys after xwayland is disconnected Whilst the XWayland input filter only runs whilst XWayland is running there is hypothetical window between the wayland connection to xwayland being disconnected and handleXwaylandFinished, the process exiting. This should be guarded correctly. (cherry picked from commit 79ef1be57bc4710973e7f90754a72391b258f2c2) d55383db xwayland: Avoid crash if processing keys after xwayland is disconnected 3d6e0510 Apply 1 suggestion(s) to 1 file(s) Co-authored-by: David Edmundson <kde@davidedmundson.co.uk> M +5 -1 src/xwayland/xwayland.cpp https://invent.kde.org/plasma/kwin/-/commit/b1af25bf90c611cfcff26fed3920674462eb36b9 |