https://bugs.kde.org/show_bug.cgi?id=474202

            Bug ID: 474202
           Summary: KDE Connect notifications can lead to plasmashell
                    deadlocking
    Classification: Plasma
           Product: plasmashell
           Version: 5.27.7
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Notifications
          Assignee: plasma-b...@kde.org
          Reporter: nyanpas...@tuta.io
                CC: k...@privat.broulik.de
  Target Milestone: 1.0

SUMMARY
When waking up a computer running KDE Connect and receiving many notifications
from a phone, plasmashell can hang waiting for data from KDE Connect, probably
because KDE Connect is hung sending notifications to plasmashell.

STEPS TO REPRODUCE
My best recollection of the steps leading to the hang:
1. Sleep a computer running KDE.
2. Receive many notifications (including a phone call) on an Android phone, and
leave them in the notification tray.
3. Wake the computer so the notifications are sent to KDE.

OBSERVED RESULT
plasmashell hangs. After I attach gdb and take the stack trace, then continue
gdb, many KDE Connect notifications appear.

EXPECTED RESULT
plasmashell doesn't hang.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.4.12-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 570 Series
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B550M DS3H

ADDITIONAL INFORMATION
Stack trace:

0x00007fdb8ec894ae in __futex_abstimed_wait_common64 (private=0, cancel=true,
abstime=0x0, op=393, expected=0, futex_word=0x55aa9de6ed70) at
futex-internal.c:57
57          return INTERNAL_SYSCALL_CANCEL (futex_time64, futex_word, op,
expected,
(gdb) bt
#0  0x00007fdb8ec894ae in __futex_abstimed_wait_common64 (private=0,
cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x55aa9de6ed70) at
futex-internal.c:57
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x55aa9de6ed70,
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  0x00007fdb8ec8952f in __GI___futex_abstimed_wait_cancelable64
(futex_word=futex_word@entry=0x55aa9de6ed70, expected=expected@entry=0,
clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at
futex-internal.c:139
#3  0x00007fdb8ec8bd40 in __pthread_cond_wait_common (abstime=0x0, clockid=0,
mutex=0x55aa9de6ed20, cond=0x55aa9de6ed48) at pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x55aa9de6ed48, mutex=0x55aa9de6ed20) at
pthread_cond_wait.c:618
#5  0x00007fdb8f4fb364 in QWaitConditionPrivate::wait(QDeadlineTimer)
(deadline=..., this=0x55aa9de6ed20) at thread/qwaitcondition_unix.cpp:146
#6  QWaitCondition::wait(QMutex*, QDeadlineTimer)
(this=this@entry=0x55aa9bb77870, mutex=mutex@entry=0x55aa9bb77868,
deadline=...) at thread/qwaitcondition_unix.cpp:225
#7  0x00007fdb901db786 in QDBusPendingCallPrivate::waitForFinished()
(this=0x55aa9bb77830) at
/usr/src/debug/qt5-base/qtbase/src/dbus/qdbuspendingcall.cpp:240
#8  0x00007fdb901abd01 in QDBusConnectionPrivate::sendWithReply(QDBusMessage
const&, int, int) (this=0x7fdb84001680, message=<optimized out>, sendMode=1,
timeout=<optimized out>) at
/usr/src/debug/qt5-base/qtbase/src/dbus/qdbusintegrator.cpp:2088
#9  0x00007fdb901a0d7a in QDBusConnection::call(QDBusMessage const&,
QDBus::CallMode, int) const (this=0x55aa9b9e4358, message=<optimized out>,
mode=<optimized out>, timeout=<optimized out>) at
/usr/src/debug/qt5-base/qtbase/src/dbus/qdbusconnection.cpp:680
#10 0x00007fdb901b3e87 in QDBusAbstractInterfacePrivate::property(QMetaProperty
const&, void*) const (returnValuePtr=0x7fff295bf400, mp=...,
this=0x55aa9b9e4300) at
/usr/src/debug/qt5-base/qtbase/src/dbus/qdbusabstractinterface.cpp:179
#11 QDBusAbstractInterfaceBase::qt_metacall(QMetaObject::Call, int, void**)
(this=this@entry=0x7fdb8409a080, _c=_c@entry=QMetaObject::ReadProperty,
_id=<optimized out>, _a=_a@entry=0x7fff295bf440) at
/usr/src/debug/qt5-base/qtbase/src/dbus/qdbusabstractinterface.cpp:290
#12 0x00007fdb901b4a4c in
QDBusAbstractInterface::qt_metacall(QMetaObject::Call, int, void**)
(this=this@entry=0x7fdb8409a080, _c=_c@entry=QMetaObject::ReadProperty,
_id=<optimized out>, _a=_a@entry=0x7fff295bf440) at
.moc/moc_qdbusabstractinterface.cpp:104
#13 0x00007fdb0af15d6a in
OrgKdeKdeconnectDeviceNotificationsNotificationInterface::qt_metacall(QMetaObject::Call,
int, void**) (this=0x7fdb8409a080, _c=QMetaObject::ReadProperty, _id=<optimized
out>, _a=0x7fff295bf440) at
/usr/src/debug/kdeconnect/build/interfaces/notificationinterface.moc:231
#14 0x00007fdb8f6b107c in QMetaProperty::read(QObject const*) const
(this=<optimized out>, object=0x7fdb8409a080) at kernel/qmetaobject.cpp:3198
#15 0x00007fdb8f6ccf90 in QObject::property(char const*) const
(this=0x7fdb8409a080, name=<optimized out>) at kernel/qobject.cpp:4142
#16 0x00007fdb0af06468 in
OrgKdeKdeconnectDeviceNotificationsNotificationInterface::text() const
(this=<optimized out>) at
/usr/src/debug/kdeconnect/build/interfaces/notificationinterface.h:68
#17 NotificationsModel::data(QModelIndex const&, int) const (this=<optimized
out>, index=<optimized out>, role=<optimized out>) at
/usr/src/debug/kdeconnect/kdeconnect-kde-23.08.0/interfaces/notificationsmodel.cpp:177
#18 0x00007fdb8e517d25 in QModelIndex::data(int) const (arole=257,
this=0x7fff295bf580) at /usr/include/qt/QtCore/qabstractitemmodel.h:460
#19 QQmlDMAbstractItemModelData::value(int) const (this=<optimized out>,
role=257) at
/usr/src/debug/qt5-declarative/qtdeclarative/src/qmlmodels/qqmladaptormodel.cpp:414
#20 0x00007fdb8e511c9b in QQmlDMCachedModelData::metaCall(QMetaObject::Call,
int, void**) (this=0x55aa9b5c9c80, call=<optimized out>, id=<optimized out>,
arguments=0x7fff295bf690) at
/usr/src/debug/qt5-declarative/qtdeclarative/src/qmlmodels/qqmladaptormodel.cpp:282
#21 0x00007fdb90b7445c in QQmlPropertyData::readProperty(QObject*, void*) const
(property=0x7fff295bf670, target=0x55aa9b5c9c80, this=0x55aa9f59e2f8) at
../../include/QtQml/5.15.10/QtQml/private/../../../../../../qtdeclarative/src/qml/qml/qqmlpropertydata_p.h:373
#22 loadProperty(QV4::ExecutionEngine*, QObject*, QQmlPropertyData const&)
(v4=0x55aa99db34d0, object=0x55aa9b5c9c80, property=...) at
/usr/src/debug/qt5-declarative/qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:176
#23 0x00007fdb90b7542d in
QV4::QObjectWrapper::getQmlProperty(QV4::ExecutionEngine*, QQmlContextData*,
QObject*, QV4::String*, QV4::QObjectWrapper::RevisionMode, bool*,
QQmlPropertyData**) (property=0x0, hasProperty=0x7fff295bf7b7,
revisionMode=QV4::QObjectWrapper::CheckRevision, name=0x7fdb713c0598,
object=0x55aa9b5c9c80, qmlContext=0x55aa9c17ecf0, engine=0x55aa99db34d0) at
/usr/src/debug/qt5-declarative/qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:388
#24 QV4::QObjectWrapper::getQmlProperty(QV4::ExecutionEngine*,
QQmlContextData*, QObject*, QV4::String*, QV4::QObjectWrapper::RevisionMode,
bool*, QQmlPropertyData**) (engine=0x55aa99db34d0, qmlContext=0x55aa9c17ecf0,
object=0x55aa9b5c9c80, name=0x7fdb713c0598,
revisionMode=QV4::QObjectWrapper::CheckRevision, hasProperty=0x7fff295bf7b7,
property=0x0) at
/usr/src/debug/qt5-declarative/qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:358
#25 0x00007fdb90b58142 in
QV4::QQmlContextWrapper::lookupInParentContextHierarchy(QV4::Lookup*,
QV4::ExecutionEngine*, QV4::Value*) (l=<optimized out>, engine=0x55aa99db34d0,
base=0x0) at
/usr/src/debug/qt5-declarative/qtdeclarative/src/qml/jsruntime/qv4qmlcontext.cpp:638
#26 0x00007fdb08b15065 in  ()
#27 0x00007fff295bf9f0 in  ()
#28 0x0000000000000000 in  ()

I did not have the chance to take a backtrace on kdeconnectd, and I was unable
to reproduce this hang again (easily created notifications like file downloads
are not sent over KDE Connect, and a few messaging notifications could not
reproduce the bug). OrgKdeKdeconnectDeviceNotificationsNotificationInterface
lives in generated code, so I was unable to find the source to debug it (and
didn't try building KDE Connect myself and looking in the files).

Compare to Bug 446581, but this takes place on a different codepath.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to