Summary: | kwin becomes unresponsive, need to restart session | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Ralf Jung <post> |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | REOPENED --- | ||
Severity: | crash | CC: | a.a.klevtsov, aenigma1372, casta+kde, danirtoma, darknovanick, g.airiants, gfew3vhy, jcfisher, jlp, kde, KDE, kde, kde, kfunk, kishore96, kristian, mmattq, nfsmwlin, o.g.m.belleux, php4fan, pmwpmw, ricardo, ruben.vandeginste, sephiroth_pk, t3hd0gg, tom-kde.bugs, xaver.hugl, yule2000 |
Priority: | NOR | ||
Version: | 5.25.4 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Log around the time the issue happens.
Journal log and stack trace at time of freeze on Nov. 2, 2022 |
Description
Ralf Jung
2022-08-13 17:44:56 UTC
Actually turns out this can happen without vsocde being involved. It just happened while I was just using my webbrowser, not starting any new application. There was still a black square in the bottom right corner though. Maybe that is from a plasma notification? It might be that the cause of the problem is actually plasma, not kwin -- or at least plasma seems to be tied in here. Sometimes when I see the strange artifact in the bottom right corner, I still manage to alt-tab to a terminal and do `killall plasmashell` -- and that prevents the death of my entire session that would usually follow. It's definitely a KWin problem. When this just happened again, I tried killing plasmashell (using a virtual tty), but the screen remained frozen. Killing kwin with s SIGTERM was just entirely ignored, kwin rept running. Killing kwin with a SIGKILL finally unlocked my session, and after restarting plasma things seem to be running again. I am now getting this at least once a day. I wonder what it special about my system that makes this not show up for others, but this is the kind of bug that might force me to use a different DE if I want to keep using my computer productively. If there is something that would help investigate the issue, please let me know. (Though so far it does not look like there is much interest in investigating critical crash issues in kwin...) > The X11 connection broke (error 1). Did the X11 server die?
That doesn't look like KWin would be the problem, but the Xorg server is crashing or hanging. Can you check if it crashed recently? If it did, that should show up in the output of "coredumpct list"
I am pretty sure that error occurs after I hit Ctrl-Alt-Backspace. At that point of course the X server is gone. This just happened again and I saw a lot of this on the terminal qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 32674, resource id: 98566529, major code: 15 (QueryTree), minor code: 0 kwin_core: XCB error: 152 (BadDamage), sequence: 33939, resource id: 16904766, major code: 143 (DAMAGE), minor code: 3 (Subtract) qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59825, resource id: 98566594, major code: 19 (DeleteProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59837, resource id: 98566594, major code: 19 (DeleteProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59838, resource id: 98566594, major code: 18 (ChangeProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59839, resource id: 98566594, major code: 19 (DeleteProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59840, resource id: 98566594, major code: 19 (DeleteProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59841, resource id: 98566594, major code: 19 (DeleteProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59842, resource id: 98566594, major code: 7 (ReparentWindow), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59843, resource id: 98566594, major code: 6 (ChangeSaveSet), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59844, resource id: 98566594, major code: 2 (ChangeWindowAttributes), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 59845, resource id: 98566594, major code: 10 (UnmapWindow), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 11133, resource id: 52428944, major code: 18 (ChangeProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 11146, resource id: 52428945, major code: 18 (ChangeProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 12989, resource id: 16923763, major code: 149 (Unknown), minor code: 4 kwin_core: XCB error: 136 (Unknown), sequence: 12991, resource id: 16923765, major code: 134 (SYNC), minor code: 17 (DestroyFence) qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 12993, resource id: 16923763, major code: 149 (Unknown), minor code: 4 kwin_core: XCB error: 136 (Unknown), sequence: 12995, resource id: 16923766, major code: 134 (SYNC), minor code: 17 (DestroyFence) qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 15410, resource id: 16923935, major code: 149 (Unknown), minor code: 4 kwin_core: XCB error: 136 (Unknown), sequence: 15412, resource id: 16924074, major code: 134 (SYNC), minor code: 17 (DestroyFence) qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 17050, resource id: 127926442, major code: 15 (QueryTree), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 17081, resource id: 52428946, major code: 18 (ChangeProperty), minor code: 0 kwin_core: XCB error: 152 (BadDamage), sequence: 17139, resource id: 16923805, major code: 143 (DAMAGE), minor code: 3 (Subtract) qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 20364, resource id: 52428947, major code: 18 (ChangeProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 20369, resource id: 52428948, major code: 18 (ChangeProperty), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 22544, resource id: 16925067, major code: 149 (Unknown), minor code: 4 kwin_core: XCB error: 136 (Unknown), sequence: 22546, resource id: 16925069, major code: 134 (SYNC), minor code: 17 (DestroyFence) qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 22548, resource id: 16925067, major code: 149 (Unknown), minor code: 4 kwin_core: XCB error: 136 (Unknown), sequence: 22550, resource id: 16925070, major code: 134 (SYNC), minor code: 17 (DestroyFence) qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 22568, resource id: 16925067, major code: 149 (Unknown), minor code: 4 It seems like some particular client's behavior just really irritates kwin -- I am in a loooong Zoom meeting today, which tends to open windows for notifications and things like that, and kwin dies about every hour. Which heavily impedes my ability to participate in the meeting. This might be related -- today I once had Chromium start with an all-black window (similar to the black square that shows up in the corner right before everything goes down the drain), and then later qgit also started all-black, and since I started qgit from Konsole I saw this qt.qpa.xcb: xcb_shm_create_segment() failed for size 1726740 qt.qpa.xcb: xcb_shm_create_segment() failed for size 8762880 After that everything that wanted to open a new Window just failed. I have 32GB RAM and a lot of it is free. But looks like some resource somewhere gets exhausted and then (unsurprisingly) nothing knows how to deal with that and everything falls apart? Any idea what might cause that allocation to fail? Created attachment 152732 [details]
Log around the time the issue happens.
I am affected by this as well. It has happened to me twice, today and yesterday. If I open new windows, they are entirely black, and after a few seconds the system appears to freeze (with the cursor still moving, though). In today's case, this happened right after I had opened Vivaldi.
The only thing I could do was to log into a TTY, do a "kill -9" to the KWin process and restart it.
Both yesterday and today I was running relatively low on memory, with ~13 GB out of 15 GB used. It seems like there is a connection to low-memory situations as I, too, see these messages in the log:
Oct 12 09:31:43 Sleipnir kwin_x11[2178]: qt.qpa.xcb: xcb_shm_create_segment() failed for size 8288
Oct 12 09:32:15 Sleipnir yakuake[2270]: qt.qpa.xcb: xcb_shm_create_segment() failed for size 6312960
Linux: KDE neon
KDE Plasma version: 5.25.5
KDE Frameworks version: 5.98.0
Qt version: 5.15.6
GPU: AMD Vega 8
I have also been affected by this issue. This has been happening for around 4 weeks now. Mostly for me, it happens when I am alt-tabbing, or when hovering over window previews etc. Linux: Arch KDE Plasma version: 5.26.2 KDE Frameworks version: 5.99.0 Qt version: 5.15.7 GPU: AMD Vega 7 Operating System: openSUSE Tumbleweed 20221031 KDE Plasma Version: 5.26.2 KDE Frameworks Version: 5.99.0 Qt Version: 5.15.6 Kernel Version: 6.0.5-1-default (64-bit) Graphics Platform: X11 Also affected by this issue, I have to open a new console session and send SIGKILL to kwin_x11, then my graphical session works again. (kwin_x11 won't respond to SIGTERM when in this frozen state) Operating System: Arch Linux KDE Plasma Version: 5.26.2 KDE Frameworks Version: 5.99.0 Qt Version: 5.15.7 Kernel Version: 6.0.6-arch1-1 (64-bit) Graphics Platform: X11 Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor Graphics Processor: AMD Radeon RX 6900 XT Same issue here. Killing plasmashell doesn't solve the issue, but killing kwin or restarting sddm does. Created attachment 153483 [details] Journal log and stack trace at time of freeze on Nov. 2, 2022 I am also affected by this frustrating annoyance, and it happens at least once per day. It usually occurs when I invoke the Alt-Tab switcher and switch to Firefox, and sometimes the only warning I get was the Task Switcher OSD suddenly appearing completely black. The random screen freezes began to appear on my system when I upgraded Frameworks from 5.98 to 5.99 last month, so I was able to reproduce it in both Plasma 5.25 and 5.26. And as others here have said, killing kwin_x11 in a TTY with SIGKILL made my desktop session usable again. As another workaround, I made a Systemd user timer that periodically kills KWin and restarts its service (in my case, plasma-kwin_x11.service) after every 6 hours or so. Initially, I set the timer interval to 12 hours, but the freezes would still occur before those 12 hours have passed. For future KWin freeze episodes before the timer runs out, I created a global shortcut that does the same thing. It's set to Ctrl+Alt+Shift+K, and the command for that is currently `nohup sh -c "systemctl --user kill --signal=KILL plasma-kwin_x11.service && systemctl --user start plasma-kwin_x11.service"`. While KWin restarting automatically can be inconvenient, it is certainly better for me than having to deal with the random freezes manually. Before I found this bug ticket just recently, I reported all my observations in bug #460594 because I once thought that Plasmashell was the cause, but in the end, I narrowed down the offending component to KWin. A couple of days ago, I was able to generate a stack trace and coredump using `pkill -ILL kwin_x11` during one of those random freeze episodes (see attachments). Since the coredump is way too big to upload here, I made it available in the following link: https://drive.google.com/file/d/1tg25SXZi3O3li7LrI_LD7ZE-asbVsCmk/view?usp=sharing Operating System: Manjaro Linux KDE Plasma Version: 5.26.2 (and also on 5.25.5) KDE Frameworks Version: 5.99.0 Qt Version: 5.15.6 Kernel Version: 6.0.5-1-MANJARO (64-bit) (and also with 5.15.75-1-MANJARO) Graphics Platform: X11 Processors: 12 × AMD Ryzen 5 1600 Six-Core Processor Memory: 31.3 GiB of RAM Graphics Processor: AMD Radeon RX 570 Series Window Decoration: Klassy (also occurs with the default Breeze theme) Task Switcher: Thumbnail Grid (also occurs with other task switchers that don't render thumbnails like Compact) Mesa Version: 22.2.1 Firefox Version: 106.0.2 (also occurred with 105.0.3) Also affected. Since this seems to have started with frameworks 5.99, here is one potentially relevant commit in kwindowsystem: https://invent.kde.org/frameworks/kwindowsystem/-/commit/acf85e40ff6fa14d90cffe6107f188c85b03d244 "Remove QWindow::isExposed() check in activateWindow()" Operating System: Arch Linux KDE Plasma Version: 5.26.2 KDE Frameworks Version: 5.99.0 Qt Version: 5.15.7 Kernel Version: 5.15.76-1-lts (64-bit) Graphics Platform: X11 Graphics: Intel (In reply to Paul from comment #14) > Also affected. Since this seems to have started with frameworks 5.99, here > is one potentially relevant commit in kwindowsystem: > https://invent.kde.org/frameworks/kwindowsystem/-/commit/ > acf85e40ff6fa14d90cffe6107f188c85b03d244 > "Remove QWindow::isExposed() check in activateWindow()" > I can still reproduce the bug with that commit reverted, so it doesn't seem to be related. Unfortunately I can't systematically perform a git bisect (or even downgrade individual frameworks packages to figure out which one is responsible) since I could not figure out how to downgrade only a single frameworks package without downgrading all the other frameworks as well. I'm experimenting with reverting various likely-looking commits (I'm looking at plasma-framework right now), but it is a slow process since it takes a day or so for the issue to show up on my system. I am also affected by this bug. Found this bug report earlier, but reporting this since my kwin crashed 5 times in the last hour, which makes it unusable on a "work" machine. Was happy with KDE on Debian Stable, but had to upgrade to Debian Testing because of recent hardware in a new laptop. And from then, I have this issue. Restarting kwin seems to help to continue working without losing my session, but it seems that the more I need to restart it, the more it crashes. I use the following to restart it. systemctl --user kill --signal=KILL plasma-kwin_x11.service && systemctl --user start plasma-kwin_x11.service Operating System: Debian Linux (testing) KDE Plasma Version: 5.26.3 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.6 Kernel Version: 6.0.8 (Debian linux kernel 6.0.0-4-amd64) Graphics Platform: X11 Graphics: Intel UHD Graphics 770 (In reply to ruben.vandeginste from comment #16) > Restarting kwin seems to help to continue working without losing my session, > but it seems that the more I need to restart it, the more it crashes. I use > the following to restart it. > > systemctl --user kill --signal=KILL plasma-kwin_x11.service && systemctl > --user start plasma-kwin_x11.service Hello, I experienced the same, sometimes restarting also plasmashell helped stop kwin_x11 from crashing so you may try that. Also, check bug https://bugs.kde.org/show_bug.cgi?id=460594 which might be related. BTW, should we move this bug to CONFIRMED already? Forgot to provide my system info: Operating System: Slackware64 15.0+ (-current) KDE Plasma Version: 5.26.3 KDE Frameworks Version: 5.100.0 Qt Version: 5.15.7 Kernel Version: 5.19.17 (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i5-1035G1 CPU @ 1.00GHz Memory: 15.2 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics Manufacturer: LENOVO Product Name: 81YK System Version: IdeaPad 5 15IIL05 Further evidence supporting Ralf Jung's xcb_shm_create_segment() post: Launching kompare resulted in a black window and qt.qpa.xcb: xcb_shm_create_segment() failed for size 32225280 then opening a popup menu resulted in a black window and another xcb_shm_create_segment() failed. About one minute later kwin froze. So how can one track xcb shm segments? Somewhat more concrete data: grep memfd:xshmfence /proc/$(pidof kwin_x11)/maps | wc If I alt-tab quickly, the count does not change. However if I keep alt held long enough for the thumbnails of open windows to appear, then the count increases by 2. In my current session the count has increased from 49 to 93. (In reply to Paul from comment #20) > Somewhat more concrete data: > grep memfd:xshmfence /proc/$(pidof kwin_x11)/maps | wc > If I alt-tab quickly, the count does not change. However if I keep alt held > long enough for the thumbnails of open windows to appear, then the count > increases by 2. In my current session the count has increased from 49 to 93. Related to bug 462202? Hello, I seems I face the same bug. At least I have the same symptoms. After digging, I found this: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7674 affecting mesa 22.2 After reverting the 2 involved commits, it looks this crash does not occur any more. I'm sorry, I actually fixed the issues and I forgot to mention it here. I found out that downgrading Mesa to 22.1 actually made the issue go away, whereas with Mesa 22.2 it was constantly happening. What version of Mesa are people who can still reproduce this using? I'm using Mesa version: 22.2.3 and the bug always occurs when a notification is being sent via KDE plasma notifications. When disabling all notifications (by turning on "do not disturb" until i enable it again and also disabling progress notification pop-ups, my system keeps running stable for weeks again. (In reply to Riccardo Robecchi from comment #23) > I'm sorry, I actually fixed the issues and I forgot to mention it here. I > found out that downgrading Mesa to 22.1 actually made the issue go away, > whereas with Mesa 22.2 it was constantly happening. What version of Mesa are > people who can still reproduce this using? I was on 22.2.3. Just downgraded to 22.1.7 and I'll see if it still reproduces. mesa 22.2.4 here, I'll see if I can downgrade to 22.1. Thanks Guillaume and Riccardo for tracking the issue! Two days with mesa 22.1.7 and not a single crash! Let's hope mesa 22.2 gets fixed soon. (In reply to jcfisher from comment #25) > I was on 22.2.3. Just downgraded to 22.1.7 and I'll see if it still > reproduces. While I haven't had any kwin crashes by downgrading, plasma still seems to crash with the same black notification box, but that's easily solved by restarting just plasmashell. Hello, I'm not sure if it's related but today I upgraded opensuse leap 15.4 to: – plasma 5.26.4 – kde gear 22.12.0 Everything went fine until I logged out and logged back in. The plasma desktop seemed to take a long time to load ; I launched kontact by clicking on the shortcut pinned to the taskbar and then I got an error message. kontact[5321]: org.kde.pim.kontactinterface: "Unable to load plug-in from /usr/lib64/qt5/plugins/kmailpart.so: Unable to load library /usr/lib64/qt5/plugins/kmailpart.so: (/usr/lib64/libqgpgme.so.15 : undefined symbol:_ZN5GpgME7Context10importKeysERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE)" And on top of that, the window had no title bar and seemed taped in place... I launched Kate to see and same thing: no title bar and no possibility to move the window. I find this into /var/log/messages kwin_x11[3103]: XIO: fatal IO error 0 (Succès) on X server ":0" kwin_x11[3103]: after 1193802 requests (1193782 known processed) with 0 events remaining. kwin_x11[3103]: The X11 connection broke: I/O error (code 1) Alfheimr systemd[2638]: plasma-kwin_x11.service: Main process exited, code=exited, status=1/FAILURE systemd[2638]: plasma-kwin_x11.service: Failed with result 'exit-code'. Alfheimr kwin_x11[22431]: /usr/bin/kwin_x11: symbol lookup error: /usr/lib64/libkwin.so.5: undefined symbol: drmModeFormatModifierBlobIterNext I rebooted and did a little sudo snapper rollback. No more problems. I deduce that the bug(s) are hidden among plasma 5.24.4, KF 5.100, KDE Gear 22.12.0 and Qt 5.15.7. It's like looking for a needle in four haystacks If anyone has an idea of the cause of this fantasy, which seems to me to be somehow related to kwin_x11, thank you in advance. For info my current config : Operating System: openSUSE Leap 15.4 KDE Plasma Version: 5.26.3 KDE Frameworks Version: 5.100.0 Qt Version: 5.15.7 Kernel Version: 5.14.21-150400.24.33-default (64-bit) Graphics Platform: X11 Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz Memory: 15.4 Gio of RAM Graphics Processor: Mesa Intel® Xe Graphics Manufacturer: Notebook Product Name: NLx0MU System Version: Not Applicable (In reply to Olivier BELLEUX from comment #29) > Hello, > > I'm not sure if it's related but today I upgraded opensuse leap 15.4 to: > – plasma 5.26.4 > – kde gear 22.12.0 > > Everything went fine until I logged out and logged back in. > > The plasma desktop seemed to take a long time to load ; I launched kontact > by clicking on the shortcut pinned to the taskbar and then I got an error > message. > > kontact[5321]: org.kde.pim.kontactinterface: "Unable to load plug-in from > /usr/lib64/qt5/plugins/kmailpart.so: Unable to load library > /usr/lib64/qt5/plugins/kmailpart.so: (/usr/lib64/libqgpgme.so.15 : undefined > symbol: > _ZN5GpgME7Context10importKeysERKSt6vectorINSt7__cxx1112basic_stringIcSt11char > _traitsIcESaIcEEESaIS7_EE)" > > And on top of that, the window had no title bar and seemed taped in place... > > I launched Kate to see and same thing: no title bar and no possibility to > move the window. > > I find this into /var/log/messages > > kwin_x11[3103]: XIO: fatal IO error 0 (Succès) on X server ":0" > kwin_x11[3103]: after 1193802 requests (1193782 known processed) with > 0 events remaining. > kwin_x11[3103]: The X11 connection broke: I/O error (code 1) > Alfheimr systemd[2638]: plasma-kwin_x11.service: Main process exited, > code=exited, status=1/FAILURE > systemd[2638]: plasma-kwin_x11.service: Failed with result 'exit-code'. > Alfheimr kwin_x11[22431]: /usr/bin/kwin_x11: symbol lookup error: > /usr/lib64/libkwin.so.5: undefined symbol: drmModeFormatModifierBlobIterNext > > I rebooted and did a little sudo snapper rollback. No more problems. > > I deduce that the bug(s) are hidden among plasma 5.24.4, KF 5.100, KDE Gear > 22.12.0 and Qt 5.15.7. It's like looking for a needle in four haystacks > > If anyone has an idea of the cause of this fantasy, which seems to me to be > somehow related to kwin_x11, thank you in advance. > > For info my current config : > > Operating System: openSUSE Leap 15.4 > KDE Plasma Version: 5.26.3 > KDE Frameworks Version: 5.100.0 > Qt Version: 5.15.7 > Kernel Version: 5.14.21-150400.24.33-default (64-bit) > Graphics Platform: X11 > Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz > Memory: 15.4 Gio of RAM > Graphics Processor: Mesa Intel® Xe Graphics > Manufacturer: Notebook > Product Name: NLx0MU > System Version: Not Applicable Hello BELLEUX, that seems to be something completely different from this issue. Please open a new issue. Kind regards Marking as an upstream bug as per https://bugs.kde.org/show_bug.cgi?id=457847#c22 *** Bug 464732 has been marked as a duplicate of this bug. *** *** Bug 466317 has been marked as a duplicate of this bug. *** This happened to me today upon clicking to switch to a different application. I could still scroll in the open window but could not switch to any other window with either the mouse or Alt-tab. The taskbar clock continued to update properly. I had to ctrl-alt-f2 to switch to the terminal and kill -9 on the kwin_x11 process in order to recover (just doing kill on the process did nothing). I see this bug proposes that this is fixed with Mesa 22.3.0, however my system is Debian 12 and running Mesa 22.3.6 and Plasma 5.27.5. I'd like to add that the problem still persists on Plasma 6. |