https://bugs.kde.org/show_bug.cgi?id=465456

            Bug ID: 465456
           Summary: kwin_wayland often crashed when used as the sddm
                    Wayland compositor and logging out of Plasma resulting
                    in a black screen
    Classification: Plasma
           Product: kwin
           Version: 5.26.90
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: matt.fagn...@bell.net
  Target Milestone: ---

Created attachment 156057
  --> https://bugs.kde.org/attachment.cgi?id=156057&action=edit
Full trace of all threads of kwin_wayland crash when logging out of Plasma as
sddm Wayland compositor

SUMMARY

I started Plasma 5.26.90 on Wayland in GNOME Boxes QEMU/KVM VMs using the
Fedora Rawhide live image Fedora-KDE-Live-x86_64-Rawhide-20230207.n.0.iso (and
earlier) with 3D acceleration disabled using the llvmpipe mesa driver from mesa
22.3.3 (or 3D acceleration enabled using the virgl mesa driver). I disabled
automatic login from sddm in System Settings. I logged out from the Application
Launcher menu. kwin_wayland often crashed when used as the sddm Wayland
compositor when logging out resulting in a black screen with a flashing text
cursor appearing instead of sddm. The crashes occurred in
KWin::Workspace::geometry and might've been null pointer dereferences since
this=0x0.

Core was generated by `/usr/bin/kwin_wayland --no-lockscreen --inputmethod
maliit-keyboard --locale1'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  KWin::Workspace::geometry (this=0x0) at
/usr/src/debug/kwin-5.26.90-1.fc38.x86_64/src/workspace.cpp:2671
2671        return m_geometry;
[Current thread is 1 (Thread 0x7f250aaaae40 (LWP 3986))]

(gdb) bt
#0  KWin::Workspace::geometry (this=0x0) at
/usr/src/debug/kwin-5.26.90-1.fc38.x86_64/src/workspace.cpp:2671
#1  0x00007f250b5c4f61 in KWin::LibInput::Connection::processEvents
(this=0x55ed1ebd4000)
    at
/usr/src/debug/kwin-5.26.90-1.fc38.x86_64/src/backends/libinput/connection.cpp:376
#2  0x00007f2509adefdb in QObject::event (this=0x55ed1ebc0fd0,
e=0x7f24e40056d0) at kernel/qobject.cpp:1347
#3  0x00007f2508faece5 in QApplicationPrivate::notify_helper (this=<optimized
out>, receiver=0x55ed1ebc0fd0, 
    e=0x7f24e40056d0) at kernel/qapplication.cpp:3640
#4  0x00007f2509ab35e8 in QCoreApplication::notifyInternal2
(receiver=0x55ed1ebc0fd0, event=0x7f24e40056d0)
    at kernel/qcoreapplication.cpp:1064
#5  0x00007f2509ab6a95 in QCoreApplicationPrivate::sendPostedEvents
(receiver=receiver@entry=0x0, 
    event_type=event_type@entry=0, data=data@entry=0x55ed1eb2abc0) at
kernel/qcoreapplication.cpp:1821
#6  0x00007f2509b03311 in QEventDispatcherUNIX::processEvents
(this=0x55ed1eb2d940, flags=...)
    at kernel/qeventdispatcher_unix.cpp:468
#7  0x000055ed1e4a0041 in
QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
()
#8  0x00007f2509ab1fbb in QEventLoop::exec (this=this@entry=0x7ffc15e20460,
flags=..., flags@entry=...)
    at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#9  0x00007f2509aba23b in QCoreApplication::exec ()
    at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#10 0x00007f2509f5f5bd in QGuiApplication::exec () at
kernel/qguiapplication.cpp:1863
#11 0x00007f2508faec59 in QApplication::exec () at kernel/qapplication.cpp:2832
#12 0x000055ed1e3bcc24 in main (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/kwin-5.26.90-1.fc38.x86_64/src/main_wayland.cpp:628

I'm attaching the full trace of all threads.  This problem seemed to start
after the update to sddm-0.19.0^git20230201.3ee57e9-2.fc38
https://koji.fedoraproject.org/koji/buildinfo?buildID=2145291 which fixed a
problem where logging out of Plasma on Wayland to sddm on Wayland would show a
text console instead of sddm
https://bugzilla.redhat.com/show_bug.cgi?id=2110801 That problem might have
been masking this one. 

This problem happened most of the times I logged out of Plasma to sddm in
recent Fedora Rawhide KDE Plasma VMs. sddm occasionally appeared with a
different looking theme where the user icon and password box were at the right
side of the screen and the Desktop selection and options to reboot and shutdown
were in a bar at the top of the screen

kwin_wayland sometimes crashed 1-10 times when Plasma started in similar VMs
with the same type of trace. Plasma appeared in such cases unless kwin_wayland
crashed 10 times and systemd stopped trying to start kwin_wayland.

This type of crash didn't seem to happen on bare metal with on a laptop with an
AMD A10-9620P CPU and an integrated AMD Radeon R5 GPU using the radeonsi mesa
driver and amdgpu kernel driver. The problem might be specific to running in
VMs

STEPS TO REPRODUCE
1. Boot a Fedora 37 KDE Plasma installation updated to 2023-2-7 with
updates-testing enabled
2. Log in to Plasma on Wayland
3. Download Fedora-KDE-Live-x86_64-Rawhide-20230207.n.0.iso from
https://koji.fedoraproject.org/koji/buildinfo?buildID=2147622 
4. Install GNOME Boxes if it isn't already with sudo dnf install gnome-boxes
5. Start GNOME Boxes
6. boot the Fedora Rawhide live image
Fedora-KDE-Live-x86_64-Rawhide-20230207.n.0.iso in a GNOME Boxes QEMU/KVM VM
with 3D acceleration disabled using the llvmpipe driver, EFI enabled, and 3 GB
RAM
7. Start System Settings in Plasma 5.26.90 on Wayland
8. Click Startup and Shutdown in the menu on the left of System Settings
9. Click Behavior in the Startup and Shutdown > Login Screen (SDDM) screen
10. Remove the check mark for Automatically log in
11. Click Apply
12. Close System Settings
13. Click the Application Launcher menu button at the bottom left of the screen
14. Click the Leave button in the Application Launcher menu
15. Click Log out
16. Select OK to Log out
17. If the kwin_wayland crash didn't happen, log in to Plasma and log out as
above until it does

OBSERVED RESULT
kwin_wayland often crashed when used as the sddm Wayland compositor when
logging out of Plasma resulting in a black screen

EXPECTED RESULT
kwin_wayland wouldn't crash and sddm would appear normally every time.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Rawhide/38
(available in About System)
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

When booting the Fedora Rawhide live image
Fedora-KDE-Live-x86_64-Rawhide-20230202.n.0.iso with mesa-23.0.0~rc4-1.fc38 in
a GNOME Boxes QEMU/KVM VM with 3D acceleration disabled using the llvmpipe
driver, kwin_wayland crashed 10 times in a row as I reported at
https://bugs.kde.org/show_bug.cgi?id=465284 I ran startx & from another VT.
Plasma on X ran normally. I disabled automatic login from sddm in System
Settings and logged out. kwin_wayland on Wayland as the sddm compositor crashed
with the type of trace at https://bugs.kde.org/show_bug.cgi?id=465284 after
logging out. The black screen problem with the flashing text cursor at the top
left happened. mesa-23.0.0~rc4-1.fc38 was untagged from Rawhide due to this
problem https://pagure.io/releng/issue/11247 so later images might have
mesa-22.3.3-3.fc38 and so would have kwin_wayland crashes in
KWin::Workspace::geometry.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to