Bug 496296 - KClock daemon crashes in WaitTimerWakeupProvider::~WaitTimerWakeupProvider() right after login
Summary: KClock daemon crashes in WaitTimerWakeupProvider::~WaitTimerWakeupProvider() ...
Status: RESOLVED FIXED
Alias: None
Product: KClock
Classification: Applications
Component: General (show other bugs)
Version: 24.11.80
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Devin Lin
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2024-11-15 08:14 UTC by Sven Eden
Modified: 2024-11-15 22:50 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Eden 2024-11-15 08:14:05 UTC
Application: kclockd (24.11.80)
 (Compiled from sources)
ApplicationNotResponding [ANR]: false
Qt Version: 6.7.3
Frameworks Version: 6.8.0
Operating System: Linux 6.10.14-gentoo x86_64
Windowing System: X11
Distribution: "Gentoo Linux"
DrKonqi: 6.2.4 [KCrashBackend]

-- Information about the crash:
After logging into Plasma 6 and entering my KWallet password, some autostart apps need my wallet to be opened, I noticed a crash report of KClock daemon being crashed.

I have not tried again, yet.

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: KClock daemon (kclockd), signal: Aborted
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = 0x0}
[KCrash Handler]
#4  0x00007f35294b1c0c in ??? () at /usr/lib64/libc.so.6
#5  0x00007f352945c576 in raise () at /usr/lib64/libc.so.6
#6  0x00007f35294448fa in abort () at /usr/lib64/libc.so.6
#7  0x00007f3529ac28a0 in qAbort () at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/global/qglobal.cpp:161
#8  0x00007f3529d719b0 in qt_message_fatal<QString&> (context=<optimized out>, message=...) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/global/qlogging.cpp:2025
#9  qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, context=..., msg=msg@entry=0x7f3529dd3020 "QThread: Destroyed while thread is still running", ap=ap@entry=0x7ffe44f9d2d0) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/global/qlogging.cpp:374
#10 0x00007f3529ac3487 in QMessageLogger::fatal (this=this@entry=0x7ffe44f9d3b0, msg=msg@entry=0x7f3529dd3020 "QThread: Destroyed while thread is still running") at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/global/qlogging.cpp:889
#11 0x00007f3529aa8cb9 in QThread::~QThread (this=0x558d334635f0, __in_chrg=<optimized out>) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/thread/qthread.cpp:466
#12 0x00007f3529c22a5d in QThread::~QThread (this=0x558d334635f0, __in_chrg=<optimized out>) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/thread/qthread.cpp:470
#13 0x00007f3529c9b505 in QObjectPrivate::deleteChildren (this=this@entry=0x558d33462e70) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qobject.cpp:2222
#14 0x00007f3529cbeb89 in QObject::~QObject (this=<optimized out>, __in_chrg=<optimized out>) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qobject.cpp:1172
#15 0x0000558d21d108bd in WaitTimerWakeupProvider::~WaitTimerWakeupProvider (this=0x558d33463340, __in_chrg=<optimized out>) at /data/portage/portage/kde-misc/kclock-24.12.49.9999/work/kclock-24.12.49.9999/src/kclockd/waittimerwakeupprovider.cpp:21
#16 0x0000558d21cfe762 in operator() (__closure=0x558d33463fa0) at /data/portage/portage/kde-misc/kclock-24.12.49.9999/work/kclock-24.12.49.9999/src/kclockd/utilities.cpp:71
#17 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, Utilities::Utilities(QObject*)::<lambda()> >::call (f=..., arg=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:137
#18 QtPrivate::FunctorCallable<Utilities::Utilities(QObject*)::<lambda()> >::call<QtPrivate::List<>, void> (f=..., arg=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:345
#19 QtPrivate::QCallableObject<Utilities::Utilities(QObject*)::<lambda()>, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x558d33463f90, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:555
#20 0x00007f3529cdfa65 in QtPrivate::QSlotObjectBase::call (this=<optimized out>, r=0x558d21d27c20 <Utilities::instance()::singleton>, a=0x7ffe44f9d670) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qobjectdefs_impl.h:469
#21 doActivate<false> (sender=0x558d33463de0, signal_index=3, argv=0x7ffe44f9d670) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qobject.cpp:4086
#22 0x00007f3529c9faa7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f352a7e84c0 <QDBusServiceWatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffe44f9d670) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qobject.cpp:4146
#23 0x00007f352a750756 in QDBusServiceWatcher::serviceRegistered (this=<optimized out>, _t1=<optimized out>) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3_build/src/dbus/DBus_autogen/include/moc_qdbusservicewatcher.cpp:244
#24 0x00007f352a774393 in QDBusServiceWatcherPrivate::_q_serviceOwnerChanged (this=<optimized out>, service=<optimized out>, oldOwner=<optimized out>, newOwner=<optimized out>) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/dbus/qdbusservicewatcher.cpp:55
#25 0x00007f352a789898 in QDBusServiceWatcher::qt_metacall (this=0x558d33463de0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7ffe44f9d808) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3_build/src/dbus/DBus_autogen/include/moc_qdbusservicewatcher.cpp:225
#26 0x00007f352a76ce48 in QDBusConnectionPrivate::deliverCall (this=0x7f3520001680, object=0x558d33463de0, msg=..., metaTypes=<optimized out>, slotIdx=7) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/dbus/qdbusintegrator.cpp:1007
#27 0x00007f3529c80b3b in QObject::event (this=0x558d33463de0, e=0x7f35200114e0) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qobject.cpp:1452
#28 0x00007f352a5124b5 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x558d33463de0, e=0x7f35200114e0) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/widgets/kernel/qapplication.cpp:3287
#29 0x00007f3529cf7898 in QCoreApplication::notifyInternal2 (receiver=0x558d33463de0, event=0x7f35200114e0) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qcoreapplication.cpp:1152
#30 0x00007f3529cf794d in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qcoreapplication.cpp:1593
#31 0x00007f3529d1bc96 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x558d32fd4ba0) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qcoreapplication.cpp:1951
#32 0x00007f3529d1be9c in QCoreApplication::sendPostedEvents (receiver=<optimized out>, event_type=<optimized out>) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qcoreapplication.cpp:1806
#33 0x00007f3529ac9167 in postEventSourceDispatch (s=0x558d330a9220) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qeventdispatcher_glib.cpp:244
#34 0x00007f352805ab2c in g_main_dispatch (context=context@entry=0x7f3520000ef0) at ../glib-2.78.6/glib/gmain.c:3476
#35 0x00007f352805dd67 in g_main_context_dispatch_unlocked (context=0x7f3520000ef0) at ../glib-2.78.6/glib/gmain.c:4284
#36 g_main_context_iterate_unlocked (context=context@entry=0x7f3520000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.78.6/glib/gmain.c:4349
#37 0x00007f352805e390 in g_main_context_iteration (context=0x7f3520000ef0, may_block=1) at ../glib-2.78.6/glib/gmain.c:4414
#38 0x00007f3529ac7383 in QEventDispatcherGlib::processEvents (this=0x558d330a09d0, flags=...) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/kernel/qeventdispatcher_glib.cpp:394
#39 0x00007f3529d20722 in QEventLoop::exec (this=this@entry=0x7ffe44f9ddd0, flags=..., flags@entry=...) at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/global/qflags.h:34
#40 0x00007f3529d208b8 in QCoreApplication::exec () at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/corelib/global/qflags.h:74
#41 0x00007f3528b6b490 in QGuiApplication::exec () at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/gui/kernel/qguiapplication.cpp:1932
#42 0x00007f352a484139 in QApplication::exec () at /data/portage/portage/dev-qt/qtbase-6.7.3-r2/work/qtbase-everywhere-src-6.7.3/src/widgets/kernel/qapplication.cpp:2555
#43 0x0000558d21cfcc86 in main (argc=<optimized out>, argv=<optimized out>) at /data/portage/portage/kde-misc/kclock-24.12.49.9999/work/kclock-24.12.49.9999/src/kclockd/main.cpp:85
[Inferior 1 (process 13992) detached]

Reported using DrKonqi
This report was filed against 'kde' because the product 'kclockd' could not be located in Bugzilla. Add it to drkonqi's mappings file!
Comment 1 Bug Janitor Service 2024-11-15 22:35:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kclock/-/merge_requests/146
Comment 2 Devin Lin 2024-11-15 22:41:45 UTC
Git commit 28881e0eaeee02346b645b5b442805428934456c by Devin Lin.
Committed on 15/11/2024 at 22:41.
Pushed by devinlin into branch 'release/24.12'.

Fix switching between powerdevil and wakeup polling

This fixes a segfault when the wakeup polling thread is deleted when
switching to powerdevil as the wakeup scheduler. I also fixed the wakeup
provider signal not being reconnected during this event.

M  +5    -2    src/kclockd/utilities.cpp
M  +4    -2    src/kclockd/waittimerwakeupprovider.cpp

https://invent.kde.org/utilities/kclock/-/commit/28881e0eaeee02346b645b5b442805428934456c
Comment 3 Devin Lin 2024-11-15 22:50:43 UTC
Git commit 8e24eb41fe3805c7d7d89206850c63b33f73a0bc by Devin Lin.
Committed on 15/11/2024 at 22:30.
Pushed by devinlin into branch 'master'.

Fix switching between powerdevil and wakeup polling

This fixes a segfault when the wakeup polling thread is deleted when
switching to powerdevil as the wakeup scheduler. I also fixed the wakeup
provider signal not being reconnected during this event.

M  +5    -2    src/kclockd/utilities.cpp
M  +4    -2    src/kclockd/waittimerwakeupprovider.cpp

https://invent.kde.org/utilities/kclock/-/commit/8e24eb41fe3805c7d7d89206850c63b33f73a0bc