Bug 435742 - [Plasma Mobile] kwin_wayland crashes in KWin::ApplicationWayland::performStartup()
Summary: [Plasma Mobile] kwin_wayland crashes in KWin::ApplicationWayland::performStar...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: git master
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-14 22:33 UTC by Richard Ullger
Modified: 2021-06-16 16:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
.xsession file copied from /home/richard/kde/src/kdesrc-build/sample-xsession.sh (modified) (2.11 KB, application/x-shellscript)
2021-04-14 22:33 UTC, Richard Ullger
Details
kde-env-master.sh file installed by kdesrc-build (4.28 KB, application/x-shellscript)
2021-04-14 22:35 UTC, Richard Ullger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Ullger 2021-04-14 22:33:51 UTC
Created attachment 137613 [details]
.xsession file copied from /home/richard/kde/src/kdesrc-build/sample-xsession.sh (modified)

SUMMARY
Attempting to test plasma mobile on a pinetab, built from git master using kdesrc-build.
I can run a plasma wayland session installed from the archlinuxarm repos without problem.


STEPS TO REPRODUCE
1. Build plasma and frameworks using kdesrc-build
2. Start a plasma mobile session

OBSERVED RESULT
Executing .xsession from console:
No backend specified through command line argument, trying auto resolution
Compositor crashed, respawning
(Repeats 10 times)
startplasmacompositor: Shutting down...
startplasmacompositor: Done.

Coredump in kwin_wayland

EXPECTED RESULT
Plasma mobile session should start

SOFTWARE/OS VERSIONS
Linux: Archlinux Arm linux-pine64 5.10.19-4
KDE Plasma Version: git master (kdesrc-build)
KDE Frameworks Version: git master (kdesrc-build)
Qt Version: 5.15.2 from archlinuxarm repos

ADDITIONAL INFORMATION

Specifically built as specified in https://community.kde.org/Get_Involved/development#Plasma plus any dependencies determined by kdesrc-build:
plasma-workspace plasma-framework plasma-nm plasma-pa plasma-workspace-wallpapers kdeplasma-addons krunner milou kwin kscreen breeze plasma-browser-integration xdg-desktop-portal-kde

Specifically built as specified in https://community.kde.org/Get_Involved/development#Plasma_Mobile plus any dependencies determined by kdesrc-build:
plasma-nano plasma-phone-components plasma-settings

Created /usr/share/wayland-sessions/kdesrc-build.desktop as specified in https://docs.kde.org/trunk5/en/kdesrc-build/kdesrc-build/environment.html
[Desktop Entry]
Type=XSession
Exec=/home/richard/.xsession
Name=Plasma Wayland (kdesrc-build)

.xsession file copied from /home/richard/kde/src/kdesrc-build/sample-xsession.sh (modified - see attached file)

.config/kde-env-master.sh installed by kdesrc-build
Comment 1 Richard Ullger 2021-04-14 22:35:22 UTC
Created attachment 137614 [details]
kde-env-master.sh file installed by kdesrc-build
Comment 2 Richard Ullger 2021-04-14 22:36:59 UTC
Backtrace

coredumpctl gdb 3831 
           PID: 3831 (kwin_wayland)
           UID: 1000 (richard)
           GID: 1000 (richard)
        Signal: 11 (SEGV)
     Timestamp: Wed 2021-04-14 22:22:43 BST (19min ago)
  Command Line: kwin_wayland --wayland_fd 4 --xwayland /home/richard/kde/usr/lib/libexec/startplasma-waylandsession
    Executable: /home/richard/kde/usr/bin/kwin_wayland
 Control Group: /user.slice/user-1000.slice/session-4.scope
          Unit: session-4.scope
         Slice: user-1000.slice
       Session: 4
     Owner UID: 1000 (richard)
       Boot ID: 87e81a0551f54891bf2f3f88edcc2fc2
    Machine ID: cbdca0011fc949b68c6fb34f1c74a5d0
      Hostname: richards-pinetab
       Storage: /var/lib/systemd/coredump/core.kwin_wayland.1000.87e81a0551f54891bf2f3f88edcc2fc2.3831.1618435363000000.zst (present)
     Disk Size: 1.1M
       Message: Process 3831 (kwin_wayland) of user 1000 dumped core.
                
                Stack trace of thread 3831:
                #0  0x0000000095e35154 n/a (n/a + 0x0)
                #1  0x0000aaaab46a13f8 n/a (n/a + 0x0)
                #2  0x0000aaaab469f7ac n/a (n/a + 0x0)
                #3  0x0000ffff9b934538 n/a (n/a + 0x0)
                #4  0x0000aaaab46a0124 n/a (n/a + 0x0)

GNU gdb (GDB) 10.1
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 "aarch64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://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 /home/richard/kde/usr/bin/kwin_wayland...
[New LWP 3831]
[New LWP 3832]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `kwin_wayland --wayland_fd 4 --xwayland /home/richard/kde/usr/lib/libexec/startp'.
Program terminated with signal SIGSEGV, Segmentation fault.
--Type <RET> for more, q to quit, c to continue without paging--
#0  0x0000000095e35154 in ?? ()
[Current thread is 1 (Thread 0xffff9782b490 (LWP 3831))]
(gdb) bt
#0  0x0000000095e35154 in  ()
#1  0x0000aaaab46a13f8 in KWin::ApplicationWayland::performStartup()
    (this=0xffffe7aef628)
    at /home/richard/kde/src/plasma/kwin/src/main_wayland.cpp:159
#2  0x0000aaaab469f7ac in main(int, char**)
    (argc=<optimized out>, argv=<optimized out>)
    at /home/richard/kde/src/plasma/kwin/src/main_wayland.cpp:800
(gdb)
Comment 3 Nate Graham 2021-04-15 17:59:48 UTC
Sadly the backtrace is useless. :( Perhaps it's been truncated. Can you try adding ExternalSizeMax=6G to /etc/systemd/coredump.conf and then get a new backtrace?

See also https://invent.kde.org/plasma/kwin/-/issues/33
Comment 4 Richard Ullger 2021-04-15 21:41:59 UTC
Needed (gdb) thread apply all bt full

coredumpctl gdb 3396
           PID: 3396 (kwin_wayland)
           UID: 1000 (richard)
           GID: 1000 (richard)
        Signal: 11 (SEGV)
     Timestamp: Thu 2021-04-15 21:21:04 BST (1h 14min ago)
  Command Line: kwin_wayland --wayland_fd 4 --xwayland /home/richard/kde/usr/lib/libexec/startplasma-waylandsession
    Executable: /home/richard/kde/usr/bin/kwin_wayland
 Control Group: /user.slice/user-1000.slice/session-3.scope
          Unit: session-3.scope
         Slice: user-1000.slice
       Session: 3
     Owner UID: 1000 (richard)
       Boot ID: 0cda462f126f472cb8d4ac870b350759
    Machine ID: cbdca0011fc949b68c6fb34f1c74a5d0
      Hostname: richards-pinetab
       Storage: /var/lib/systemd/coredump/core.kwin_wayland.1000.0cda462f126f472cb8d4ac870b350759.3396.1618518064000000.zst (present)
     Disk Size: 1.1M
       Message: Process 3396 (kwin_wayland) of user 1000 dumped core.
                
                Stack trace of thread 3396:
                #0  0x00000000bc1f5294 n/a (n/a + 0x0)
                #1  0x0000aaaacbf013f8 n/a (n/a + 0x0)
                #2  0x0000aaaacbeff7ac n/a (n/a + 0x0)
                #3  0x0000ffff83732538 n/a (n/a + 0x0)
                #4  0x0000aaaacbf00124 n/a (n/a + 0x0)

GNU gdb (GDB) 10.1
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 "aarch64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://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 /home/richard/kde/usr/bin/kwin_wayland...
[New LWP 3396]
[New LWP 3397]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `kwin_wayland --wayland_fd 4 --xwayland /home/richard/kde/usr/lib/libexec/startp'.
Program terminated with signal SIGSEGV, Segmentation fault.
--Type <RET> for more, q to quit, c to continue without paging--c
#0  0x00000000bc1f5294 in ?? ()
[Current thread is 1 (Thread 0xffff7f629490 (LWP 3396))]
(gdb) thread apply all bt full

Thread 2 (Thread 0xffff7e5bafe0 (LWP 3397)):
#0  0x0000ffff837d7e64 in poll () at /usr/lib/libc.so.6
#1  0x0000ffff873b2828 in  () at /usr/lib/libglib-2.0.so.0
#2  0x0000ffff873b29b4 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0                                                                              
#3  0x0000ffff842903d8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x0000ffff84221cf4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x0000ffff83ff8f84 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x0000ffff874df5ac in  () at /usr/lib/libQt5DBus.so.5
#7  0x0000ffff83ffa888 in  () at /usr/lib/libQt5Core.so.5
#8  0x0000ffff83cebf44 in start_thread () at /usr/lib/libpthread.so.0
#9  0x0000ffff837e195c in thread_start () at /usr/lib/libc.so.6

Thread 1 (Thread 0xffff7f629490 (LWP 3396)):
#0  0x00000000bc1f5294 in  ()
#1  0x0000aaaacbf013f8 in KWin::ApplicationWayland::performStartup() (this=0xffffd061eb08) at /home/richard/kde/src/plasma/kwin/src/main_wayland.cpp:159
#2  0x0000aaaacbeff7ac in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/richard/kde/src/plasma/kwin/src/main_wayland.cpp:800
        userSignals = {__val = {2560, 281474177821776, 187650543042848, 6, 7, 18--Type <RET> for more, q to quit, c to continue without paging--c
7650543236616, 5, 281474177821776, 187650543042848, 281474177821840, 281472887104736, 187650543042752, 0, 281474177821840, 281472887104764, 187650543042752}}
        environment = {d = {d = 0xaaaaf23b45c0}}
        a = {<KWin::ApplicationWaylandAbstract> = {<No data fields>}, static staticMetaObject = {d = {superdata = {direct = 0xffff8733e5b0 <KWin::ApplicationWaylandAbstract::staticMetaObject>}, stringdata = 0xaaaacbf5c1a8 <qt_meta_stringdata_KWin__ApplicationWayland>, data = 0xaaaacbf5c400 <qt_meta_data_KWin__ApplicationWayland>, static_metacall = 0xaaaacbf00210 <KWin::ApplicationWayland::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, m_startXWayland = true, m_applicationsToStart = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0xaaaaf2447800}, d = 0xaaaaf2447800}}, <No data fields>}, m_inputMethodServerToStart = {static null = {<No data fields>}, d = 0xffff8433a050 <QArrayData::shared_null>}, m_environment = {d = {d = 0xaaaaf23b45c0}}, m_sessionArgument = {static null = {<No data fields>}, d = 0xffff8433a050 <QArrayData::shared_null>}, m_inputMethodProcess = 0x0, m_inputMethodCrashTimer = <incomplete type>, m_inputMethodCrashes = 0, m_xwayland = 0x0, m_settingsWatcher = {value = 0x30000000400, d = 0x0}}
        availablePlugins = {d = 0xaaaaf23a56e0}
        hasSizeOption = <optimized out>
        hasOutputCountOption = <optimized out>
        hasX11Option = <optimized out>
        hasVirtualOption = <optimized out>
        hasWaylandOption = <optimized out>
        hasFramebufferOption = <optimized out>
        hasDrmOption = <optimized out>
        xwaylandOption = {d = {d = 0xaaaaf242d130}}
        waylandSocketOption = {d = {d = 0xaaaaf243c660}}
        framebufferOption = {d = {d = 0xaaaaf2452810}}
        framebufferDeviceOption = {d = {d = 0xaaaaf2437a10}}
        x11DisplayOption = {d = {d = 0xaaaaf2434ed0}}
        waylandDisplayOption = {d = {d = 0xaaaaf24355f0}}
        virtualFbOption = {d = {d = 0xaaaaf242d220}}
        widthOption = {d = {d = 0xaaaaf2437770}}
        heightOption = {d = {d = 0xaaaaf2434fb0}}
        scaleOption = {d = {d = 0xaaaaf24379a0}}
        outputCountOption = {d = {d = 0xaaaaf242d4c0}}
        waylandSocketFdOption = {d = {d = 0xaaaaf242d620}}
        replaceOption = {d = {d = 0xaaaaf242d760}}
        parser = {d = 0xaaaaf23e7a60}
        libinputOption = {d = {d = 0xaaaaf2446810}}
        drmOption = {d = {d = 0xaaaaf24468b0}}
        inputMethodOption = {d = {d = 0xaaaaf24468f0}}
        listBackendsOption = {d = {d = 0xaaaaf2446a10}}
        screenLockerOption = {d = {d = 0xaaaaf2446d80}}
        noScreenLockerOption = {d = {d = 0xaaaaf2446fb0}}
        noGlobalShortcutsOption = {d = {d = 0xaaaaf24470f0}}
        noActivitiesOption = {d = {d = 0xaaaaf2447240}}
        exitWithSessionOption = {d = {d = 0xaaaaf2447370}}
        pluginName = {static null = {<No data fields>}, d = 0xaaaacbf5cf08 <KWin::s_drmPlugin::{lambda()#1}::operator()() const::qstring_literal>}
        initialWindowSize = {wd = 1024, ht = 768}
        deviceIdentifier = {d = 0xffff8433a050 <QArrayData::shared_null>}
        outputCount = 1
        outputScale = 1
        pluginIt = 0xaaaaf23a5758
        server = 0xaaaaf242ecf0
        flags = {i = <optimized out>}
(gdb)
Comment 5 Richard Ullger 2021-04-16 08:37:43 UTC
Will you need debug symbols for the Qt packages or can you do without?
Comment 6 Richard Ullger 2021-04-16 14:17:10 UTC
Btw, ExternalSizeMax=6G made no difference.
Comment 7 Nate Graham 2021-04-16 16:24:48 UTC
At this point, probably not. Thanks!

Thread 1 (Thread 0xffff7f629490 (LWP 3396)):
#0  0x00000000bc1f5294 in  ()
#1  0x0000aaaacbf013f8 in KWin::ApplicationWayland::performStartup() (this=0xffffd061eb08) at /home/richard/kde/src/plasma/kwin/src/main_wayland.cpp:159
Comment 8 Vlad Zahorodnii 2021-04-19 08:30:12 UTC
kwin crashes during platform initialization. however, the backtrace misses the most important part - the info where kwin actually crashes in the platform plugin.
Comment 9 Richard Ullger 2021-04-19 23:15:07 UTC
Backtrace limit is already set to unlimited levels so I'm not sure how to generate the required info.

Is the following of any use?

101             args = QStringList{QStringLiteral("--xwayland"), QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR "/startplasma-waylandsession")};
(gdb) s
QStringList::~QStringList (this=0xfffffffff518, __in_chrg=<optimized out>)
    at /usr/include/qt/QtCore/qstringlist.h:111
111     class QStringList : public QList<QString>
(gdb) n
103         runSync(QStringLiteral("kwin_wayland_wrapper"), args);
(gdb) p args
$5 = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, 
    {p = {static shared_null = {ref = {atomic = {
              _q_value = {<std::__atomic_base<int>> = {
                  static _S_alignment = 4, _M_i = -1}, 
                static is_always_lock_free = true}}}, alloc = 0, begin = 0, 
          end = 0, array = {0x0}}, d = 0xaaaaaab5cdc0}, 
      d = 0xaaaaaab5cdc0}}, <No data fields>}
(gdb) info stack
#0  main (argc=<optimized out>, argv=0xfffffffff6c8)
    at /home/richard/kde/src/plasma/plasma-workspace/startkde/startplasma-wayland.cpp:103
(gdb) s
QStringList::QStringList (this=0xfffffffff528)
    at /usr/include/qt/QtCore/qstringlist.h:115
115         inline QStringList() noexcept { }
(gdb) s
QList<QString>::QList (this=0xfffffffff528)
    at /usr/include/qt/QtCore/qlist.h:160
160         inline QList() noexcept : d(const_cast<QListData::Data *>(&QListData::shared_null)) { }                                                             
(gdb) s
runSync (program=..., args=..., env=...)
    at /home/richard/kde/src/plasma/plasma-workspace/startkde/startplasma.cpp:77
77      {
(gdb) l
72          names.sort();
73          return names;
74      }
75
76      int runSync(const QString &program, const QStringList &args, const QStringList &env)
77      {
78          QProcess p;
79          if (!env.isEmpty())
80              p.setEnvironment(QProcess::systemEnvironment() << env);
81          p.setProcessChannelMode(QProcess::ForwardedChannels);
(gdb) s
78          QProcess p;
(gdb) s
79          if (!env.isEmpty())
(gdb) s
QList<QString>::isEmpty (this=0xfffffffff528)
    at /usr/include/qt/QtCore/qlist.h:201
201         inline bool isEmpty() const noexcept { return p.isEmpty(); }
(gdb) s
QListData::isEmpty (this=0xfffffffff528) at /usr/include/qt/QtCore/qlist.h:116
116         inline bool isEmpty() const noexcept { return d->end  == d->begin; }
(gdb) s
81          p.setProcessChannelMode(QProcess::ForwardedChannels);
(gdb) s
warning: Source file is more recent than executable.
121         Q_DECL_CONSTEXPR inline QFlags(Enum flags) noexcept : i(Int(flags)) {}                                                                              
(gdb) s
[Detaching after fork from child process 3628]
84          p.waitForFinished(-1);
(gdb) Launching kwin
No backend specified through command line argument, trying auto resolution
Compositor crashed, respawning
Launching kwin
No backend specified through command line argument, trying auto resolution
QObject::connect(KWin::Platform, KWin::ColorManager): invalid nullptr parameter
QObject::connect(KWin::Platform, KWin::ColorManager): invalid nullptr parameter
QObject::connect(KWin::LogindIntegration, KWin::ColorManager): invalid nullptr parameter
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5079:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5081:48: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5083:48: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5087:47: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5089:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5097:48: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5101:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5103:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5107:45: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5110:46: this compose sequence is a duplicate of another; skipping line
kf.globalaccel.kglobalacceld: Shortcut found twice in kglobalshortcutsrc. 134217760
kf.globalaccel.kglobalacceld: Shortcut found twice in kglobalshortcutsrc. 150994993
kf.globalaccel.kglobalacceld: Shortcut found twice in kglobalshortcutsrc. 16777362
kf.globalaccel.kglobalacceld: Shortcut found twice in kglobalshortcutsrc. 184549425
Compositor crashed, respawning
Launching kwin
No backend specified through command line argument, trying auto resolution
Compositor crashed, respawning
Launching kwin
No backend specified through command line argument, trying auto resolution
Compositor crashed, respawning
Launching kwin
No backend specified through command line argument, trying auto resolution
Compositor crashed, respawning
Launching kwin
No backend specified through command line argument, trying auto resolution
Compositor crashed, respawning
Launching kwin
No backend specified through command line argument, trying auto resolution
Compositor crashed, respawning
Launching kwin
No backend specified through command line argument, trying auto resolution
Compositor crashed, respawning
Launching kwin
No backend specified through command line argument, trying auto resolution
Compositor crashed, respawning
Launching kwin
No backend specified through command line argument, trying auto resolution
Compositor crashed, respawning
Comment 10 Richard Ullger 2021-06-16 16:49:56 UTC
No longer relevant