Bug 452304 - KDE Connect segmentation fault while doing nothing
Summary: KDE Connect segmentation fault while doing nothing
Status: REPORTED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-04-05 18:46 UTC by yamalisafak
Modified: 2022-08-05 15:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (2.46 KB, text/plain)
2022-08-05 15:31 UTC, ALEXPRO100
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yamalisafak 2022-04-05 18:46:26 UTC
Application: kdeconnectd (21.12.3)

Qt Version: 5.15.3
Frameworks Version: 5.92.0
Operating System: Linux 5.13.0-39-generic x86_64
Windowing System: X11
Distribution: KDE neon User - 5.24
DrKonqi: 5.24.4 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
I was watching a video on librewolf browser and just got a notification saying kde connect has crashed. This has happened several times before. 
Phone os: android 11 aosp, kde connect downloaded from f-droid, all up to date.

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: KDE Connect Daemon (kdeconnectd), signal: Segmentation fault

[New LWP 1743]
[New LWP 1773]
[New LWP 1794]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fdea0fea9cf in __GI___poll (fds=0x7ffe84a693b8, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
__preamble__
[Current thread is 1 (Thread 0x7fde9d2272c0 (LWP 1712))]

Thread 4 (Thread 0x7fde99571700 (LWP 1794)):
#0  0x00007fdea0fea9cf in __GI___poll (fds=0x7fde90004a60, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fde9f95136e in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fde9f9514a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fdea15bd65b in QEventDispatcherGlib::processEvents (this=0x7fde90000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007fdea156187b in QEventLoop::exec (this=this@entry=0x7fde99570be0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#5  0x00007fdea137b442 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#6  0x00007fdea137c623 in QThreadPrivate::start (arg=0x55f148fbb300) at thread/qthread_unix.cpp:331
#7  0x00007fdea036c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#8  0x00007fdea0ff7163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7fde9a782700 (LWP 1773)):
#0  __GI___libc_read (nbytes=16, buf=0x7fde9a7819a0, fd=7) at ../sysdeps/unix/sysv/linux/read.c:26
#1  __GI___libc_read (fd=7, buf=0x7fde9a7819a0, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:24
#2  0x00007fde9f999b2f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fde9f950ebe in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fde9f951312 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fde9f9514a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007fdea15bd65b in QEventDispatcherGlib::processEvents (this=0x7fde8c000b60, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#7  0x00007fdea156187b in QEventLoop::exec (this=this@entry=0x7fde9a781bb0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#8  0x00007fdea137b442 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#9  0x00007fdea1eeef4b in ?? () from /lib/x86_64-linux-gnu/libQt5DBus.so.5
#10 0x00007fdea137c623 in QThreadPrivate::start (arg=0x7fdea1f72d80) at thread/qthread_unix.cpp:331
#11 0x00007fdea036c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#12 0x00007fdea0ff7163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fde9c181700 (LWP 1743)):
#0  0x00007fdea0fea9cf in __GI___poll (fds=0x7fde9c180ae8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fde9f64ac1a in ?? () from /lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007fde9f64c90a in xcb_wait_for_event () from /lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007fde9c8c41a8 in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007fdea137c623 in QThreadPrivate::start (arg=0x55f148e47730) at thread/qthread_unix.cpp:331
#5  0x00007fdea036c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007fdea0ff7163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fde9d2272c0 (LWP 1712)):
[KCrash Handler]
#4  std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=0x0) at /usr/include/c++/9/bits/atomic_base.h:413
#5  QAtomicOps<int>::loadRelaxed<int> (_q_value=...) at ../../include/QtCore/../../src/corelib/thread/qatomic_cxx11.h:239
#6  QBasicAtomicInteger<int>::loadRelaxed (this=0x0) at ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:107
#7  QtPrivate::RefCount::ref (this=0x0) at ../../include/QtCore/../../src/corelib/tools/qrefcount.h:55
#8  0x00007fdea14e35ed in QString::QString (other=..., this=0x7ffe84a6a128) at ../../include/QtCore/../../src/corelib/text/qstring.h:1094
#9  QSettingsPrivate::normalizedKey (key=...) at io/qsettings.cpp:269
#10 0x00007fdea14e8a23 in QSettings::beginGroup (this=<optimized out>, prefix=...) at io/qsettings.cpp:3017
#11 0x00007fdea2b770bc in KdeConnectConfig::getDeviceProperty (this=0x7fdea2babdb8 <KdeConnectConfig::instance()::kcc>, deviceId=..., key=..., defaultValue=...) at ./core/kdeconnectconfig.cpp:211
#12 0x00007fdea2b58e29 in LanLinkProvider::configureSslSocket (socket=0x7fde8c057fa0, deviceId=..., isDeviceTrusted=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:967
#13 0x00007fdea2b65b1b in CompositeUploadJob::newConnection (this=0x7fde8c080e40) at ./core/backends/lan/compositeuploadjob.cpp:148
#14 0x00007fdea1599dfe in QtPrivate::QSlotObjectBase::call (a=0x7ffe84a6a3b0, r=0x7fde8c080e40, this=0x55f149288980) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#15 doActivate<false> (sender=0x55f1492585c0, signal_index=3, argv=0x7ffe84a6a3b0) at kernel/qobject.cpp:3886
#16 0x00007fdea15931c7 in QMetaObject::activate (sender=sender@entry=0x55f1492585c0, m=m@entry=0x7fdea0dc3720 <QTcpServer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3946
#17 0x00007fdea0cf2404 in QTcpServer::newConnection (this=this@entry=0x55f1492585c0) at .moc/moc_qtcpserver.cpp:155
#18 0x00007fdea0cf2c5e in QTcpServerPrivate::readNotification (this=0x55f149325af0) at socket/qtcpserver.cpp:224
#19 0x00007fdea0cfef39 in QReadNotifier::event (this=<optimized out>, e=<optimized out>) at socket/qnativesocketengine.cpp:1274
#20 0x00007fdea20e1dc3 in QApplicationPrivate::notify_helper (this=this@entry=0x55f148e44de0, receiver=receiver@entry=0x55f14927b280, e=e@entry=0x7ffe84a6a6a0) at kernel/qapplication.cpp:3637
#21 0x00007fdea20eabd8 in QApplication::notify (this=0x7ffe84a6a970, receiver=0x55f14927b280, e=0x7ffe84a6a6a0) at kernel/qapplication.cpp:3161
#22 0x00007fdea1562d7a in QCoreApplication::notifyInternal2 (receiver=0x55f14927b280, event=0x7ffe84a6a6a0) at ../../include/QtCore/5.15.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:332
#23 0x00007fdea15be245 in socketNotifierSourceDispatch (source=0x55f148f12710) at kernel/qeventdispatcher_glib.cpp:107
#24 0x00007fde9f95117d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007fde9f951400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007fde9f9514a3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007fdea15bd642 in QEventDispatcherGlib::processEvents (this=0x55f148f15d60, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#28 0x00007fdea156187b in QEventLoop::exec (this=this@entry=0x7ffe84a6a8b0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#29 0x00007fdea1569a24 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#30 0x000055f147537f87 in main (argc=<optimized out>, argv=<optimized out>) at ./daemon/kdeconnectd.cpp:178
[Inferior 1 (process 1712) detached]

The reporter indicates this bug may be a duplicate of or related to bug 432466.

Possible duplicates by query: bug 451190, bug 432466, bug 428118, bug 407271.

Reported using DrKonqi
Comment 1 ALEXPRO100 2022-08-05 15:31:54 UTC
Created attachment 151130 [details]
New crash information added by DrKonqi

kdeconnectd (22.04.3) using Qt 5.15.5

This happens sometimes when my phone disables wi-fi to keep energy. Unfortunetly, this behaviour cannot be controlled.
It would be great to add some bypass mechanism to keep trying to reconnect or send event to phone without  segfault.

-- Backtrace (Reduced):
#5  0x00007f75b4dee2d0 in QSettings::beginGroup(QString const&) () from /usr/lib/libQt5Core.so.5
#6  0x00007f75b62d72fc in KdeConnectConfig::getDeviceProperty(QString const&, QString const&, QString const&) () from /usr/lib/libkdeconnectcore.so.22
#7  0x00007f75b62c61ca in LanLinkProvider::configureSslSocket(QSslSocket*, QString const&, bool) () from /usr/lib/libkdeconnectcore.so.22
#8  0x00007f75b62cf6b6 in CompositeUploadJob::newConnection() () from /usr/lib/libkdeconnectcore.so.22
[...]
#10 0x00007f75b45fa1c8 in QTcpServerPrivate::readNotification() () from /usr/lib/libQt5Network.so.5