Bug 405207 - KDE connect daemon always crashes
Summary: KDE connect daemon always crashes
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: 1.3.3
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2019-03-08 08:34 UTC by Bart
Modified: 2024-09-17 17:11 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
New crash information added by DrKonqi (7.03 KB, patch)
2020-03-23 11:52 UTC, Alexandr
Details
New crash information added by DrKonqi (2.38 KB, text/plain)
2022-10-28 08:56 UTC, sam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bart 2019-03-08 08:34:45 UTC
Application: kdeconnectd (1.3.3)

Qt Version: 5.12.0
Frameworks Version: 5.56.0
Operating System: Linux 4.18.0-16-generic x86_64
Distribution: Ubuntu 18.10

-- Information about the crash:
KDE connect daemon always crashes when starting KDE connect. 
The application is unusable because of this.

- What I was doing when the application crashed:
Started KDE Connect

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Connect Daemon (kdeconnectd), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7eff6db78800 (LWP 14746))]

Thread 4 (Thread 0x7eff6383a700 (LWP 14752)):
#0  0x00007eff771f5ed3 in timerSourcePrepareHelper (timeout=0x7eff63839bd4, src=<optimized out>) at kernel/qeventdispatcher_glib.cpp:133
#1  timerSourcePrepare (source=<optimized out>, timeout=0x7eff63839bd4) at kernel/qeventdispatcher_glib.cpp:165
#2  0x00007eff72781379 in g_main_context_prepare () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007eff72781d7b in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007eff72781f6c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007eff771f615b in QEventDispatcherGlib::processEvents (this=0x7eff54000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x00007eff7719764a in QEventLoop::exec (this=this@entry=0x7eff63839da0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#7  0x00007eff76fbf41a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#8  0x00007eff76fc0bc2 in QThreadPrivate::start (arg=0x559abaf68000) at thread/qthread_unix.cpp:361
#9  0x00007eff73cfc164 in start_thread (arg=<optimized out>) at pthread_create.c:486
#10 0x00007eff76cbfdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7eff6403b700 (LWP 14751)):
#0  0x00007eff76cb36d9 in __GI___poll (fds=0x7eff5c022890, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007eff72781e46 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007eff72781f6c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007eff771f615b in QEventDispatcherGlib::processEvents (this=0x7eff5c000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007eff7719764a in QEventLoop::exec (this=this@entry=0x7eff6403ad70, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#5  0x00007eff76fbf41a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#6  0x00007eff75cb2015 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007eff76fc0bc2 in QThreadPrivate::start (arg=0x7eff75f29d80) at thread/qthread_unix.cpp:361
#8  0x00007eff73cfc164 in start_thread (arg=<optimized out>) at pthread_create.c:486
#9  0x00007eff76cbfdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7eff6c8dd700 (LWP 14747)):
#0  0x00007eff76cb36d9 in __GI___poll (fds=0x7eff6c8dccb8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007eff71447917 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007eff7144953a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007eff6d06e32a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007eff76fc0bc2 in QThreadPrivate::start (arg=0x559abaf0a7f0) at thread/qthread_unix.cpp:361
#5  0x00007eff73cfc164 in start_thread (arg=<optimized out>) at pthread_create.c:486
#6  0x00007eff76cbfdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7eff6db78800 (LWP 14746)):
[KCrash Handler]
#6  QMap<QByteArray, QString>::isEmpty (this=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qmap.h:362
#7  QSslCertificate::subjectInfo (this=0x559abaf65a78, info=info@entry=QSslCertificate::CommonName) at ssl/qsslcertificate_openssl.cpp:154
#8  0x00007eff793600e0 in KdeConnectConfig::deviceId (this=this@entry=0x559abaf67e70) at ./core/kdeconnectconfig.cpp:112
#9  0x00007eff7936363a in NetworkPacket::createIdentityPacket (np=np@entry=0x7ffde65e6d70) at ./core/networkpacket.cpp:74
#10 0x00007eff793405a6 in LanLinkProvider::broadcastToNetwork (this=0x559abaf67e90) at ./core/backends/lan/lanlinkprovider.cpp:138
#11 0x00007eff771c8f3f in QtPrivate::QSlotObjectBase::call (a=0x7ffde65e6ef0, r=0x559abaf67e90, this=0x559abaf69310) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#12 QMetaObject::activate (sender=sender@entry=0x559abaf67ee8, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffde65e6ef0) at kernel/qobject.cpp:3759
#13 0x00007eff771c94f7 in QMetaObject::activate (sender=sender@entry=0x559abaf67ee8, m=m@entry=0x7eff77645da0 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffde65e6ef0) at kernel/qobject.cpp:3631
#14 0x00007eff771d5c57 in QTimer::timeout (this=this@entry=0x559abaf67ee8, _t1=...) at .moc/moc_qtimer.cpp:204
#15 0x00007eff771d5fb8 in QTimer::timerEvent (this=0x559abaf67ee8, e=<optimized out>) at kernel/qtimer.cpp:255
#16 0x00007eff771c994b in QObject::event (this=0x559abaf67ee8, e=<optimized out>) at kernel/qobject.cpp:1271
#17 0x00007eff7822683c in QApplicationPrivate::notify_helper (this=this@entry=0x559abaeee220, receiver=receiver@entry=0x559abaf67ee8, e=e@entry=0x7ffde65e7260) at kernel/qapplication.cpp:3752
#18 0x00007eff7822ddd0 in QApplication::notify (this=0x7ffde65e7580, receiver=0x559abaf67ee8, e=0x7ffde65e7260) at kernel/qapplication.cpp:3499
#19 0x00007eff77199328 in QCoreApplication::notifyInternal2 (receiver=0x559abaf67ee8, event=0x7ffde65e7260) at kernel/qcoreapplication.cpp:1061
#20 0x00007eff771f55a9 in QTimerInfoList::activateTimers (this=0x559abaf54bb0) at kernel/qtimerinfo_unix.cpp:643
#21 0x00007eff771f5d71 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:182
#22 0x00007eff72781c3e in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007eff72781ed8 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007eff72781f6c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007eff771f613f in QEventDispatcherGlib::processEvents (this=0x559abaf54e00, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#26 0x00007eff7719764a in QEventLoop::exec (this=this@entry=0x7ffde65e74b0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:225
#27 0x00007eff771a0800 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1364
#28 0x0000559aba81622c in main (argc=<optimized out>, argv=<optimized out>) at ./daemon/kdeconnectd.cpp:105
[Inferior 1 (process 14746) detached]

Reported using DrKonqi
Comment 1 Nicolas Fella 2019-03-08 20:16:47 UTC
Looks like there is an issue with the certificate. Can you please move ~/.config/kdeconnect/ to some other place and then delete the original folder and check if the problem persists?
Comment 2 Bart 2019-03-08 20:22:49 UTC
Hi,

After checking the certificates mentioned in that folder, I could see that the pem  files were empty:

-rw------- 1      0 Mar  4 16:45 ../kdeconnect/privateKey.pem
-rw------- 1      0 Mar  4 16:45 ../kdeconnect/certificate.pem

removing the directory and restarting kde connect indeed resolved the problem.
thanks!
Comment 3 Albert Vaca Cintora 2019-05-08 21:10:24 UTC
Git commit 09ba6b76318275bd1128ace68180e3ca789fed44 by Albert Vaca Cintora, on behalf of Albert Vaca.
Committed on 08/05/2019 at 20:56.
Pushed by albertvaka into branch 'albertvaka/kdeconnect-kde-master'.

Better error handling when loading cert and key

M  +1    -0    core/daemon.h
M  +95   -42   core/kdeconnectconfig.cpp
M  +2    -3    core/kdeconnectconfig.h
M  +8    -0    daemon/kdeconnectd.cpp
M  +4    -0    tests/testdaemon.h

https://invent.kde.org/kde/kdeconnect-kde/commit/09ba6b76318275bd1128ace68180e3ca789fed44
Comment 4 Albert Vaca Cintora 2019-05-08 21:15:38 UTC
Git commit 3a2ada53993fc098be248c9e619bcece0bf074e1 by Albert Vaca.
Committed on 11/03/2019 at 12:49.
Pushed by albertvaka into branch 'albertvaka/master'.

Better error handling when loading cert and key

M  +1    -0    core/daemon.h
M  +95   -42   core/kdeconnectconfig.cpp
M  +2    -3    core/kdeconnectconfig.h
M  +8    -0    daemon/kdeconnectd.cpp
M  +4    -0    tests/testdaemon.h

https://invent.kde.org/kde/kdeconnect-kde/commit/3a2ada53993fc098be248c9e619bcece0bf074e1
Comment 5 Albert Vaca Cintora 2019-05-08 22:04:14 UTC
Git commit 3fc7df550ba00341f8a4b1888f264e1361cb3d4d by Albert Vaca Cintora, on behalf of Albert Vaca.
Committed on 08/05/2019 at 22:03.
Pushed by albertvaka into branch 'master'.

Better error handling when loading cert and key

M  +1    -0    core/daemon.h
M  +95   -42   core/kdeconnectconfig.cpp
M  +2    -3    core/kdeconnectconfig.h
M  +8    -0    daemon/kdeconnectd.cpp
M  +4    -0    tests/testdaemon.h

https://invent.kde.org/kde/kdeconnect-kde/commit/3fc7df550ba00341f8a4b1888f264e1361cb3d4d
Comment 6 Alexandr 2020-03-23 11:52:01 UTC
Created attachment 126966 [details]
New crash information added by DrKonqi

kdeconnectd (1.3.5) using Qt 5.13.2

- What I was doing when the application crashed:

1) ctrl+alt+f2
2) root login
3) dnf update
4) reboot system

After each launch the application crashes.

Ryzen 5 2600x, b450
installed video cards in the system of gtx 1660 and gtx 960. If it matters.

-- Backtrace (Reduced):
#6  0x00007f3a666b84ec in QSslCertificate::subjectInfo(QSslCertificate::SubjectInfo) const () from /lib64/libQt5Network.so.5
#7  0x00007f3a67fe2a35 in KdeConnectConfig::deviceId() () from /lib64/libkdeconnectcore.so.1
#8  0x00007f3a67fe7c26 in NetworkPacket::createIdentityPacket(NetworkPacket*) () from /lib64/libkdeconnectcore.so.1
#9  0x00007f3a67fc4954 in LanLinkProvider::broadcastToNetwork() () from /lib64/libkdeconnectcore.so.1
[...]
#11 0x00007f3a66da818b in QTimer::timeout(QTimer::QPrivateSignal) () from /lib64/libQt5Core.so.5
Comment 7 sam 2022-10-28 08:56:30 UTC
Created attachment 153254 [details]
New crash information added by DrKonqi

kdeconnectd (21.04.3) using Qt 5.15.2

- What I was doing when the application crashed:
this happens every time and is not fixed.

This started happening when i switched to gnome and installed gsconnect. i removed that and gnome and switched back to KDE, now this issue has started occurring

-- Backtrace (Reduced):
#4  0x00007feec0f105f6 in KdeConnectConfig::deviceId() () from /lib64/libkdeconnectcore.so.21
#5  0x00007feec0f152f7 in NetworkPacket::createIdentityPacket(NetworkPacket*) () from /lib64/libkdeconnectcore.so.21
#6  0x00007feec0f01280 in LanLinkProvider::broadcastToNetwork() () from /lib64/libkdeconnectcore.so.21
#7  0x00007feebfa1bf19 in void doActivate<false>(QObject*, int, void**) () from /lib64/libQt5Core.so.5
#8  0x00007feebfa1f1be in QTimer::timeout(QTimer::QPrivateSignal) () from /lib64/libQt5Core.so.5
Comment 8 Méven Car 2024-09-17 17:11:11 UTC
*** Bug 481760 has been marked as a duplicate of this bug. ***