Bug 473351 - After boot KDE connect always crush
Summary: After boot KDE connect always crush
Status: REPORTED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: 22.12.3
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2023-08-14 03:54 UTC by Daiver
Modified: 2023-11-21 13:46 UTC (History)
4 users (show)

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


Attachments
New crash information added by DrKonqi (2.99 KB, text/plain)
2023-11-18 06:15 UTC, dylan
Details
New crash information added by DrKonqi (3.22 KB, text/plain)
2023-11-20 18:10 UTC, BigE
Details
New crash information added by DrKonqi (3.05 KB, text/plain)
2023-11-21 13:46 UTC, BigE
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daiver 2023-08-14 03:54:27 UTC
Application: kdeconnectd (22.12.3)

Qt Version: 5.15.9
Frameworks Version: 5.105.0
Operating System: Linux 6.4.10-1.el9.elrepo.x86_64 x86_64
Windowing System: X11
Distribution: CentOS Stream 9
DrKonqi: 5.27.4 [KCrashBackend]

-- Information about the crash:
OS: CentOS 9, latest update from public repo.
KDE Connect crush on boot.

The crash can be reproduced every time.

-- Backtrace:
Application: Фоновая служба KDE Connect (kdeconnectd), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f7ea805d7e6 in KdeConnectConfig::deviceId() () from /lib64/libkdeconnectcore.so.22
#5  0x00007f7ea80622c7 in NetworkPacket::createIdentityPacket(NetworkPacket*) () from /lib64/libkdeconnectcore.so.22
#6  0x00007f7ea804e4d0 in LanLinkProvider::broadcastToNetwork() () from /lib64/libkdeconnectcore.so.22
#7  0x00007f7ea68dbca9 in QtPrivate::QSlotObjectBase::call (a=0x7ffcdf8d3e20, r=<optimized out>, this=0x5619ac3b9400) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#8  doActivate<false> (sender=0x5619ac1ce9e8, signal_index=3, argv=0x7ffcdf8d3e20) at kernel/qobject.cpp:3923
#9  0x00007f7ea68d6987 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f7ea6b6f560 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffcdf8d3e20) at kernel/qobject.cpp:3983
#10 0x00007f7ea68def2e in QTimer::timeout (this=<optimized out>, _t1=...) at .moc/moc_qtimer.cpp:205
#11 0x00007f7ea68d2ccf in QObject::event (this=0x5619ac1ce9e8, e=0x7ffcdf8d3f80) at kernel/qobject.cpp:1369
#12 0x00007f7ea75af533 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5619ac1ce9e8, e=0x7ffcdf8d3f80) at kernel/qapplication.cpp:3640
#13 0x00007f7ea68a7998 in QCoreApplication::notifyInternal2 (receiver=0x5619ac1ce9e8, event=0x7ffcdf8d3f80) at kernel/qcoreapplication.cpp:1064
#14 0x00007f7ea68f8b13 in QTimerInfoList::activateTimers (this=0x5619abe87210) at kernel/qtimerinfo_unix.cpp:643
#15 0x00007f7ea68f940c in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:183
#16 0x00007f7ea4e57e2f in g_main_dispatch (context=0x7f7e90005000) at ../glib/gmain.c:3337
#17 g_main_context_dispatch (context=0x7f7e90005000) at ../glib/gmain.c:4055
#18 0x00007f7ea4ead108 in g_main_context_iterate.constprop.0 (context=context@entry=0x7f7e90005000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4131
#19 0x00007f7ea4e555f3 in g_main_context_iteration (context=0x7f7e90005000, may_block=1) at ../glib/gmain.c:4196
#20 0x00007f7ea68f9818 in QEventDispatcherGlib::processEvents (this=0x5619abe87520, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#21 0x00007f7ea68a63a2 in QEventLoop::exec (this=this@entry=0x7ffcdf8d4220, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#22 0x00007f7ea68ae8d4 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#23 0x00005619aa2e10ae in main ()
[Inferior 1 (process 2999) detached]

Reported using DrKonqi
Comment 1 Pedro V 2023-08-14 06:16:11 UTC
Did you start encountering the issue after an update, or is this the first run of the program?

You should check ~/.config/kdeconnect/ where privateKey.pem and certificate.pem should be two "reasonable looking" text files starting with "-----BEGIN [...]-----" and ending with "-----END [...]-----" .

Hard to guess wisely without being familiar with the code, but I'd consider the following problems:
- The files just don't exist which is likely the least likely option, at least on its own
- The files exist, but they are empty or have garbage data in them. Seems like there's some protection against this case too, but temporarily moving the whole directory out of the way would let you see if that's the problem. Advising moving and not deleting, so you don't lose your data for a test, but you may be okay with reconfiguring from scratch
- The files may or may not exist, but there are permission (or generic I/O) errors somewhere which really shouldn't happen, but I'm not convinced these errors are handled too well, so they can cause unexpected problems later in the process

You may need to adjust the path depending on where your kdeconnectd binary is, but you can get more useful output by running the following command:
QT_LOGGING_RULES="*.debug=true; qt.*.debug=false" /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd --replace

Looking back to the code, there were quite significant related changes somewhat recently, and it seems like there are quite a few error checks you likely don't have in your version. That still doesn't change my suspicion that you likely have a broken environment, so the bug is likely not bailing out in time before an issue causes a crash later.
Comment 2 dylan 2023-11-18 06:15:17 UTC
Created attachment 163256 [details]
New crash information added by DrKonqi

kdeconnectd (23.04.3) using Qt 5.15.9

Occurs after a standard install of Plasma on CentOS 9
Certificate  file in .config is empty

-- Backtrace (Reduced):
#4  0x00007f4caebfe3d6 in KdeConnectConfig::deviceId() () from /lib64/libkdeconnectcore.so.23
#5  0x00007f4caec02eb7 in NetworkPacket::createIdentityPacket(NetworkPacket*) () from /lib64/libkdeconnectcore.so.23
#6  0x00007f4caebef4c0 in LanLinkProvider::broadcastToNetwork() () from /lib64/libkdeconnectcore.so.23
#7  0x00007f4cad2dbca9 in QtPrivate::QSlotObjectBase::call (a=0x7fff02723750, r=<optimized out>, this=0x562e3cc2f7c0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#8  doActivate<false> (sender=0x562e3cadba38, signal_index=3, argv=0x7fff02723750) at kernel/qobject.cpp:3923
Comment 3 BigE 2023-11-20 18:10:59 UTC
Created attachment 163320 [details]
New crash information added by DrKonqi

kdeconnectd (23.04.3) using Qt 5.15.9

CentOS Stream 9
KDE Plama Workspaces
Dell Precision 5250 Laptop
SELinux is disabled and firewall is off.
If you need any more information please let me know.

Every boot the kdeconnectd fails. Once I connect to bluetooth it seems to subside untill I go into ssettings and choose kdeconnect then I get the app failure essage again,

-- Backtrace (Reduced):
#4  0x00007ffb7b0d63d6 in KdeConnectConfig::deviceId() () from /lib64/libkdeconnectcore.so.23
#5  0x00007ffb7b0daeb7 in NetworkPacket::createIdentityPacket(NetworkPacket*) () from /lib64/libkdeconnectcore.so.23
#6  0x00007ffb7b0c74c0 in LanLinkProvider::broadcastToNetwork() () from /lib64/libkdeconnectcore.so.23
#7  0x00007ffb798dbca9 in QtPrivate::QSlotObjectBase::call (a=0x7ffca7a493b0, r=<optimized out>, this=0x5555b5b65fb0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#8  doActivate<false> (sender=0x5555b5bd3ba8, signal_index=3, argv=0x7ffca7a493b0) at kernel/qobject.cpp:3923
Comment 4 BigE 2023-11-21 13:46:53 UTC
Created attachment 163343 [details]
New crash information added by DrKonqi

kdeconnectd (23.04.3) using Qt 5.15.9

CentOS STream 9 with KDE Plasma Woekspaces. Installed through epel and epel-next.
Anytime I try to usse kdeconnect, it crashes. I'm still researching.

-- Backtrace (Reduced):
#4  0x00007f5651d793d6 in KdeConnectConfig::deviceId() () from /lib64/libkdeconnectcore.so.23
#5  0x00007f5651d7deb7 in NetworkPacket::createIdentityPacket(NetworkPacket*) () from /lib64/libkdeconnectcore.so.23
#6  0x00007f5651d6a4c0 in LanLinkProvider::broadcastToNetwork() () from /lib64/libkdeconnectcore.so.23
#7  0x00007f56504dbca9 in QtPrivate::QSlotObjectBase::call (a=0x7ffc1d878f50, r=<optimized out>, this=0x562b8c9f08e0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#8  doActivate<false> (sender=0x562b8ca356d8, signal_index=3, argv=0x7ffc1d878f50) at kernel/qobject.cpp:3923