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

            Bug ID: 463257
           Summary: kwin_wayland occasionally crashed in bool when used as
                    the sddm Wayland compositor
    Classification: Plasma
           Product: kwin
           Version: 5.26.4
          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: ---

SUMMARY

kwin_wayland crashed twice when used as the sddm Wayland compositor about 30-60
seconds after sddm started in a Fedora 37 KDE Plasma installation. The
sddm-wayland-plasma-5.26.4.1-1.fc37.noarch package had the configuration to use
kwin_wayland to run sddm on Wayland. This crash happened infrequently. The
trace showed a crash in bool with an invalid pointer this=0x38 which might've
been due to KWin::Output::modeSize() having this=0x0 in frame 1.

Core was generated by `/usr/bin/kwin_wayland --no-lockscreen --inputmethod
maliit-keyboard'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  std::__shared_ptr<KWin::OutputMode, (__gnu_cxx::_Lock_policy)2>::operator
bool (this=0x38)
    at /usr/include/c++/12/bits/shared_ptr_base.h:1669
1669          explicit operator bool() const noexcept
[Current thread is 1 (Thread 0x7ffb5b6b3980 (LWP 1092))]
(gdb) bt
#0  std::__shared_ptr<KWin::OutputMode, (__gnu_cxx::_Lock_policy)2>::operator
bool() const
    (this=0x38) at /usr/include/c++/12/bits/shared_ptr_base.h:1669
#1  KWin::Output::modeSize() const (this=0x0)
    at /usr/src/debug/kwin-5.26.4-1.fc37.x86_64/src/core/output.cpp:189
#2  0x00007ffb5c18bebb in KWin::LibInput::Connection::processEvents()
(this=0x561b46a144a0)
    at
/usr/src/debug/kwin-5.26.4-1.fc37.x86_64/src/backends/libinput/connection.cpp:347
#3  0x00007ffb5a6d2ec4 in QObject::event(QEvent*) (this=0x561b4697a560,
e=0x7ffb20006830)
    at kernel/qobject.cpp:1347
#4  0x00007ffb59daed12 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    (this=<optimized out>, receiver=0x561b4697a560, e=0x7ffb20006830) at
kernel/qapplication.cpp:3637
#5  0x00007ffb5a6a8278 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    (receiver=0x561b4697a560, event=0x7ffb20006830) at
kernel/qcoreapplication.cpp:1064
#6  0x00007ffb5a6ab5e4 in QCoreApplicationPrivate::sendPostedEvents(QObject*,
int, QThreadData*)
     (receiver=receiver@entry=0x0, event_type=event_type@entry=0,
data=data@entry=0x561b467b8fb0)
    at kernel/qcoreapplication.cpp:1821
#7  0x00007ffb5a6f68d5 in
QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
    (this=0x561b467bb910, flags=...) at kernel/qeventdispatcher_unix.cpp:468
#8  0x0000561b44a85b81 in
QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
()
#9  0x00007ffb5a6a6cca in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
    (this=this@entry=0x7fffb354b8d0, flags=..., flags@entry=...)
    at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#10 0x00007ffb5a6aed92 in QCoreApplication::exec() ()
--Type <RET> for more, q to quit, c to continue without paging--c
    at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#11 0x00007ffb5ab5fbe0 in QGuiApplication::exec() () at
kernel/qguiapplication.cpp:1863
#12 0x00007ffb59daec89 in QApplication::exec() () at
kernel/qapplication.cpp:2829
#13 0x0000561b449aada8 in main(int, char**) (argc=<optimized out>,
argv=<optimized out>) at
/usr/src/debug/kwin-5.26.4-1.fc37.x86_64/src/main_wayland.cpp:613

STEPS TO REPRODUCE
1. Boot a Fedora 37 KDE Plasma installation with
sddm-wayland-plasma-5.26.4.1-1.fc37.noarch to run sddm on Wayland with
kwin_wayland compositor
2. When sddm starts, wait a minute
3. If kwin_wayland doesn't crash, reboot 
4. Repeat 1-3 until the crash happens

OBSERVED RESULT
kwin_wayland occasionally crashed in bool when used as the sddm Wayland
compositor

EXPECTED RESULT
No crash would happen.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 37
(available in About System)
KDE Plasma Version: 5.26,4
KDE Frameworks Version: 5.101.1 
Qt Version: 5.15.7

ADDITIONAL INFORMATION

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

Reply via email to