Bug 460336 - kwin_wayland lockup / black screen / clients disconnected
Summary: kwin_wayland lockup / black screen / clients disconnected
Status: RESOLVED DUPLICATE of bug 460513
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git-stable-Plasma/5.26
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-13 03:02 UTC by Jason Playne
Modified: 2022-10-17 10:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
sddm wayland-session.log (150.98 KB, text/x-log)
2022-10-13 03:49 UTC, Jason Playne
Details
output of gdb (10.16 KB, text/plain)
2022-10-13 08:21 UTC, Jason Playne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Playne 2022-10-13 03:02:38 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

Just had a segfault crash in kwin_wayland in 5.26 

I was working away (Typing PhpStorm) when the screen went black and I had a movable cursor


STEPS TO REPRODUCE
1. ?
2. ?
3. ?

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  
Operating System: KDE neon 5.26
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 6.0.1-060001-generic (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3800X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX Vega

ADDITIONAL INFORMATION

The only useful thing I could find is in dmesg
[16504.265944] kwin_wayland[43937]: segfault at 10 ip 00007f220cb74ade sp 00007ffcd7b23090 error 4 in libc-2.31.so[7f220caff000+178000]
[16504.265956] Code: 00 41 be 02 00 00 00 b8 80 00 00 00 41 bd 20 00 00 00 48 01 d8 4c 8b 40 08 48 8d 48 f0 4c 39 c1 0f 84 6e 03 00 00 49 8b 50 18 <4c> 39 42 10 0f 85 50 0a 00 00 4c 8d 0d 91 50 15 00 4b 83 4c 28 08

I was not prompted by a crash reporting tool after logging back in

(recovery was restarting sddm and logging back in)
Comment 1 Jason Playne 2022-10-13 03:08:29 UTC
it appears this segfault didn't create a core dump?

$ coredumpctl
No coredumps found.
Comment 2 Jason Playne 2022-10-13 03:49:18 UTC
Created attachment 152759 [details]
sddm wayland-session.log

This is the second crash in kwin_wayland

Before restarting sddm I saved the ssdm wayland-session.log and have attached it here for you.

You can see PhpStorm complaining about some stuff (\Traversable, \Doctrine* stuff) and what happens when it goes bang
Comment 3 Vlad Zahorodnii 2022-10-13 07:30:52 UTC
We can't do anything about this bug report without a backtrace or reproducible steps to reproduce the crash.
Comment 4 Jason Playne 2022-10-13 08:19:42 UTC
(In reply to Vlad Zahorodnii from comment #3)
> We can't do anything about this bug report without a backtrace or
> reproducible steps to reproduce the crash.

I understand, I am trying to figure out how to do  it.

It's just happened a 3rd time, the kwin_wayland process is still there this time
Comment 5 Jason Playne 2022-10-13 08:21:42 UTC
Created attachment 152762 [details]
output of gdb

Output of using the command from https://community.kde.org/KWin/Debugging#Debug_KWin_with_GDB

sudo gdb -pid $(pidof kwin_wayland) -batch -ex "set logging file kwin_wayland.gdb" -ex "set logging on" -ex "continue" -ex "thread apply all backtrace" -ex "quit"

note: This was run a few minutes *after* the sudden black screen with movable mouse cursor.
Comment 6 Jason Playne 2022-10-13 08:33:02 UTC
Unsure if this is related - it appears in the systemd logs around the time of the sddm restart (which is around 20 minutes after the "crash"?)

Oct 13 16:24:06 jason-desktop systemd-coredump[94616]: Process 94612 (xdg-desktop-por) of user 117 dumped core.

Stack trace of thread 94612:
#0  0x00007f96af46f00b __GI_raise (libc.so.6 + 0x4300b)
#1  0x00007f96af44e859 __GI_abort (libc.so.6 + 0x22859)
#2  0x00007f96af892bd9 qt_message_fatal (libQt5Core.so.5 + 0x92bd9)
#3  0x00007f96b0739d9b init_platform (libQt5Gui.so.5 + 0x139d9b)
#4  0x00007f96b073a218 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x13a218)
#5  0x00007f96afabbb06 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x2bbb06)
#6  0x00007f96b073d333 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x13d333)
#7  0x00007f96b15741bd _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5 + 0x1741bd)
#8  0x000055ffc4a71f55 n/a (xdg-desktop-portal-kde + 0x26f55)
#9  0x00007f96af450083 __libc_start_main (libc.so.6 + 0x24083)
#10 0x000055ffc4a7229e n/a (xdg-desktop-portal-kde + 0x2729e)

Stack trace of thread 94613:
#0  0x00007f96af53e99f __GI___poll (libc.so.6 + 0x11299f)
#1  0x00007f96addd736e n/a (libglib-2.0.so.0 + 0x5236e)
#2  0x00007f96addd74a3 g_main_context_iteration (libglib-2.0.so.0 + 0x524a3)
#3  0x00007f96afb0fb82 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5 + 0x30fb82)
#4  0x00007f96afab3b3b _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2b3b3b)
#5  0x00007f96af8cd342 _ZN7QThread4execEv (libQt5Core.so.5 + 0xcd342)
#6  0x00007f96b057af4b n/a (libQt5DBus.so.5 + 0x18f4b)
#7  0x00007f96af8ce543 _ZN14QThreadPrivate5startEPv (libQt5Core.so.5 + 0xce543)
#8  0x00007f96b137f609 start_thread (libpthread.so.0 + 0x8609)
#9  0x00007f96af54b133 __clone (libc.so.6 + 0x11f133)
Comment 7 Jason Playne 2022-10-13 09:11:21 UTC
also, any help on how to get info out of a hung process would be nice
Comment 8 Jason Playne 2022-10-17 00:20:58 UTC

*** This bug has been marked as a duplicate of bug 460513 ***
Comment 9 space9301 2022-10-17 08:30:52 UTC
(In reply to Jason Playne from comment #1)
> it appears this segfault didn't create a core dump?
> 
> $ coredumpctl
> No coredumps found.

Do you have core dumps enabled? If coredumpctl still returns the same result, they might be disabled.
Places to check: https://wiki.archlinux.org/title/Core_dump, https://linux-audit.com/understand-and-configure-core-dumps-work-on-linux/
- sysctl kernel.core_pattern
- /usr/lib/sysctl.d/50-coredump.conf
- ulimit -c
Comment 10 Jason Playne 2022-10-17 10:39:53 UTC
i have managed to find a coredump

           PID: 248057 (plasmashell)
           UID: 1000 (jason)
           GID: 1000 (jason)
        Signal: 6 (ABRT)
     Timestamp: Sat 2022-10-15 11:20:36 AWST (2 days ago)
  Command Line: plasmashell --replace
    Executable: /usr/bin/plasmashell
 Control Group: /user.slice/user-1000.slice/session-171.scope
          Unit: session-171.scope
         Slice: user-1000.slice
       Session: 171
     Owner UID: 1000 (jason)
       Boot ID: 9123c4115a9743108f1f78feb5e71e19
    Machine ID: 0b8920f9b79a4d7aa86de3faed35fe2d
      Hostname: jason-desktop
       Storage: /var/lib/systemd/coredump/core.plasmashell.1000.9123c4115a9743108f1f78feb5e71e19.248057.1665804036000000000000.lz4
       Message: Process 248057 (plasmashell) of user 1000 dumped core.

                Stack trace of thread 248057:
                #0  0x00007fb5b8a6f00b __GI_raise (libc.so.6 + 0x4300b)
                #1  0x00007fb5b8a4e859 __GI_abort (libc.so.6 + 0x22859)
                #2  0x00007fb5b8e92bd9 qt_message_fatal (libQt5Core.so.5 + 0x92bd9)
                #3  0x00007fb5b9539d9b init_platform (libQt5Gui.so.5 + 0x139d9b)
                #4  0x00007fb5b953a218 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x13a218)
                #5  0x00007fb5b90bbb06 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x2bbb06)
                #6  0x00007fb5b953d333 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x13d333)
                #7  0x00007fb5b9f741bd _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5 + 0x1741bd)
                #8  0x000055b198773a0d main (plasmashell + 0x28a0d)
                #9  0x00007fb5b8a50083 __libc_start_main (libc.so.6 + 0x24083)
                #10 0x000055b19877491e _start (plasmashell + 0x2991e)

                Stack trace of thread 248058:
                #0  0x00007fb5b8b3e99f __GI___poll (libc.so.6 + 0x11299f)
                #1  0x00007fb5b754336e n/a (libglib-2.0.so.0 + 0x5236e)
                #2  0x00007fb5b75434a3 g_main_context_iteration (libglib-2.0.so.0 + 0x524a3)
                #3  0x00007fb5b910fb82 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5 + 0x30fb82)
                #4  0x00007fb5b90b3b3b _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2b3b3b)
                #5  0x00007fb5b8ecd342 _ZN7QThread4execEv (libQt5Core.so.5 + 0xcd342)
                #6  0x00007fb5b9c9ef4b n/a (libQt5DBus.so.5 + 0x18f4b)
                #7  0x00007fb5b8ece543 _ZN14QThreadPrivate5startEPv (libQt5Core.so.5 + 0xce543)
                #8  0x00007fb5bb185609 start_thread (libpthread.so.0 + 0x8609)
                #9  0x00007fb5b8b4b133 __clone (libc.so.6 + 0x11f133)
Comment 11 Jason Playne 2022-10-17 10:44:04 UTC
oh and following the documentation I get a slightly more rich output


jason@jason-desktop:~ $ coredumpctl gdb /usr/bin/plasmashell
           PID: 248057 (plasmashell)
           UID: 1000 (jason)
           GID: 1000 (jason)
        Signal: 6 (ABRT)
     Timestamp: Sat 2022-10-15 11:20:36 AWST (2 days ago)
  Command Line: plasmashell --replace
    Executable: /usr/bin/plasmashell
 Control Group: /user.slice/user-1000.slice/session-171.scope
          Unit: session-171.scope
         Slice: user-1000.slice
       Session: 171
     Owner UID: 1000 (jason)
       Boot ID: 9123c4115a9743108f1f78feb5e71e19
    Machine ID: 0b8920f9b79a4d7aa86de3faed35fe2d
      Hostname: jason-desktop
       Storage: /var/lib/systemd/coredump/core.plasmashell.1000.9123c4115a9743108f1f78feb5e71e19.248057.1665804036000000000000.lz4
       Message: Process 248057 (plasmashell) of user 1000 dumped core.

                Stack trace of thread 248057:
                #0  0x00007fb5b8a6f00b __GI_raise (libc.so.6 + 0x4300b)
                #1  0x00007fb5b8a4e859 __GI_abort (libc.so.6 + 0x22859)
                #2  0x00007fb5b8e92bd9 qt_message_fatal (libQt5Core.so.5 + 0x92bd9)
                #3  0x00007fb5b9539d9b init_platform (libQt5Gui.so.5 + 0x139d9b)
                #4  0x00007fb5b953a218 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x13a218)
                #5  0x00007fb5b90bbb06 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x2bbb06)
                #6  0x00007fb5b953d333 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x13d333)
                #7  0x00007fb5b9f741bd _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5 + 0x1741bd)
                #8  0x000055b198773a0d main (plasmashell + 0x28a0d)
                #9  0x00007fb5b8a50083 __libc_start_main (libc.so.6 + 0x24083)
                #10 0x000055b19877491e _start (plasmashell + 0x2991e)

                Stack trace of thread 248058:
                #0  0x00007fb5b8b3e99f __GI___poll (libc.so.6 + 0x11299f)
                #1  0x00007fb5b754336e n/a (libglib-2.0.so.0 + 0x5236e)
                #2  0x00007fb5b75434a3 g_main_context_iteration (libglib-2.0.so.0 + 0x524a3)
                #3  0x00007fb5b910fb82 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5 + 0x30fb82)
                #4  0x00007fb5b90b3b3b _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2b3b3b)
                #5  0x00007fb5b8ecd342 _ZN7QThread4execEv (libQt5Core.so.5 + 0xcd342)
                #6  0x00007fb5b9c9ef4b n/a (libQt5DBus.so.5 + 0x18f4b)
                #7  0x00007fb5b8ece543 _ZN14QThreadPrivate5startEPv (libQt5Core.so.5 + 0xce543)
                #8  0x00007fb5bb185609 start_thread (libpthread.so.0 + 0x8609)
                #9  0x00007fb5b8b4b133 __clone (libc.so.6 + 0x11f133)

GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/plasmashell...
Reading symbols from /usr/lib/debug/.build-id/22/87b8620679417738a0acf1dba04885bb86a4bb.debug...
[New LWP 248057]
[New LWP 248058]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `plasmashell --replace'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7fb5b4f572c0 (LWP 248057))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007fb5b8a4e859 in __GI_abort () at abort.c:79
#2  0x00007fb5b8e92bd9 in qt_message_fatal (context=..., message=<synthetic pointer>...) at global/qlogging.cpp:1914
#3  QMessageLogger::fatal (this=this@entry=0x7ffecbcb36f0, msg=msg@entry=0x7fb5b99f9a05 "%s") at global/qlogging.cpp:893
#4  0x00007fb5b9539d9b in init_platform (argv=<optimised out>, argc=@0x7ffecbcb395c: 2, platformThemeName=..., platformPluginPath=..., pluginNamesWithArguments=...)
    at ../../include/QtCore/../../src/corelib/tools/qarraydata.h:209
#5  QGuiApplicationPrivate::createPlatformIntegration (this=0x55b199512d60) at kernel/qguiapplication.cpp:1484
#6  0x00007fb5b953a218 in QGuiApplicationPrivate::createEventDispatcher (this=<optimised out>) at kernel/qguiapplication.cpp:1501
#7  0x00007fb5b90bbb06 in QCoreApplicationPrivate::init (this=this@entry=0x55b199512d60) at kernel/qcoreapplication.cpp:853
#8  0x00007fb5b953d333 in QGuiApplicationPrivate::init (this=this@entry=0x55b199512d60) at kernel/qguiapplication.cpp:1530
#9  0x00007fb5b9f741bd in QApplicationPrivate::init (this=0x55b199512d60) at kernel/qapplication.cpp:513
#10 0x000055b198773a0d in main (argc=<optimised out>, argv=0x7ffecbcb3b48) at ./shell/main.cpp:75
Comment 12 Jason Playne 2022-10-17 10:46:07 UTC
(In reply to space9301 from comment #9)
> (In reply to Jason Playne from comment #1)
> > it appears this segfault didn't create a core dump?
> > 
> > $ coredumpctl
> > No coredumps found.
> 
> Do you have core dumps enabled? If coredumpctl still returns the same
> result, they might be disabled.
> Places to check: https://wiki.archlinux.org/title/Core_dump,
> https://linux-audit.com/understand-and-configure-core-dumps-work-on-linux/
> - sysctl kernel.core_pattern
> - /usr/lib/sysctl.d/50-coredump.conf
> - ulimit -c

Thank you for the help, I did install coredumpctl after the first crashes, and one of of the subsequent ones did produce something. Thank you for making me look again!

Thank you!