Bug 495107 - Multiple Plasma services report segfault crashes upon login
Summary: Multiple Plasma services report segfault crashes upon login
Status: RESOLVED DUPLICATE of bug 496048
Alias: None
Product: frameworks-kded
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.7.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords: drkonqi, qt6, wayland
Depends on:
Blocks:
 
Reported: 2024-10-20 20:01 UTC by Kyle B.
Modified: 2024-12-02 10:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/82332/events/255a875e2e6c450c809a50ec4bce079b/


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle B. 2024-10-20 20:01:19 UTC
Application: kded6 (6.7.0)

ApplicationNotResponding [ANR]: false
Qt Version: 6.8.0
Frameworks Version: 6.7.0
Operating System: Linux 6.11.3-1-default x86_64
Windowing System: Wayland
Distribution: "openSUSE Tumbleweed"
DrKonqi: 6.2.1 [CoredumpBackend]

-- Information about the crash:
After updating the system approximately 10/18/2024, logging into the system shows several crash reports from KDE (Power management, Kactivitymanagerd, KDEConnect,and others) that all seem to have the exact same crash reports. 

Uncertain if it's related but a KDEWallet prompt is now coming up where it hasn't before as well.

It appears to be related to QtWaylandClient::QWaylandTabletPadV2::zwp_tablet_pad_v2_removed(), but I'm completely unsure from there.

I do have an XP-Pen Deco Pro MW drawing tablet installed.

The crash can be reproduced every time.

-- Backtrace:
Application: kded6 (kded6), signal: Segmentation fault


This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.opensuse.org/>
Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.

warning: Can't open file /memfd:pulseaudio (deleted) during file-backed mapping note processing

warning: Can't open file /var/lib/nscd/passwd during file-backed mapping note processing

warning: Can't open file /memfd:kwin-dmabuf-feedback-table (deleted) during file-backed mapping note processing
[New LWP 2288]
[New LWP 2306]
[New LWP 2318]
[New LWP 2321]
[New LWP 2320]
[New LWP 2307]
[New LWP 2297]
[New LWP 2319]
[New LWP 2323]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/bin/kded6'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007ff25749a25c in __pthread_kill_implementation () from /lib64/libc.so.6
[Current thread is 1 (Thread 0x7ff257615980 (LWP 2288))]
python sentry-sdk not installed :(
Cannot QML trace cores :(
[Current thread is 1 (Thread 0x7ff257615980 (LWP 2288))]

Thread 9 (Thread 0x7ff23a2006c0 (LWP 2323)):
#0  0x00007ff25750ebcf in poll () at /lib64/libc.so.6
#1  0x00007ff244ae1451 in ??? () at /lib64/libpulse.so.0
#2  0x00007ff244acb634 in pa_mainloop_poll () at /lib64/libpulse.so.0
#3  0x00007ff244ad5be6 in pa_mainloop_iterate () at /lib64/libpulse.so.0
#4  0x00007ff244ad5c90 in pa_mainloop_run () at /lib64/libpulse.so.0
#5  0x00007ff244ae6104 in ??? () at /lib64/libpulse.so.0
#6  0x00007ff244a84bbf in ??? () at /usr/lib64/pulseaudio/libpulsecommon-17.0.so
#7  0x00007ff2574983b2 in start_thread () at /lib64/libc.so.6
#8  0x00007ff25751d5fc in __clone3 () at /lib64/libc.so.6

Thread 8 (Thread 0x7ff23c4006c0 (LWP 2319)):
#0  0x00007ff25750f186 in ppoll () at /lib64/libc.so.6
#1  0x00007ff257712d9f in ??? () at /lib64/libglib-2.0.so.0
#2  0x00007ff2577134bc in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ff257713501 in ??? () at /lib64/libglib-2.0.so.0
#4  0x00007ff25774249e in ??? () at /lib64/libglib-2.0.so.0
#5  0x00007ff2574983b2 in start_thread () at /lib64/libc.so.6
#6  0x00007ff25751d5fc in __clone3 () at /lib64/libc.so.6

Thread 7 (Thread 0x7ff2562006c0 (LWP 2297)):
#0  0x00007ff25750f186 in ppoll () at /lib64/libc.so.6
#1  0x00007ff257712d9f in ??? () at /lib64/libglib-2.0.so.0
#2  0x00007ff2577134bc in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ff257ffdd23 in QEventDispatcherGlib::processEvents (this=0x7ff250000ba0, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/kernel/qeventdispatcher_glib.cpp:396
#4  0x00007ff257db6402 in QEventLoop::exec (this=0x7ff2561ffba0, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/global/qflags.h:34
#5  0x00007ff257ea290c in QThread::exec (this=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/global/qflags.h:74
#6  0x00007ff258e1322e in ??? () at /lib64/libQt6DBus.so.6
#7  0x00007ff257f1cb39 in operator() (__closure=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/thread/qthread_unix.cpp:335
#8  (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/thread/qthread_unix.cpp:263
#9  QThreadPrivate::start (arg=0x7ff258e9ab20) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/thread/qthread_unix.cpp:294
#10 0x00007ff2574983b2 in start_thread () at /lib64/libc.so.6
#11 0x00007ff25751d5fc in __clone3 () at /lib64/libc.so.6

Thread 6 (Thread 0x7ff24cc006c0 (LWP 2307)):
#0  0x00007ff25750ebcf in poll () at /lib64/libc.so.6
#1  0x00007ff256371307 in poll (__fds=0x7ff24cbffbe0, __nfds=2, __timeout=-1) at /usr/include/bits/poll2.h:44
#2  QtWaylandClient::EventThread::run (this=0x55c2ca7eb480) at /usr/src/debug/qtwayland-everywhere-src-6.8.0/src/client/qwaylanddisplay.cpp:182
#3  0x00007ff257f1cb39 in operator() (__closure=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/thread/qthread_unix.cpp:335
#4  (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/thread/qthread_unix.cpp:263
#5  QThreadPrivate::start (arg=0x55c2ca7eb480) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/thread/qthread_unix.cpp:294
#6  0x00007ff2574983b2 in start_thread () at /lib64/libc.so.6
#7  0x00007ff25751d5fc in __clone3 () at /lib64/libc.so.6

Thread 5 (Thread 0x7ff23ba006c0 (LWP 2320)):
#0  0x00007ff25750f186 in ppoll () at /lib64/libc.so.6
#1  0x00007ff257712d9f in ??? () at /lib64/libglib-2.0.so.0
#2  0x00007ff2577136cf in g_main_loop_run () at /lib64/libglib-2.0.so.0
#3  0x00007ff24db35936 in ??? () at /lib64/libgio-2.0.so.0
#4  0x00007ff25774249e in ??? () at /lib64/libglib-2.0.so.0
#5  0x00007ff2574983b2 in start_thread () at /lib64/libc.so.6
#6  0x00007ff25751d5fc in __clone3 () at /lib64/libc.so.6

Thread 4 (Thread 0x7ff23b0006c0 (LWP 2321)):
#0  0x00007ff25750f186 in ppoll () at /lib64/libc.so.6
#1  0x00007ff257712d9f in ??? () at /lib64/libglib-2.0.so.0
#2  0x00007ff2577134bc in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007ff247e8799d in ??? () at /usr/lib64/gio/modules/libdconfsettings.so
#4  0x00007ff25774249e in ??? () at /lib64/libglib-2.0.so.0
#5  0x00007ff2574983b2 in start_thread () at /lib64/libc.so.6
#6  0x00007ff25751d5fc in __clone3 () at /lib64/libc.so.6

Thread 3 (Thread 0x7ff23ce006c0 (LWP 2318)):
#0  0x00007ff25751b16d in syscall () at /lib64/libc.so.6
#1  0x00007ff257741e10 in g_cond_wait () at /lib64/libglib-2.0.so.0
#2  0x00007ff2576db1ab in ??? () at /lib64/libglib-2.0.so.0
#3  0x00007ff257742732 in ??? () at /lib64/libglib-2.0.so.0
#4  0x00007ff25774249e in ??? () at /lib64/libglib-2.0.so.0
#5  0x00007ff2574983b2 in start_thread () at /lib64/libc.so.6
#6  0x00007ff25751d5fc in __clone3 () at /lib64/libc.so.6

Thread 2 (Thread 0x7ff24d6006c0 (LWP 2306)):
#0  0x00007ff2574946be in __futex_abstimed_wait_common () at /lib64/libc.so.6
#1  0x00007ff257497520 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libc.so.6
#2  0x00007ff257f2155b in QWaitConditionPrivate::wait (this=0x55c2ca816f10, deadline=...) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/thread/qwaitcondition_unix.cpp:102
#3  QWaitCondition::wait (this=this@entry=0x55c2ca7d4290, mutex=mutex@entry=0x55c2ca7d4288, deadline=...) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/thread/qwaitcondition_unix.cpp:180
#4  0x00007ff2563712a7 in QtWaylandClient::EventThread::waitForReading (this=0x55c2ca7d4250) at /usr/include/qt6/QtCore/qdeadlinetimer.h:31
#5  QtWaylandClient::EventThread::run (this=0x55c2ca7d4250) at /usr/src/debug/qtwayland-everywhere-src-6.8.0/src/client/qwaylanddisplay.cpp:177
#6  0x00007ff257f1cb39 in operator() (__closure=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/thread/qthread_unix.cpp:335
#7  (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=<optimized out>) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/thread/qthread_unix.cpp:263
#8  QThreadPrivate::start (arg=0x55c2ca7d4250) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/thread/qthread_unix.cpp:294
#9  0x00007ff2574983b2 in start_thread () at /lib64/libc.so.6
#10 0x00007ff25751d5fc in __clone3 () at /lib64/libc.so.6

Thread 1 (Thread 0x7ff257615980 (LWP 2288)):
[KCrash Handler]
#4  0x00007ff2563aa497 in QtWayland::zwp_tablet_pad_v2::handle_removed (data=0x55c2ca6db970, object=0x55c2ca6dbf80) at /usr/src/debug/qtwayland-everywhere-src-6.8.0/build/src/client/qwayland-tablet-unstable-v2.cpp:1330
#5  0x00007ff256c4b972 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#6  0x00007ff256c482df in ffi_call_int (cif=cif@entry=0x7ffc31f1e4c0, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#7  0x00007ff256c4af36 in ffi_call (cif=cif@entry=0x7ffc31f1e4c0, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7ffc31f1e590) at ../src/x86/ffi64.c:710
#8  0x00007ff256c56c13 in wl_closure_invoke (closure=closure@entry=0x7ff248002b70, target=<optimized out>, target@entry=0x55c2ca6dbf80, opcode=opcode@entry=7, data=<optimized out>, flags=1) at ../src/connection.c:1228
#9  0x00007ff256c573c9 in dispatch_event (display=0x55c2ca6cb0b0, queue=0x55c2ca6cb1a8) at ../src/wayland-client.c:1674
#10 0x00007ff256c5778b in dispatch_queue (display=0x55c2ca6cb0b0, queue=0x55c2ca6cb1a8) at ../src/wayland-client.c:1820
#11 wl_display_dispatch_queue_pending (display=0x55c2ca6cb0b0, queue=0x55c2ca6cb1a8) at ../src/wayland-client.c:2062
#12 0x00007ff256371152 in QtWaylandClient::QWaylandDisplay::flushRequests (this=<optimized out>) at /usr/src/debug/qtwayland-everywhere-src-6.8.0/src/client/qwaylanddisplay.cpp:227
#13 0x00007ff257df9e27 in QObject::event (this=0x55c2ca6ca850, e=0x7ff2400014c0) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/kernel/qobject.cpp:1419
#14 0x00007ff2591dec35 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt6Widgets.so.6
#15 0x00007ff257dacb68 in QCoreApplication::notifyInternal2 (receiver=0x55c2ca6ca850, event=0x7ff2400014c0) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/kernel/qcoreapplication.cpp:1165
#16 0x00007ff257db55d8 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55c2ca6bf420) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/kernel/qcoreapplication.cpp:1965
#17 0x00007ff258000967 in postEventSourceDispatch (s=0x55c2ca7eb6e0) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/kernel/qeventdispatcher_glib.cpp:246
#18 0x00007ff257710eb8 in ??? () at /lib64/libglib-2.0.so.0
#19 0x00007ff257712ca8 in ??? () at /lib64/libglib-2.0.so.0
#20 0x00007ff2577134bc in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#21 0x00007ff257ffdd41 in QEventDispatcherGlib::processEvents (this=0x55c2ca6c6260, flags=...) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/kernel/qeventdispatcher_glib.cpp:398
#22 0x00007ff257db6402 in QEventLoop::exec (this=this@entry=0x7ffc31f1ebb0, flags=..., flags@entry=...) at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/global/qflags.h:34
#23 0x00007ff257db68ea in QCoreApplication::exec () at /usr/src/debug/qtbase-everywhere-src-6.8.0/src/corelib/global/qflags.h:74
#24 0x000055c2c2019575 in ??? ()
#25 0x00007ff25742a2ae in __libc_start_call_main () at /lib64/libc.so.6
#26 0x00007ff25742a379 in __libc_start_main_impl () at /lib64/libc.so.6
#27 0x000055c2c20198d5 in ??? ()

Reported using DrKonqi
Comment 1 Kyle B. 2024-10-20 20:06:49 UTC
Attempting to uninstall wacomtablet-kcm6 did not resolve the issue. 

Affected services are: kded6, xdg-desktop-portal-kde, kactivitymanagerd, KDE Power Management System. They all report "closing unexpectedly" on every startup. 

The Plasma desktop environment still seems to load and operate normally otherwise, however.
Comment 2 DaydreamerKite 2024-11-11 02:46:14 UTC
I have the exact same issue with the exact same tablet: the XP-Pen Deco Pro MW.

If I have the XP-Pen drivers installed from the official site, I encounter the crashes as soon as I log in to my KDE session. 

If I don't have them installed and just rely on the default drivers that come with Fedora, log in will work fine. However, unplugging the tablet will cause the same crashes to suddenly occur.

If I had to guess, KDE isn't liking this specific tablet getting disconnected. The official XP-Pen driver software hooking into the tablet might be counting as a tablet disconnect.

There's so many KDE services crashing that I don't really know what or how to send debugging info for this.

Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.6-300.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3700X 8-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060/PCIe/SSE2
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7A38
System Version: 7.0
Comment 3 Kyle B. 2024-11-12 20:10:35 UTC
I'm glad you found my report, and thank you for adding your experience!

You're right, I think our issue is specifically with: 
[KCrash Handler]
#4  0x00007ff2563aa497 in QtWayland::zwp_tablet_pad_v2::handle_removed

I suspect the same as you do: That somehow upon initializing the tablet, it counts as a "removal" first, and triggers this bug. The WEIRD thing is that simply logging out the user (not shutting down) and logging back in, will have a normal startup as expected.

I tried removing the tablet's USB dongle before booting, and everything booted up normally as well. Weirdly, I did not encounter this bug when pulling the dongle during a running session.

As a workaround, you can try either logging out and back in before starting your session, or maybe try removing the dongle first on first boot?
I had to restart the proprietary driver when I did this too. Either way, it's a bit of a pain. :(

Using XP-Pen's 3.4.9 driver at the moment. Maybe there's a way to reach out to them as well. (As one of my pen buttons does nothing, too lol.)

But something definitely isn't playing right with QT!

This seems like a reproducible bug with a consistent source, so I apologize if I'm doing this in error, but I'm going to set this bug as "CONFIRMED."
Comment 4 Kyle B. 2024-11-13 22:32:40 UTC
(In reply to DaydreamerKite from comment #2)

I'm able to start my session without crashes now! Pardon my poor reporting skills but one of several solutions may have fixed it:

1. I ran   
"zypper in -f plasma6-desktop libQt6WaylandClient6 libqt5-qtwayland libQt6Xdg*"

to force reinstall those components. 

2. I put the tablet's wireless dongle into a different USB port. It was in a USB 3.2 slot, now it's in a 3.0 slot? But I'm not sure if that made a difference.

3. I installed the .RPM version of XP-PEN's latest drivers, instead of the general purpose shell-script version they had previously.

I sincerely hope any of this is helpful!
Comment 5 DaydreamerKite 2024-11-13 23:44:38 UTC
(In reply to Kyle B. from comment #4)

Thank you for looking into solutions and workarounds for the problem. Unfortunately, I don't think any of them prevent the problem from happening for me or at least get rid of the login crashes.

1. I had this problem with a relatively fresh install of Fedora 41 (all I did was updates and enabling rpmfusion before I installed the xp-pen driver), which is how I narrowed down that the tablet was involved on my end. Also, apparently DNF's way of doing a package reinstall is to basically do a same version upgrade, so it's hard for me to test if a true package reinstall would do anything.

2. I tried using different ports on my PC and still encountered the issue. However, I only have USB 3.1 ports and USB 2.0 ports.

3. I tried the RPM version of the driver (I was also initially using the install script) and still got the login crashes.

I should probably mention that I'm using the wired connection instead of the dongle on my end. I think this might be what is causing a slight bit of differing behavior here since I can consistently (and multiple times per the same session) cause the crash by unplugging the tablet.

I actually just discovered that I can also cause SDDM to crash by unplugging the tablet, but I can't be 100% sure if it's the same bug causing that.

Again, thanks for looking into it further!
Comment 6 DaydreamerKite 2024-11-24 21:01:48 UTC
So I finally had time to explore this more thoroughly and I managed to find a solid workaround that allows me to use the official XP-Pen driver without startup crashing.

I basically had to add a udev rule to make libinput ignore the tablet.

In /etc/udev/rules.d/99-ignore-my-device.rules, I used the following rule:

ACTION!="remove", KERNEL=="event[0-9]*", ATTRS{id/vendor}=="28bd", ATTRS{id/product}=="0934", ENV{LIBINPUT_IGNORE_DEVICE}="1"

For anyone having this problem and wanting to use the above workaround, you may want to find the device in "libinput list-devices" then check "udevadm info --attribute-walk --name=/dev/input/eventwhatever" to make sure the vendor and product attrs are the same. The same rule seems to have worked for both the dongle and the wired connection for me.

Figuring out this workaround led me to some interesting oddities regarding how the tablet is initially identified, though.

When the tablet is initialized normally, it will first show up as 3 devices: Hanvon Ugee Deco Pro MW Mouse, Hanvon Ugee Deco Pro MW Pen, and Hanvon Ugee Deco Pro MW Pad. (Hanvon Ugee is the parent company of XP-Pen).

Once the XP-Pen driver takes over, these 3 devices are disabled (if they are not already disabled by a udev rule) and some new devices are added: XP-Pen Pen, XP-Pen Mouse, and XP-Pen Eraser. These devices have a different product (0002), but have the same vendor.

Hope this helps. 

Also, if there's any way for me to add debugging info for the original KDE Plasma crashing problem that still happens with the initial Hanvon Ugee device, please let me know.
Comment 7 DaydreamerKite 2024-11-24 21:36:52 UTC
(In reply to DaydreamerKite from comment #6)

I realized I wasn't super clear on what the udev rule was disabling and I dunno if it's possible to edit comments. Oops. :(

The udev rule is disabling the "Hanvon Ugee Deco Pro MW" devices that appear before the XP-Pen driver takes over. So if you currently have the XP-pen driver installed and you are checking for the vendor and product with udevadm info, make sure you are NOT looking at the "XP-Pen" devices.

Sorry for any confusion there.
Comment 8 Nicolas Fella 2024-12-02 10:32:09 UTC

*** This bug has been marked as a duplicate of bug 496048 ***