Bug 461875

Summary: kdeconnect installed on an Android phone fails to send a file and after a few minutes kdeconnect-daemon crashes on desktop
Product: [Applications] kdeconnect Reporter: Patrick Silva <bugseforuns>
Component: commonAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED FIXED    
Severity: crash CC: nicolas.fella
Priority: NOR    
Version First Reported In: 22.11.80   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Patrick Silva 2022-11-15 15:34:36 UTC
SUMMARY
kde connect installed on an Android 6 phone for some reason fails to send a file to my desktop.
After some minutes, Plasma running on my desktop notifies that kdeconnect-daemon crashed.

Thread 7 (Thread 0x7efc48dff6c0 (LWP 2070)):
#0  pselect64_syscall (sigmask=0x0, timeout=<optimized out>, exceptfds=0x0, writefds=0x0, readfds=0x7efc48df69d0, nfds=5) at ../sysdeps/unix/sysv/linux/pselect.c:34
#1  __pselect (nfds=nfds@entry=5, readfds=readfds@entry=0x7efc48df69d0, writefds=writefds@entry=0x0, exceptfds=exceptfds@entry=0x0, timeout=<optimized out>, timeout@entry=0x7efc48df69c0, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/pselect.c:56
#2  0x00007efc66a6b524 in usbmuxd_listen_inotify () at libusbmuxd.c:923
#3  0x00007efc66a6c8a9 in usbmuxd_listen () at libusbmuxd.c:979
#4  device_monitor (data=<optimized out>) at libusbmuxd.c:1107
#5  0x00007efc6a69f8fd in start_thread (arg=<optimized out>) at pthread_create.c:442
#6  0x00007efc6a721a60 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 6 (Thread 0x7efc5cdfe6c0 (LWP 980)):
#0  0x00007ffe835b9698 in ?? ()
#1  0x00007ffe835b9990 in clock_gettime ()
#2  0x00007efc6a6e66bd in __GI___clock_gettime (clock_id=<optimized out>, tp=tp@entry=0x7efc5cdfd8b0) at ../sysdeps/unix/sysv/linux/clock_gettime.c:42
#3  0x00007efc695164ad in sysprof_clock_get_current_time () at /usr/include/sysprof-4/sysprof-clock.h:88
#4  g_main_context_prepare (context=0x7efc44000c30, priority=0x7efc5cdfd968) at ../glib/glib/gmain.c:3767
#5  0x00007efc6956d046 in g_main_context_iterate.constprop.0 (context=0x7efc44000c30, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4218
#6  0x00007efc69515132 in g_main_context_iteration (context=0x7efc44000c30, may_block=1) at ../glib/glib/gmain.c:4303
#7  0x00007efc6aed7c6f in QEventDispatcherGlib::processEvents (this=0x7efc44000b70, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#8  0x00007efc6ae8573c in QEventLoop::exec (this=0x7efc5cdfdac0, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#9  0x00007efc6ace721f in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#10 0x00007efc6ace42ea in QThreadPrivate::start (arg=0x555f80457f20) at thread/qthread_unix.cpp:330
#11 0x00007efc6a69f8fd in start_thread (arg=<optimized out>) at pthread_create.c:442
#12 0x00007efc6a721a60 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 5 (Thread 0x7efc5d5ff6c0 (LWP 957)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555f8033ab48) at futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x555f8033ab48, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007efc6a69c51f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x555f8033ab48, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3  0x00007efc6a69ecd0 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x555f8033aaf8, cond=0x555f8033ab20) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x555f8033ab20, mutex=0x555f8033aaf8) at pthread_cond_wait.c:618
#5  0x00007efc5d70799e in cnd_wait () at ../mesa-22.2.3/src/c11/impl/threads_posix.c:135
#6  0x00007efc5d6baf8c in util_queue_thread_func () at ../mesa-22.2.3/src/util/u_queue.c:287
#7  0x00007efc5d7078cc in impl_thrd_routine () at ../mesa-22.2.3/src/c11/impl/threads_posix.c:67
#8  0x00007efc6a69f8fd in start_thread (arg=<optimized out>) at pthread_create.c:442
#9  0x00007efc6a721a60 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 4 (Thread 0x7efc5ffff6c0 (LWP 955)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x555f80321d60) at futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x555f80321d60, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
#2  0x00007efc6a69c51f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x555f80321d60, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
#3  0x00007efc6a69ecd0 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x555f80321d10, cond=0x555f80321d38) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x555f80321d38, mutex=0x555f80321d10) at pthread_cond_wait.c:618
#5  0x00007efc6aceb784 in QWaitConditionPrivate::wait (deadline=..., this=0x555f80321d10) at thread/qwaitcondition_unix.cpp:146
#6  QWaitCondition::wait (this=this@entry=0x555f80324790, mutex=mutex@entry=0x555f80324788, deadline=...) at thread/qwaitcondition_unix.cpp:225
#7  0x00007efc68e86c44 in QtWaylandClient::EventThread::waitForReading (this=0x555f80324750) at /usr/src/debug/qt5-wayland/qtwayland/src/client/qwaylanddisplay.cpp:242
#8  QtWaylandClient::EventThread::run (this=0x555f80324750) at /usr/src/debug/qt5-wayland/qtwayland/src/client/qwaylanddisplay.cpp:206
#9  0x00007efc6ace42ea in QThreadPrivate::start (arg=0x555f80324750) at thread/qthread_unix.cpp:330
#10 0x00007efc6a69f8fd in start_thread (arg=<optimized out>) at pthread_create.c:442
#11 0x00007efc6a721a60 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7efc65dff6c0 (LWP 954)):
#0  0x00007efc6a7140bf in __GI___poll (fds=0x7efc600053e0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007efc6956d1df in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7efc600053e0, timeout=<optimized out>, context=0x7efc60001cf0) at ../glib/glib/gmain.c:4543
#2  g_main_context_iterate.constprop.0 (context=0x7efc60001cf0, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4233
#3  0x00007efc69515132 in g_main_context_iteration (context=0x7efc60001cf0, may_block=1) at ../glib/glib/gmain.c:4303
#4  0x00007efc6aed7c6f in QEventDispatcherGlib::processEvents (this=0x7efc60000b70, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007efc6ae8573c in QEventLoop::exec (this=0x7efc65dfea90, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#6  0x00007efc6ace721f in QThread::exec (this=this@entry=0x7efc6c2d0560 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#7  0x00007efc6c274cba in QDBusConnectionManager::run (this=0x7efc6c2d0560 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at /usr/src/debug/qt5-base/qtbase/src/dbus/qdbusconnection.cpp:179
#8  0x00007efc6ace42ea in QThreadPrivate::start (arg=0x7efc6c2d0560 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:330
#9  0x00007efc6a69f8fd in start_thread (arg=<optimized out>) at pthread_create.c:442
#10 0x00007efc6a721a60 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7efc5f7fe6c0 (LWP 956)):
#0  0x00007efc6a7140bf in __GI___poll (fds=fds@entry=0x7efc5f7fdab0, nfds=nfds@entry=2, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007efc68e86c9d in poll (__timeout=-1, __nfds=2, __fds=0x7efc5f7fdab0) at /usr/include/bits/poll2.h:39
#2  QtWaylandClient::EventThread::run (this=0x555f80324700) at /usr/src/debug/qt5-wayland/qtwayland/src/client/qwaylanddisplay.cpp:208
#3  0x00007efc6ace42ea in QThreadPrivate::start (arg=0x555f80324700) at thread/qthread_unix.cpp:330
#4  0x00007efc6a69f8fd in start_thread (arg=<optimized out>) at pthread_create.c:442
#5  0x00007efc6a721a60 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7efc661d2480 (LWP 905)):
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007efc6a6a16b3 in __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007efc6a651958 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007efc6a193868 in KCrash::defaultCrashHandler (sig=11) at /usr/src/debug/kcrash/kcrash-5.100.0/src/kcrash.cpp:633
#4  <signal handler called>
#5  0x00007efc6aeae472 in QMimeData::data (this=0x0, mimeType=...) at kernel/qmimedata.cpp:573
#6  0x00007efc5c195d6c in ClipboardListener::updateClipboard (this=0x555f80643650, mode=QClipboard::Clipboard) at /usr/src/debug/kdeconnect/kdeconnect-kde-22.11.80/plugins/clipboard/clipboardlistener.cpp:64
#7  0x00007efc6aebda51 in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#8  doActivate<false> (sender=0x555f80644940, signal_index=3, argv=0x7ffe8354f730) at kernel/qobject.cpp:3919
#9  0x00007efc6a450543 in KSystemClipboard::changed (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kguiaddons/build/src/KF5GuiAddons_autogen/V34PFPZMFK/moc_ksystemclipboard.cpp:134
#10 0x00007efc6aebda51 in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#11 doActivate<false> (sender=0x555f806375d0, signal_index=3, argv=0x7ffe8354f7e0) at kernel/qobject.cpp:3919
#12 0x00007efc66a364f6 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#13 0x00007efc66a32f5e in ffi_call_int (cif=<optimized out>, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=<optimized out>) at ../src/x86/ffi64.c:673
#14 0x00007efc66a35b73 in ffi_call (cif=cif@entry=0x7ffe8354f9e0, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7ffe8354fab0) at ../src/x86/ffi64.c:710
#15 0x00007efc6945d645 in wl_closure_invoke (closure=closure@entry=0x7efc50004f20, target=<optimized out>, target@entry=0x555f80637710, opcode=opcode@entry=1, data=<optimized out>, flags=1) at ../wayland-1.21.0/src/connection.c:1025
#16 0x00007efc6945de03 in dispatch_event (display=display@entry=0x555f80305f40, queue=0x555f80306010) at ../wayland-1.21.0/src/wayland-client.c:1595
#17 0x00007efc6945dffc in dispatch_queue (queue=0x555f80306010, display=0x555f80305f40) at ../wayland-1.21.0/src/wayland-client.c:1741
#18 wl_display_dispatch_queue_pending (display=0x555f80305f40, queue=0x555f80306010) at ../wayland-1.21.0/src/wayland-client.c:1983
#19 0x00007efc68e86b76 in QtWaylandClient::QWaylandDisplay::flushRequests (this=<optimized out>) at /usr/src/debug/qt5-wayland/qtwayland/src/client/qwaylanddisplay.cpp:253
#20 0x00007efc6aeb0be0 in QObject::event (this=0x555f80301940, e=0x7efc58004fc0) at kernel/qobject.cpp:1347
#21 0x00007efc6bb78b1c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x555f80301940, e=0x7efc58004fc0) at kernel/qapplication.cpp:3637
#22 0x00007efc6ae8cf98 in QCoreApplication::notifyInternal2 (receiver=0x555f80301940, event=0x7efc58004fc0) at kernel/qcoreapplication.cpp:1064
#23 0x00007efc6ae8daa3 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x555f802fd6e0) at kernel/qcoreapplication.cpp:1821
#24 0x00007efc6aed3e68 in postEventSourceDispatch (s=0x555f80321790) at kernel/qeventdispatcher_glib.cpp:277
#25 0x00007efc6951687b in g_main_dispatch (context=0x7efc60005010) at ../glib/glib/gmain.c:3444
#26 g_main_context_dispatch (context=0x7efc60005010) at ../glib/glib/gmain.c:4162
#27 0x00007efc6956d279 in g_main_context_iterate.constprop.0 (context=0x7efc60005010, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4238
#28 0x00007efc69515132 in g_main_context_iteration (context=0x7efc60005010, may_block=1) at ../glib/glib/gmain.c:4303
#29 0x00007efc6aed7c6f in QEventDispatcherGlib::processEvents (this=0x555f802d6a70, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#30 0x00007efc6ae8573c in QEventLoop::exec (this=0x7ffe83550090, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#31 0x00007efc6ae90269 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#32 0x00007efc6b33a112 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1870
#33 0x00007efc6bb76f2a in QApplication::exec () at kernel/qapplication.cpp:2829
#34 0x0000555f7e3ef597 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kdeconnect/kdeconnect-kde-22.11.80/daemon/kdeconnectd.cpp:185
Comment 1 Bug Janitor Service 2022-11-17 22:42:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/507
Comment 2 Nicolas Fella 2022-11-17 22:44:07 UTC
I'm pretty sure the two issues are unrelated. https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/507 should fix the crash
Comment 3 Aleix Pol 2022-11-18 10:57:51 UTC
Git commit 1fbbeb823d69132f4336a6fb1aca7adcf74715ec by Aleix Pol Gonzalez, on behalf of Nicolas Fella.
Committed on 18/11/2022 at 00:03.
Pushed by nicolasfella into branch 'master'.

[plugins/clipboard] Check for null mimedata

M  +1    -1    plugins/clipboard/clipboardlistener.cpp

https://invent.kde.org/network/kdeconnect-kde/commit/1fbbeb823d69132f4336a6fb1aca7adcf74715ec
Comment 4 Nicolas Fella 2022-11-18 10:58:09 UTC
Git commit e5c117eb68a15b66e77b889dcd1b5267d48ac7fa by Nicolas Fella.
Committed on 18/11/2022 at 10:57.
Pushed by nicolasfella into branch 'release/22.12'.

[plugins/clipboard] Check for null mimedata
(cherry picked from commit 1fbbeb823d69132f4336a6fb1aca7adcf74715ec)

M  +1    -1    plugins/clipboard/clipboardlistener.cpp

https://invent.kde.org/network/kdeconnect-kde/commit/e5c117eb68a15b66e77b889dcd1b5267d48ac7fa