Bug 492344

Summary: On X11, Plasmashell crashes in ShellCorona::panelContainmentDestroyed() when logging out with xpad app running
Product: [Plasma] plasmashell Reporter: TraceyC <kdedev>
Component: Desktop ContainmentAssignee: Plasma Bugs List <plasma-bugs>
Status: CONFIRMED ---    
Severity: crash CC: kde, nate, notmart
Priority: NOR    
Version: 6.1.4   
Target Milestone: 1.0   
Platform: Solus   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=492889
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: journalctl logs

Description TraceyC 2024-08-28 23:11:29 UTC
SUMMARY
While testing another bug report, I had logged into an X11 session on 6.1.4 after an X11 dev/6.2 session
Related? After setting the SDDM settings, clicking Apply and then OK, System Settings crashed. I can't reproduce that crash without xpad installed.

I had an external monitor connected to the laptop via HDMI, and unplugged it
I noticed a small rectangular area in the upper left hand corner of the wallpaper was corrupt. This area overlapped the icons on the desktop. I discovered it was the xpad window area, after observing this in relog / reboots
I clicked Leave - Logout from the kickoff menu
Plasmashell crashed, leaving a black background and mouse cursor. There was also a small yellow rectangle where the wallpaper corruption had been, which looked like it was the xPad window. (I left this for a couple of minutes to make sure it wasn't just being slow)
I got to TTY and saw there was a new coredump

STEPS TO REPRODUCE
This is the minimal setup I can reproduce the crash with
Settings:
- SDDM set to automatically log in as my user with session Plasma (X11) (not set to auto login at logoff)
- xpad installed, default settings
1. Logged into X11 6.1.4 session
2. Kickoff - Leave - Logout

OBSERVED RESULT
Black screen with a cursor, and a square filled with the wallpaper, where the xpad window was
Logut hangs, crash dump logged

EXPECTED RESULT
User is logged out normally

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Solus
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Graphics: X11

ADDITIONAL INFORMATION
When xpad is installed, it will pop up a window at login
I wasn't able to make the crash happen using Logout from the Logout/Lock applet in the panel, only with Leave - Logout
After removing xpad via `eopkg rm xpad`, it couldn't be closed via right click icon in panel - close. It stayed in the panel, and there was a black blank box where its window should be. This did allow logging out to be successful, however.

Backtrace

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
Core was generated by `/usr/bin/plasmashell --no-respawn'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f529d0ab84b in pthread_kill () from /usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6
[Current thread is 1 (Thread 0x7f529740e480 (LWP 989))]
(gdb)
(gdb) c
The program is not being run.
(gdb) backtrace
#0  0x00007f529d0ab84b in pthread_kill () at /usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6
#1  0x00007f529d051296 in raise () at /usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6
#2  0x00007f52a0230e34 in KCrash::defaultCrashHandler(int) () at /usr/lib/libKF6Crash.so.6
#3  0x00007f529d051340 in <signal handler called> () at /usr/lib/glibc-hwcaps/x86-64-v3/libc.so.6
#4  ShellCorona::panelContainmentDestroyed (this=0x55cd3d20d9a0, obj=<optimized out>) at /home/build/YPKG/root/plasma-workspace/build/plasma-workspace-6.1.4/shell/shellcorona.cpp:1570
#5  0x00007f529d953268 in QtPrivate::QSlotObjectBase::call (this=0x55cd3fbadb80, r=0x55cd3d20d9a0, a=0x7ffcea67a580)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobjectdefs_impl.h:469
#6  doActivate<false> (sender=0x55cd3d7ad810, signal_index=0, argv=0x7ffcea67a580) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4086
#7  0x00007f529d9461f2 in QMetaObject::activate (sender=0x55cd3d7ad810, local_signal_index=0, argv=0x7ffcea67a580, m=<optimized out>)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:4146
#8  QObject::destroyed (this=0x55cd3d7ad810, _t1=0x55cd3d7ad810) at src/corelib/kernel/moc_qobject.cpp:229
#9  QObject::~QObject (this=0x55cd3d7ad810) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:1074
#10 0x00007f52a00b4e57 in Plasma::Applet::~Applet() () at /usr/lib/libPlasma.so.6
#11 0x00007f52a00bd9bf in Plasma::Containment::~Containment() () at /usr/lib/libPlasma.so.6
#12 0x000055cd247b5292 in ShellCorona::~ShellCorona (this=0x55cd3d20d9a0) at /home/build/YPKG/root/plasma-workspace/build/plasma-workspace-6.1.4/shell/shellcorona.cpp:366
#13 0x000055cd247b55de in ShellCorona::~ShellCorona (this=0x5) at /home/build/YPKG/root/plasma-workspace/build/plasma-workspace-6.1.4/shell/shellcorona.cpp:362
#14 0x00007f529d94818c in qDeleteInEventHandler (o=0x55cd3d20d9a0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:5002
#15 QObject::event (this=0x55cd3d20d9a0, e=0x7f528801fad0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qobject.cpp:1437
#16 0x00007f529fa47aa3 in QApplicationPrivate::notify_helper (this=0x55cd3d11ac30, receiver=0x55cd3d20d9a0, e=0x7f528801fad0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/widgets/kernel/qapplication.cpp:3287
#17 0x00007f529fa48c1f in QApplication::notify (this=<optimized out>, receiver=0x55cd3d20d9a0, e=0x7f528801fad0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/widgets/kernel/qapplication.cpp:2680
#18 0x00007f529d8f4e5d in QCoreApplication::notifyInternal2 (receiver=0x55cd3d20d9a0, event=0x7f528801fad0)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1142
#19 0x00007f529d8f6595 in QCoreApplication::sendEvent (receiver=0x55cd3d20d9a0, event=<optimized out>)
    at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1583
#20 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=52, data=0x55cd3d0eeba0) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1940
#21 0x00007f529d8f56d9 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=52) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1797
#22 QCoreApplicationPrivate::execCleanup (this=<optimized out>) at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1505
#23 QCoreApplication::exec () at /home/build/YPKG/root/qt6-base/build/qtbase-everywhere-src-6.7.2/src/corelib/kernel/qcoreapplication.cpp:1490
#24 0x000055cd2478d067 in main (argc=2, argv=0x7ffcea67ad58) at /home/build/YPKG/root/plasma-workspace/build/plasma-workspace-6.1.4/shell/main.cpp:188
Comment 1 TraceyC 2024-08-28 23:12:27 UTC
After xpad was uninstalled, I did get another crash in System Settings when closing out the window with the SDDM page showing, so xpad is not involved in that part
Comment 2 TraceyC 2024-08-28 23:12:42 UTC
I can reproduce so Confirmed
Comment 3 Nate Graham 2024-08-30 16:28:37 UTC
So the issue goes away completely when xpad isn't installed?
Comment 4 TraceyC 2024-09-24 00:57:48 UTC
I can no longer reproduce the crash with closing System Settings - SDDM (with or without xpad)

With xpad uninstalled, I did not and now do not see a crash when logging out of an X11 dev session, it logs out as normal

With xpad installed, after disconnecting the HDMI external monitor, logging out still hangs.
I no longer get a new coredump, but the screen hangs at a black background and the yellow xpad square - but this is intermittent. Usually after the second login / logout it will trigger.
I can still lock the screen, and unlock it, so it's in a state after some things have exited but not all.
Comment 5 TraceyC 2024-09-24 00:58:39 UTC
Created attachment 174010 [details]
journalctl logs

Logs from journalctl starting just after login, and until after the logout attempt