Bug 480925

Summary: Crash in KeyboardInterface::sendKey
Product: [Plasma] kwin Reporter: BK <amusing.random.alias>
Component: wayland-genericAssignee: 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: Version Fixed In: 6.1.0
Sentry Crash Report:
Attachments: kwin crash log

Description BK 2024-02-05 21:25:22 UTC
SUMMARY
Kwin_wayland crashes semi-randomly whenever I have Blender (4.0.2), GIMP (2.10.36) and Firefox (122.0) running at the same time. I think this time, it happened when trying to open ArmorPaint, but the reason can be as trivial when clicking in Blender or Alt+Tabbing or else.


Journalctl -b output (hope this contains a useful backtrace):

Feb 05 21:57:37 Hostname systemd[910]: Started /media/X-Plane/X-Plane_Utilities/ArmorPaint/ArmorPaint.
Feb 05 21:57:37 Hostname kwin_wayland_wrapper[34076]: Uniform W not found.
Feb 05 21:57:37 Hostname kwin_wayland_wrapper[34076]: Uniform eye not found.
Feb 05 21:57:37 Hostname kwin_wayland_wrapper[34076]: Uniform aspectRatio not found.
Feb 05 21:57:37 Hostname kwin_wayland_wrapper[34076]: Uniform brushScale not found.
Feb 05 21:57:37 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:57:38 Hostname pipewire[1330]: mod.client-node: 0x596c1bad5f60: unknown peer 0x596c1bc13dc0 fd:74
Feb 05 21:57:39 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:57:41 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:57:43 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:57:45 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:57:45 Hostname kwin_wayland[954]: This plugin does not support raise()
Feb 05 21:57:47 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:57:48 Hostname systemd[910]: app-konsolerun-2c644925d80c441abed7b08037902c97.scope: Consumed 10min 33.565s CPU time.
Feb 05 21:57:51 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:57:52 Hostname systemd[910]: app-org.kde.dolphin-6df1bb1892714bc68dc8bd5aaa8c66c1.scope: Consumed 1.912s CPU time.
Feb 05 21:57:52 Hostname pipewire[1330]: mod.client-node: 0x596c1baf3780: unknown peer 0x596c1bdc72d0 fd:55
Feb 05 21:57:53 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:57:54 Hostname systemd[910]: Started konsolerun.
Feb 05 21:57:54 Hostname kded5[1143]: org.kde.plasma.appmenu: Got an error
Feb 05 21:57:54 Hostname kded5[1143]: org.kde.plasma.appmenu: Got an error
Feb 05 21:57:56 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:58:00 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:58:02 Hostname pipewire[1330]: mod.client-node: 0x596c1bc9e290: unknown peer 0x596c1baf23a0 fd:106
Feb 05 21:58:02 Hostname pipewire[1330]: mod.client-node: 0x596c1bd69050: unknown peer 0x596c1bdc72d0 fd:102
Feb 05 21:58:03 Hostname kernel: kwin_wayland[954]: segfault at 10 ip 00007e38befbf6e4 sp 00007fff8e8f63b8 error 4 in libkwin.so.5.27.10[7e38bed69000+327000] likely on CPU 24 (core 8, socket 0)
Feb 05 21:58:03 Hostname kernel: Code: 38 48 85 ff 74 10 ff 25 aa fd 23 00 66 2e 0f 1f 84 00 00 00 00 00 31 c0 c3 90 66 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa <48> 8b 47 10 48 8b 00 c3 0>
Feb 05 21:58:03 Hostname systemd[1]: Created slice Slice /system/systemd-coredump.
Feb 05 21:58:03 Hostname systemd[1]: Started Process Core Dump (PID 34214/UID 0).
Feb 05 21:58:03 Hostname systemd-coredump[34215]: Removed old coredump core.kwin_wayland.1000.e7a6e47c987a4cc9a37fc08e6f913f60.965.1706140676000000.zst.
Feb 05 21:58:03 Hostname systemd-coredump[34215]: Removed old coredump core.Main\x20Thread.1000.f60e033315564cddbffc3b3d4efd9804.5489.1706218306000000.zst.
Feb 05 21:58:04 Hostname systemd-coredump[34215]: [🡕] Process 954 (kwin_wayland) of user 1000 dumped core.
                                                
                                                Stack trace of thread 954:
                                                #0  0x00007e38befbf6e4 _ZNK14KWaylandServer16ClientConnection6clientEv (libkwin.so.5 + 0x3bf6e4)
                                                #1  0x00007e38befd4789 n/a (libkwin.so.5 + 0x3d4789)
                                                #2  0x00007e38befd4f3c _ZN14KWaylandServer17KeyboardInterface7sendKeyEjNS_16KeyboardKeyStateEPNS_16ClientConnectionE (libkwin.so.5 + 0x3d4f3c)
                                                #3  0x00007e38bee3b609 _ZN4KWin24KeyboardInputRedirection10processKeyEjNS_16InputRedirection16KeyboardKeyStateENSt6chrono8durationIlSt5ratioIL>
                                                #4  0x00007e38bd4d0bdb n/a (libQt5Core.so.5 + 0x2d0bdb)
                                                #5  0x00007e38bed6ff11 _ZN4KWin11InputDevice10keyChangedEjNS_16InputRedirection16KeyboardKeyStateENSt6chrono8durationIlSt5ratioILl1ELl1000000E>
                                                #6  0x00007e38bef9440b _ZN4KWin8LibInput10Connection13processEventsEv (libkwin.so.5 + 0x39440b)
                                                #7  0x00007e38bd4c3964 _ZN7QObject5eventEP6QEvent (libQt5Core.so.5 + 0x2c3964)
                                                #8  0x00007e38bcb788ff _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt5Widgets.so.5 + 0x1788ff)
                                                #9  0x00007e38bd49bef8 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt5Core.so.5 + 0x29bef8)
                                                #10 0x00007e38bd4a0e5b _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData (libQt5Core.so.5 + 0x2a0e5b)
                                                #11 0x00007e38bd4ea617 _ZN20QEventDispatcherUNIX13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2ea617)
                                                #12 0x00005b04dfd04ed2 n/a (kwin_wayland + 0x137ed2)
                                                #13 0x00007e38bd49ac04 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x29ac04)
                                                #14 0x00007e38bd49c0a3 _ZN16QCoreApplication4execEv (libQt5Core.so.5 + 0x29c0a3)
                                                #15 0x00005b04dfc2040b n/a (kwin_wayland + 0x5340b)
                                                #16 0x00007e38bc35acd0 n/a (/usr/lib/libc.so.6 (deleted) + 0x23cd0)
                                                ELF object binary architecture: AMD x86-64
Feb 05 21:58:04 Hostname systemd[1]: systemd-coredump@0-34214-0.service: Deactivated successfully.
Feb 05 21:58:04 Hostname kioslave5[33710]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname dolphin[31017]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname dolphin[18423]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname dolphin[19404]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname cantata[30682]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname cantata[30682]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname xdg-desktop-portal-kde[1245]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname polkit-kde-authentication-agent-1[1243]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname kded5[1143]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname org_kde_powerdevil[1244]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname org_kde_powerdevil[1244]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname kactivitymanagerd[1237]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname plasmashell[1176]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname konsole[34156]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname DiscoverNotifier[1556]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname dolphin[20313]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname polkitd[976]: Unregistered Authentication Agent for unix-session:1 (system bus name :1.38, object path /org/kde/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (di>
Feb 05 21:58:04 Hostname systemd[910]: plasma-polkit-agent.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 21:58:04 Hostname systemd[910]: plasma-polkit-agent.service: Failed with result 'exit-code'.
Feb 05 21:58:04 Hostname systemd[910]: plasma-xdg-desktop-portal-kde.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 21:58:04 Hostname systemd[910]: plasma-xdg-desktop-portal-kde.service: Failed with result 'exit-code'.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[23901]: ExceptionHandler::GenerateDump cloned child 34252
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[23901]: ExceptionHandler::SendContinueSignalToChild sent continue signal to child
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[34252]: ExceptionHandler::WaitForContinueSignal waiting for continue signal...
Feb 05 21:58:04 Hostname systemd[910]: plasma-kactivitymanagerd.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 21:58:04 Hostname systemd[910]: plasma-kactivitymanagerd.service: Failed with result 'exit-code'.
Feb 05 21:58:04 Hostname systemd[910]: plasma-kactivitymanagerd.service: Consumed 27.816s CPU time.
Feb 05 21:58:04 Hostname systemd[910]: app-org.kde.discover.notifier@autostart.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 21:58:04 Hostname systemd[910]: app-org.kde.discover.notifier@autostart.service: Failed with result 'exit-code'.
Feb 05 21:58:04 Hostname systemd[910]: plasma-powerdevil.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 21:58:04 Hostname systemd[910]: plasma-powerdevil.service: Failed with result 'exit-code'.
Feb 05 21:58:04 Hostname systemd[910]: plasma-powerdevil.service: Consumed 1.016s CPU time.
Feb 05 21:58:04 Hostname kwin_wayland[34241]: No backend specified, automatically choosing drm
Feb 05 21:58:04 Hostname systemd[910]: plasma-polkit-agent.service: Scheduled restart job, restart counter is at 1.
Feb 05 21:58:04 Hostname systemd[910]: Starting KDE PolicyKit Authentication Agent...
Feb 05 21:58:04 Hostname systemd[910]: plasma-kded.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 21:58:04 Hostname systemd[910]: plasma-kded.service: Failed with result 'exit-code'.
Feb 05 21:58:04 Hostname systemd[910]: plasma-kded.service: Consumed 3.052s CPU time.
Feb 05 21:58:04 Hostname systemd[910]: plasma-plasmashell.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 21:58:04 Hostname systemd[910]: plasma-plasmashell.service: Failed with result 'exit-code'.
Feb 05 21:58:04 Hostname systemd[910]: plasma-plasmashell.service: Consumed 57.458s CPU time.
Feb 05 21:58:04 Hostname systemd[910]: app-org.kde.dolphin-907cc1adb8a54ee5a2d367b2f1623740.scope: Consumed 40.597s CPU time.
Feb 05 21:58:04 Hostname systemd[910]: app-org.kde.dolphin-7474dc1a7a224b21a011d0c0c58ffe74.scope: Consumed 1.911s CPU time.
Feb 05 21:58:04 Hostname systemd[910]: app-org.kde.dolphin-51f3f644890b47eaa0a4fbdc0f86e30c.scope: Consumed 3.333s CPU time.
Feb 05 21:58:04 Hostname systemd[910]: app-org.kde.dolphin-557e98339905447b84c192484996f54b.scope: Consumed 7.025s CPU time.
Feb 05 21:58:04 Hostname systemd[910]: app-cantata-6d031ddf49304862bcfdc2e67739f36a.scope: Consumed 2.152s CPU time.
Feb 05 21:58:04 Hostname systemd[910]: plasma-powerdevil.service: Scheduled restart job, restart counter is at 1.
Feb 05 21:58:04 Hostname systemd[910]: Starting Powerdevil...
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[31526]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[30333]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[31851]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[33556]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[33467]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[31342]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[30263]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[30211]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[31247]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[30052]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[30207]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[24144]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[29245]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[30118]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[28912]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[29751]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[24078]: Exiting due to channel error.
Feb 05 21:58:04 Hostname kwin_wayland_wrapper[33998]: Exiting due to channel error.
Feb 05 21:58:04 Hostname systemd[910]: plasma-plasmashell.service: Scheduled restart job, restart counter is at 1.
Feb 05 21:58:04 Hostname systemd[910]: Starting KDE Plasma Workspace...
Feb 05 21:58:05 Hostname kwin_wayland[34241]: kf.globalaccel.kglobalacceld: No desktop file found for service  "Launcher.desktop"
Feb 05 21:58:05 Hostname kwin_wayland[34241]: kf.globalaccel.kglobalacceld: No desktop file found for service  "Control Panel.desktop"
Feb 05 21:58:05 Hostname kwin_wayland[34241]: kf.globalaccel.kglobalacceld: No desktop file found for service  "Monitor vJoy.desktop"
Feb 05 21:58:05 Hostname kwin_wayland[34241]: kf.globalaccel.kglobalacceld: No desktop file found for service  "Uninstall.desktop"
Feb 05 21:58:05 Hostname kwin_wayland[34241]: kf.globalaccel.kglobalacceld: No desktop file found for service  "org.flameshot.Flameshot.desktop"
Feb 05 21:58:05 Hostname kwin_wayland[34241]: kf.globalaccel.kglobalacceld: No desktop file found for service  "Configure x264vfw64.desktop"
Feb 05 21:58:05 Hostname kwin_wayland[34241]: kf.globalaccel.kglobalacceld: No desktop file found for service  "Configure x264vfw.desktop"
Feb 05 21:58:05 Hostname kwin_wayland[34241]: kf.globalaccel.kglobalacceld: No desktop file found for service  "Configure vJoy.desktop"
Feb 05 21:58:05 Hostname kwin_wayland[34241]: kf.globalaccel.kglobalacceld: No desktop file found for service  "Uninstall Navigraph FMS Data Manager.desktop"
Feb 05 21:58:05 Hostname kwin_wayland[34241]: kf.globalaccel.kglobalacceld: No desktop file found for service  "X-Plane 11 RADV-4.desktop"
Feb 05 21:58:05 Hostname kwin_wayland[34241]: kf.globalaccel.kglobalacceld: No desktop file found for service  "Falcon BMS Website.desktop"
Feb 05 21:58:05 Hostname kwin_wayland[34241]: OpenGL vendor string:                   AMD
Feb 05 21:58:05 Hostname kwin_wayland[34241]: OpenGL renderer string:                 AMD Radeon RX 6900 XT (radeonsi, navi21, LLVM 16.0.6, DRM 3.57, 6.7.3-arch1-1)
Feb 05 21:58:05 Hostname kwin_wayland[34241]: OpenGL version string:                  4.6 (Core Profile) Mesa 24.0.0 (git-ee25160ed5)
Feb 05 21:58:05 Hostname kwin_wayland[34241]: OpenGL shading language version string: 4.60
Feb 05 21:58:05 Hostname kwin_wayland[34241]: Driver:                                 Unknown
Feb 05 21:58:05 Hostname kwin_wayland[34241]: GPU class:                              Unknown
Feb 05 21:58:05 Hostname kwin_wayland[34241]: OpenGL version:                         4.6
Feb 05 21:58:05 Hostname kwin_wayland[34241]: GLSL version:                           4.60
Feb 05 21:57:54 Hostname kded5[1143]: org.kde.plasma.appmenu: Got an error
Feb 05 21:57:56 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:58:00 Hostname plasmashell[1176]: qml: temp unit: 0
Feb 05 21:58:02 Hostname pipewire[1330]: mod.client-node: 0x596c1bc9e290: unknown peer 0x596c1baf23a0 fd:106
Feb 05 21:58:02 Hostname pipewire[1330]: mod.client-node: 0x596c1bd69050: unknown peer 0x596c1bdc72d0 fd:102
Feb 05 21:58:03 Hostname kernel: kwin_wayland[954]: segfault at 10 ip 00007e38befbf6e4 sp 00007fff8e8f63b8 error 4 in libkwin.so.5.27.10[7e38bed69000+327000] likely on CPU 24 (core 8, socket 0)
Feb 05 21:58:03 Hostname kernel: Code: 38 48 85 ff 74 10 ff 25 aa fd 23 00 66 2e 0f 1f 84 00 00 00 00 00 31 c0 c3 90 66 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa <48> 8b 47 10 48 8b 00 c3 0>
Feb 05 21:58:03 Hostname systemd[1]: Created slice Slice /system/systemd-coredump.
Feb 05 21:58:03 Hostname systemd[1]: Started Process Core Dump (PID 34214/UID 0).
Feb 05 21:58:03 Hostname systemd-coredump[34215]: Removed old coredump core.kwin_wayland.1000.e7a6e47c987a4cc9a37fc08e6f913f60.965.1706140676000000.zst.
Feb 05 21:58:03 Hostname systemd-coredump[34215]: Removed old coredump core.Main\x20Thread.1000.f60e033315564cddbffc3b3d4efd9804.5489.1706218306000000.zst.
Feb 05 21:58:04 Hostname systemd-coredump[34215]: [🡕] Process 954 (kwin_wayland) of user 1000 dumped core.
                                                
                                                Stack trace of thread 954:
                                                #0  0x00007e38befbf6e4 _ZNK14KWaylandServer16ClientConnection6clientEv (libkwin.so.5 + 0x3bf6e4)
                                                #1  0x00007e38befd4789 n/a (libkwin.so.5 + 0x3d4789)
                                                #2  0x00007e38befd4f3c _ZN14KWaylandServer17KeyboardInterface7sendKeyEjNS_16KeyboardKeyStateEPNS_16ClientConnectionE (libkwin.so.5 + 0x3d4f3c)
                                                #3  0x00007e38bee3b609 _ZN4KWin24KeyboardInputRedirection10processKeyEjNS_16InputRedirection16KeyboardKeyStateENSt6chrono8durationIlSt5ratioIL>
                                                #4  0x00007e38bd4d0bdb n/a (libQt5Core.so.5 + 0x2d0bdb)
                                                #5  0x00007e38bed6ff11 _ZN4KWin11InputDevice10keyChangedEjNS_16InputRedirection16KeyboardKeyStateENSt6chrono8durationIlSt5ratioILl1ELl1000000E>
                                                #6  0x00007e38bef9440b _ZN4KWin8LibInput10Connection13processEventsEv (libkwin.so.5 + 0x39440b)
                                                #7  0x00007e38bd4c3964 _ZN7QObject5eventEP6QEvent (libQt5Core.so.5 + 0x2c3964)
                                                #8  0x00007e38bcb788ff _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt5Widgets.so.5 + 0x1788ff)
                                                #9  0x00007e38bd49bef8 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt5Core.so.5 + 0x29bef8)
                                                #10 0x00007e38bd4a0e5b _ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData (libQt5Core.so.5 + 0x2a0e5b)
                                                #11 0x00007e38bd4ea617 _ZN20QEventDispatcherUNIX13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2ea617)
                                                #12 0x00005b04dfd04ed2 n/a (kwin_wayland + 0x137ed2)
                                                #13 0x00007e38bd49ac04 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x29ac04)
                                                #14 0x00007e38bd49c0a3 _ZN16QCoreApplication4execEv (libQt5Core.so.5 + 0x29c0a3)
                                                #15 0x00005b04dfc2040b n/a (kwin_wayland + 0x5340b)
                                                #16 0x00007e38bc35acd0 n/a (/usr/lib/libc.so.6 (deleted) + 0x23cd0)
                                                ELF object binary architecture: AMD x86-64
Feb 05 21:58:04 Hostname systemd[1]: systemd-coredump@0-34214-0.service: Deactivated successfully.
Feb 05 21:58:04 Hostname kioslave5[33710]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname dolphin[31017]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname dolphin[18423]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname dolphin[19404]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname cantata[30682]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname cantata[30682]: The Wayland connection broke. Did the Wayland compositor die?
Feb 05 21:58:04 Hostname xdg-desktop-portal-kde[1245]: The Wayland connection broke. Did the Wayland compositor die?
 



STEPS TO REPRODUCE
1. Open Blender (from terminal, because from binary does not work for some reason), GIMP, Firefox.
2. Do stuff.
3. Kwin will crash at a random point and recover, but running applications will not. Firefox will throw a crash error.


OBSERVED RESULT
A complete kwin crash and recovery.


EXPECTED RESULT
Stable usage 24/7.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.7.3-arch1-1
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
Comment 1 Vlad Zahorodnii 2024-02-06 11:54:27 UTC
The crash happens when sending a key event, not sure how a crash could occur at that point
Comment 2 Nate Graham 2024-02-06 20:01:07 UTC

*** This bug has been marked as a duplicate of bug 472922 ***
Comment 3 Dashon 2024-03-17 23:39:44 UTC
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.
Comment 4 Dashon 2024-03-28 02:24:30 UTC
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.
Comment 5 Dashon 2024-03-28 02:26:09 UTC
If my problem is a different issue, then let me know to file a different bug report.
Comment 6 Dashon 2024-03-28 02:26:52 UTC
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
Comment 7 Ryan Rix 2024-05-21 00:02:00 UTC
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
Comment 8 Ryan Rix 2024-05-21 22:13:09 UTC
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
Comment 9 Ryan Rix 2024-05-21 22:13:46 UTC
I'm sorry, I should have added that as an attachment or filtered the output.
Comment 10 Bug Janitor Service 2024-06-03 06:09:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5813
Comment 11 David Edmundson 2024-06-03 10:24:02 UTC
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
Comment 12 David Edmundson 2024-06-03 10:37:24 UTC
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