Bug 352861

Summary: [kdeconnect] Crash while transfering files.
Product: [Applications] kdeconnect Reporter: Sven Eden <sven>
Component: commonAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED FIXED    
Severity: crash Keywords: drkonqi
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Sven Eden 2015-09-18 06:17:08 UTC
Application: kdeconnectd (0.1)
KDE Platform Version: 4.14.11 (Compiled from sources)
Qt Version: 4.8.7
Operating System: Linux 4.0.9-geek x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
- What I was doing when the application crashed:
Moved some videos from my Sony Xperia Z1 compact to my laptop to make space.

The performance was between 100KiB/s and 1.1MiB/s when on file number 4 the crash assistant suddenly showed up.

I had to disconnect and reconect manually and now the performance is between 2.2MiB/s and 3.1MiB/s.

Strange that the performance (all with locked screen on my phone) went up after the reconnect, though.

The crash can be reproduced sometimes.

-- Backtrace:
Application: KdeConnect (kdeconnectd), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f63575e87c0 (LWP 9874))]

Thread 3 (Thread 0x7f634535b700 (LWP 9875)):
#0  0x00007f6354bf8e8d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f63513a463c in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7f63400013e0, timeout=<optimized out>, context=0x7f63400009a0) at /home/portage/dev-libs/glib-2.44.1/work/glib-2.44.1/glib/gmain.c:4103
#2  g_main_context_iterate (context=context@entry=0x7f63400009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /home/portage/dev-libs/glib-2.44.1/work/glib-2.44.1/glib/gmain.c:3803
#3  0x00007f63513a474c in g_main_context_iteration (context=0x7f63400009a0, may_block=may_block@entry=1) at /home/portage/dev-libs/glib-2.44.1/work/glib-2.44.1/glib/gmain.c:3869
#4  0x00007f63553faebe in QEventDispatcherGlib::processEvents (this=0x7f63400008c0, flags=...) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qeventdispatcher_glib.cpp:452
#5  0x00007f63553c81c1 in QEventLoop::processEvents (this=this@entry=0x7f634535ae10, flags=...) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qeventloop.cpp:149
#6  0x00007f63553c8535 in QEventLoop::exec (this=this@entry=0x7f634535ae10, flags=...) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qeventloop.cpp:204
#7  0x00007f63552af8d9 in QThread::exec (this=<optimized out>) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/thread/qthread.cpp:538
#8  0x00007f63552b224c in QThreadPrivate::start (arg=0x19d4c10) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/thread/qthread_unix.cpp:352
#9  0x00007f6356463314 in start_thread (arg=0x7f634535b700) at pthread_create.c:333
#10 0x00007f6354c01d1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f633f523700 (LWP 2893)):
#0  g_mutex_unlock (mutex=0x7f63380009a0) at /home/portage/dev-libs/glib-2.44.1/work/glib-2.44.1/glib/gthread-posix.c:1348
#1  0x00007f63513a4631 in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7f6338003210, timeout=<optimized out>, context=0x7f63380009a0) at /home/portage/dev-libs/glib-2.44.1/work/glib-2.44.1/glib/gmain.c:4102
#2  g_main_context_iterate (context=context@entry=0x7f63380009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /home/portage/dev-libs/glib-2.44.1/work/glib-2.44.1/glib/gmain.c:3803
#3  0x00007f63513a474c in g_main_context_iteration (context=0x7f63380009a0, may_block=may_block@entry=1) at /home/portage/dev-libs/glib-2.44.1/work/glib-2.44.1/glib/gmain.c:3869
#4  0x00007f63553faebe in QEventDispatcherGlib::processEvents (this=0x7f63380008c0, flags=...) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qeventdispatcher_glib.cpp:452
#5  0x00007f63553c81c1 in QEventLoop::processEvents (this=this@entry=0x7f633f522dc0, flags=...) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qeventloop.cpp:149
#6  0x00007f63553c8535 in QEventLoop::exec (this=this@entry=0x7f633f522dc0, flags=...) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qeventloop.cpp:204
#7  0x00007f63552af8d9 in QThread::exec (this=this@entry=0x1a22f20) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/thread/qthread.cpp:538
#8  0x00007f63553a7433 in QInotifyFileSystemWatcherEngine::run (this=0x1a22f20) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/io/qfilesystemwatcher_inotify.cpp:265
#9  0x00007f63552b224c in QThreadPrivate::start (arg=0x1a22f20) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/thread/qthread_unix.cpp:352
#10 0x00007f6356463314 in start_thread (arg=0x7f633f523700) at pthread_create.c:333
#11 0x00007f6354c01d1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f63575e87c0 (LWP 9874)):
[KCrash Handler]
#6  unicode (this=0x1c69000) at ../../include/QtCore/../../../qt-everywhere-opensource-src-4.8.7/src/corelib/tools/qchar.h:251
#7  QUtf8::convertFromUnicode (uc=<optimized out>, len=27486384, state=0x0) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/codecs/qutfcodec.cpp:91
#8  0x00007f6355404a55 in QUtf8Codec::convertFromUnicode (this=<optimized out>, uc=<optimized out>, len=<optimized out>, state=<optimized out>) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/codecs/qutfcodec.cpp:522
#9  0x00007f635540001c in QTextCodec::fromUnicode (this=<optimized out>, str=...) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/codecs/qtextcodec.cpp:1375
#10 0x00007f63552fec99 in QString::toLocal8Bit (this=this@entry=0x7ffd85d23640) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/tools/qstring.cpp:3767
#11 0x00007f63553a3d00 in QProcessPrivate::startProcess (this=this@entry=0x19e69d0) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/io/qprocess_unix.cpp:638
#12 0x00007f6355357eb0 in QProcess::start (this=this@entry=0x7ffd85d23760, program=..., arguments=..., mode=...) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/io/qprocess.cpp:1998
#13 0x00007f635679ba3a in KProcess::start (this=this@entry=0x7ffd85d23760) at /home/portage/kde-base/kdelibs-4.14.11/work/kdelibs-4.14.11/kdecore/io/kprocess.cpp:344
#14 0x00007f635679ba70 in KProcess::execute (this=this@entry=0x7ffd85d23760, msecs=msecs@entry=10000) at /home/portage/kde-base/kdelibs-4.14.11/work/kdelibs-4.14.11/kdecore/io/kprocess.cpp:349
#15 0x00007f635679c3bc in KProcess::execute (argv=..., msecs=msecs@entry=10000) at /home/portage/kde-base/kdelibs-4.14.11/work/kdelibs-4.14.11/kdecore/io/kprocess.cpp:371
#16 0x00007f633f7d9e19 in Mounter::cleanMountPoint (this=this@entry=0x1a102e0) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-kde-0.8/plugins/sftp/mounter.cpp:251
#17 0x00007f633f7dba5a in Mounter::onFinished (this=0x1a102e0, exitCode=<optimized out>, exitStatus=<optimized out>) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-kde-0.8/plugins/sftp/mounter.cpp:201
#18 0x00007f633f7d9341 in Mounter::qt_static_metacall (_o=<optimized out>, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-0.8_build/plugins/sftp/moc_mounter.cpp:73
#19 0x00007f63553de130 in QMetaObject::activate (sender=sender@entry=0x1a66880, m=m@entry=0x7f635572ca60 <QProcess::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffd85d23980) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qobject.cpp:3567
#20 0x00007f6355350c6f in QProcess::finished (this=this@entry=0x1a66880, _t1=0, _t2=QProcess::CrashExit) at .moc/release-shared/moc_qprocess.cpp:155
#21 0x00007f635535ac06 in QProcessPrivate::_q_processDied (this=this@entry=0x194f680) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/io/qprocess.cpp:1089
#22 0x00007f63553a1b20 in QProcessPrivate::waitForFinished (this=this@entry=0x194f680, msecs=msecs@entry=30000) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/io/qprocess_unix.cpp:1278
#23 0x00007f6355350a5f in QProcess::waitForFinished (this=this@entry=0x1a66880, msecs=msecs@entry=30000) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/io/qprocess.cpp:1780
#24 0x00007f6355350f38 in QProcess::~QProcess (this=0x1a66880, __in_chrg=<optimized out>) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/io/qprocess.cpp:1172
#25 0x00007f635679b729 in KProcess::~KProcess (this=0x1a66880, __in_chrg=<optimized out>) at /home/portage/kde-base/kdelibs-4.14.11/work/kdelibs-4.14.11/kdecore/io/kprocess.cpp:125
#26 0x00007f633f7ddc3b in cleanup (pointer=<optimized out>) at /usr/include/qt4/QtCore/qscopedpointer.h:62
#27 ~QScopedPointer (this=0x1a102f8, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qscopedpointer.h:100
#28 Mounter::~Mounter (this=0x1a102e0, __in_chrg=<optimized out>) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-kde-0.8/plugins/sftp/mounter.cpp:65
#29 0x00007f633f7dde89 in Mounter::~Mounter (this=0x1a102e0, __in_chrg=<optimized out>) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-kde-0.8/plugins/sftp/mounter.cpp:69
#30 0x00007f63553e25b1 in QObjectPrivate::deleteChildren (this=this@entry=0x17ff340) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qobject.cpp:1935
#31 0x00007f63553e4cf4 in QObject::~QObject (this=0x19f76c0, __in_chrg=<optimized out>) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qobject.cpp:954
#32 0x00007f633f7e0bf3 in SftpPlugin::~SftpPlugin (this=0x19f76c0, __in_chrg=<optimized out>) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-kde-0.8/plugins/sftp/sftpplugin.cpp:63
#33 0x00007f633f7e0c39 in SftpPlugin::~SftpPlugin (this=0x19f76c0, __in_chrg=<optimized out>) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-kde-0.8/plugins/sftp/sftpplugin.cpp:68
#34 0x00007f635722d97f in qDeleteAll<QMap<QString, KdeConnectPlugin*>::const_iterator> (end=..., begin=...) at /usr/include/qt4/QtCore/qalgorithms.h:322
#35 qDeleteAll<QMap<QString, KdeConnectPlugin*> > (c=...) at /usr/include/qt4/QtCore/qalgorithms.h:330
#36 Device::reloadPlugins (this=this@entry=0x192caf0) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-kde-0.8/core/device.cpp:169
#37 0x00007f635722ed78 in Device::removeLink (this=0x192caf0, link=0x19daec0) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-kde-0.8/core/device.cpp:304
#38 0x00007f635721837c in Device::qt_static_metacall (_o=<optimized out>, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-0.8_build/core/moc_device.cpp:104
#39 0x00007f63553de130 in QMetaObject::activate (sender=sender@entry=0x19daec0, m=m@entry=0x7f63557280e0 <QObject::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffd85d240b0) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qobject.cpp:3567
#40 0x00007f63553dea3f in QObject::destroyed (this=this@entry=0x19daec0, _t1=_t1@entry=0x19daec0) at .moc/release-shared/moc_qobject.cpp:148
#41 0x00007f63553e4717 in QObject::~QObject (this=0x19daec0, __in_chrg=<optimized out>) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qobject.cpp:871
#42 0x00007f6357219956 in ~DeviceLink (this=0x19daec0, __in_chrg=<optimized out>) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-0.8_build/core/../../kdeconnect-kde-0.8/core/backends/loopback/../devicelink.h:39
#43 ~LanDeviceLink (this=0x19daec0, __in_chrg=<optimized out>) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-0.8_build/core/../../kdeconnect-kde-0.8/core/backends/lan/landevicelink.h:32
#44 LanDeviceLink::~LanDeviceLink (this=0x19daec0, __in_chrg=<optimized out>) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-0.8_build/core/../../kdeconnect-kde-0.8/core/backends/lan/landevicelink.h:32
#45 0x00007f63553e4158 in QObject::event (this=0x19daec0, e=<optimized out>) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qobject.cpp:1203
#46 0x00007f63558f8b9c in QApplicationPrivate::notify_helper (this=this@entry=0x1801030, receiver=receiver@entry=0x19daec0, e=e@entry=0x1a13b00) at /home/portage/dev-qt/qtgui-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/gui/kernel/qapplication.cpp:4565
#47 0x00007f63558ffc66 in QApplication::notify (this=this@entry=0x7ffd85d24860, receiver=receiver@entry=0x19daec0, e=e@entry=0x1a13b00) at /home/portage/dev-qt/qtgui-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/gui/kernel/qapplication.cpp:4351
#48 0x00007f6356dc0d8a in KApplication::notify (this=0x7ffd85d24860, receiver=0x19daec0, event=0x1a13b00) at /home/portage/kde-base/kdelibs-4.14.11/work/kdelibs-4.14.11/kdeui/kernel/kapplication.cpp:311
#49 0x00007f63553c999d in QCoreApplication::notifyInternal (this=0x7ffd85d24860, receiver=receiver@entry=0x19daec0, event=event@entry=0x1a13b00) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qcoreapplication.cpp:955
#50 0x00007f63553cd001 in sendEvent (event=0x1a13b00, receiver=0x19daec0) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qcoreapplication.h:231
#51 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x17d2600) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qcoreapplication.cpp:1579
#52 0x00007f63553cd303 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qcoreapplication.cpp:1472
#53 0x00007f63553fad2e in sendPostedEvents () at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qcoreapplication.h:236
#54 postEventSourceDispatch (s=0x18007c0) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qeventdispatcher_glib.cpp:300
#55 0x00007f63513a4447 in g_main_dispatch (context=0x18012a0) at /home/portage/dev-libs/glib-2.44.1/work/glib-2.44.1/glib/gmain.c:3122
#56 g_main_context_dispatch (context=context@entry=0x18012a0) at /home/portage/dev-libs/glib-2.44.1/work/glib-2.44.1/glib/gmain.c:3737
#57 0x00007f63513a46a0 in g_main_context_iterate (context=context@entry=0x18012a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /home/portage/dev-libs/glib-2.44.1/work/glib-2.44.1/glib/gmain.c:3808
#58 0x00007f63513a474c in g_main_context_iteration (context=0x18012a0, may_block=may_block@entry=1) at /home/portage/dev-libs/glib-2.44.1/work/glib-2.44.1/glib/gmain.c:3869
#59 0x00007f63553fae9e in QEventDispatcherGlib::processEvents (this=0x17d3f00, flags=...) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qeventdispatcher_glib.cpp:450
#60 0x00007f63559a3e16 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at /home/portage/dev-qt/qtgui-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#61 0x00007f63553c81c1 in QEventLoop::processEvents (this=this@entry=0x7ffd85d24780, flags=...) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qeventloop.cpp:149
#62 0x00007f63553c8535 in QEventLoop::exec (this=this@entry=0x7ffd85d24780, flags=...) at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qeventloop.cpp:204
#63 0x00007f63553ce209 in QCoreApplication::exec () at /home/portage/dev-qt/qtcore-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/corelib/kernel/qcoreapplication.cpp:1227
#64 0x00007f63558f732c in QApplication::exec () at /home/portage/dev-qt/qtgui-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/gui/kernel/qapplication.cpp:3823
#65 0x0000000000401290 in main (argc=<optimized out>, argv=0x7ffd85d249a8) at /home/portage/kde-misc/kdeconnect-0.8/work/kdeconnect-kde-0.8/kded/kdeconnectd.cpp:85

Possible duplicates by query: bug 297719.

Reported using DrKonqi
Comment 1 Albert Vaca Cintora 2015-10-18 00:55:33 UTC
Git commit 30f00fb3fae1f3af7eb7aae4c31b0aa994288001 by Albert Vaca.
Committed on 18/10/2015 at 00:31.
Pushed by albertvaka into branch '0.9'.

Fix a crash where unmount was called again after m_proc had been destroyed

This happened because of scheduling m_proc->kill() from unmount 5 seconds
after the destructor was called (which was who called unmount first).

Simplified unmount logic a bit as well. Known bug: we might end with a fuse
mountpoint still mounted after killing the sshfs process.

M  +22   -33   plugins/sftp/mounter.cpp
M  +2    -3    plugins/sftp/mounter.h

http://commits.kde.org/kdeconnect-kde/30f00fb3fae1f3af7eb7aae4c31b0aa994288001