Bug 466387

Summary: Intermittent segfault when plugging in PS5 or PS4 controller
Product: [Frameworks and Libraries] frameworks-kded Reporter: Andrew Gunnerson <accounts+kde>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED DUPLICATE    
Severity: crash CC: kdelibs-bugs, nicolas.fella
Priority: NOR    
Version: 5.103.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andrew Gunnerson 2023-02-25 02:54:48 UTC
SUMMARY

When I plug in my PS5 or PS4 controllers via USB, kded will sometimes segfault. I have not changed any settings other than disabling the controller's touchpad from KDE's system settings.

It happens pretty frequently, but not always. There seems to be a higher chance of a crash after resuming from suspend, but I don't have any hard data on that.

STEPS TO REPRODUCE

1. Plug in PS5 or PS4 controller via USB

OBSERVED RESULT

kded segfaults (which triggers side effects related to that, like night color breaking)

EXPECTED RESULT

kded shouldn't crash

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Fedora 37 (x11 session)
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

journalctl messages starting from plugging in the controller to the crash:

Feb 24 21:38:02 cxl-desktop-1 kernel: usb 1-9: new high-speed USB device number 22 using xhci_hcd
Feb 24 21:38:02 cxl-desktop-1 kernel: usb 1-9: New USB device found, idVendor=054c, idProduct=0ce6, bcdDevice= 1.00
Feb 24 21:38:02 cxl-desktop-1 kernel: usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Feb 24 21:38:02 cxl-desktop-1 kernel: usb 1-9: Product: Wireless Controller
Feb 24 21:38:02 cxl-desktop-1 kernel: usb 1-9: Manufacturer: Sony Interactive Entertainment
Feb 24 21:38:02 cxl-desktop-1 kernel: input: Sony Interactive Entertainment Wireless Controller as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.3/0003:054C:0CE6.0022/input/input47
Feb 24 21:38:02 cxl-desktop-1 kernel: hid-generic 0003:054C:0CE6.0022: input,hidraw15: USB HID v1.11 Gamepad [Sony Interactive Entertainment Wireless Controller] on usb-0000:00:14.0-9/input3
Feb 24 21:38:02 cxl-desktop-1 mtp-probe[275156]: checking bus 1, device 22: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9"
Feb 24 21:38:02 cxl-desktop-1 mtp-probe[275156]: bus: 1, device: 22 was not an MTP device
Feb 24 21:38:02 cxl-desktop-1 kernel: playstation 0003:054C:0CE6.0022: hidraw15: USB HID v1.11 Gamepad [Sony Interactive Entertainment Wireless Controller] on usb-0000:00:14.0-9/input3
Feb 24 21:38:02 cxl-desktop-1 kernel: input: Sony Interactive Entertainment Wireless Controller as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.3/0003:054C:0CE6.0022/input/input48
Feb 24 21:38:02 cxl-desktop-1 kernel: input: Sony Interactive Entertainment Wireless Controller Motion Sensors as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.3/0003:054C:0CE6.0022/input/input49
Feb 24 21:38:02 cxl-desktop-1 kernel: input: Sony Interactive Entertainment Wireless Controller Touchpad as /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.3/0003:054C:0CE6.0022/input/input50
Feb 24 21:38:02 cxl-desktop-1 kernel: playstation 0003:054C:0CE6.0022: Registered DualSense controller hw_version=0x00000313 fw_version=0x0104000c
Feb 24 21:38:02 cxl-desktop-1 mtp-probe[275167]: checking bus 1, device 22: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9"
Feb 24 21:38:02 cxl-desktop-1 mtp-probe[275167]: bus: 1, device: 22 was not an MTP device
Feb 24 21:38:02 cxl-desktop-1 kded5[91269]: Touchpad reset
Feb 24 21:38:03 cxl-desktop-1 kded5[91269]: KCrash: Attempting to start /usr/bin/kded5
Feb 24 21:38:03 cxl-desktop-1 kded5[91269]: KCrash: Application 'kded5' crashing...
Feb 24 21:38:03 cxl-desktop-1 kded5[91269]: KCrash: Attempting to start /usr/libexec/drkonqi

Backtrace from gdb (with debuginfo):

Core was generated by `/usr/bin/kded5'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
Downloading 0.00 MB source file /usr/src/debug/glibc-2.36-9.fc37.x86_64/nptl/pthread_kill.c
44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
[Current thread is 1 (Thread 0x7f5ac256c840 (LWP 275201))]
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f5ac1aafec3 in __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007f5ac1a5fa76 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007f5ac374b7b1 in KCrash::defaultCrashHandler(int) (sig=11) at /usr/src/debug/kf5-kcrash-5.103.0-1.fc37.x86_64/src/kcrash.cpp:611
#4  0x00007f5ac1a5fb20 in <signal handler called> () at /lib64/libc.so.6
#5  0x00007f5ac1ef14b9 in XPending (dpy=0x7f5a9a94e4a0 <TouchpadParameters::TouchpadParameters()::{lambda()#23}::operator()() const::qstring_literal>) at /usr/src/debug/libX11-1.8.4-1.fc37.x86_64/src/Pending.c:51
#6  0x00007f5a9a93ea56 in XlibNotifications::processEvents() (this=<optimized out>) at /usr/src/debug/plasma-desktop-5.27.0-2.fc37.x86_64/kcms/touchpad/backends/x11/xlibnotifications.cpp:63
#7  XlibNotifications::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x559305044f90, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at /usr/src/debug/plasma-desktop-5.27.0-2.fc37.x86_64/redhat-linux-build/kcms/touchpad/touchpad_autogen/include/moc_xlibnotifications.cpp:91
#8  0x00007f5ac22d101f in doActivate<false>(QObject*, int, void**) (sender=0x559304d479c0, signal_index=5, argv=0x7ffcade341c0) at kernel/qobject.cpp:3935
#9  0x00007f5ac22cbe27 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x559304d479c0, m=m@entry=0x7f5ac255e440 <QSocketNotifier::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffcade341c0)
    at kernel/qobject.cpp:3983
#10 0x00007f5ac22d3778 in QSocketNotifier::activated(int, QSocketNotifier::QPrivateSignal) (this=this@entry=0x559304d479c0, _t1=<optimized out>, _t2=...) at .moc/moc_qsocketnotifier.cpp:185
#11 0x00007f5ac22d3f3e in QSocketNotifier::event(QEvent*) (this=0x559304d479c0, e=<optimized out>) at kernel/qsocketnotifier.h:115
#12 0x00007f5ac31aed62 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x559304d479c0, e=0x7ffcade342b0) at kernel/qapplication.cpp:3640
#13 0x00007f5ac229d4e8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x559304d479c0, event=0x7ffcade342b0) at kernel/qcoreapplication.cpp:1064
#14 0x00007f5ac22ef03f in socketNotifierSourceDispatch(GSource*, GSourceFunc, gpointer) (source=0x559304a500d0) at kernel/qeventdispatcher_glib.cpp:107
#15 0x00007f5ac1064cbf in g_main_dispatch (context=0x7f5aac005010) at ../glib/gmain.c:3444
#16 g_main_context_dispatch (context=0x7f5aac005010) at ../glib/gmain.c:4162
#17 0x00007f5ac10ba598 in g_main_context_iterate.constprop.0 (context=0x7f5aac005010, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4238
#18 0x00007f5ac1061f40 in g_main_context_iteration (context=0x7f5aac005010, may_block=1) at ../glib/gmain.c:4303
#19 0x00007f5ac22ee5fa in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x559304a4cf40, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#20 0x00007f5ac229bf3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffcade34520, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#21 0x00007f5ac22a4002 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#22 0x00007f5ac275fad0 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1863
#23 0x00007f5ac31aecd9 in QApplication::exec() () at kernel/qapplication.cpp:2832
#24 0x00005593035ce5ab in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kf5-kded-5.103.0-1.fc37.x86_64/src/kded.cpp:785
Comment 1 Nicolas Fella 2023-02-25 15:35:03 UTC

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