Summary: | KUiServerV2JobTracker::registerJob crash | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kjobwidgets | Reporter: | Riccardo Lesca <riccardo.lesca> |
Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | REOPENED --- | ||
Severity: | crash | CC: | abdussamedulutas, andrej.s.korshikov, aronkvh, bigallinux, brunopitrus, christoph, datenhamster, ddascalescu+kde, doncbugs, giecrilj, groszdanielpub, hsushipei1, igor_penza58, ilgaz, incredible.angst, jlp, jsardid, justin.zobel, kdebugs, kdebugtrackaccountcreatedbecausepolicysaysdontuseprimarybutdontusedisposable, meirgoldstein06, mesut.erdemir, opensuse.lietuviu.kalba, oshiorns1+kdebugs, pavlicek, personal, support, toralf.foerster, vasvir, waqar.17a, wuestenbaeckersaeltester, yzubkov, zyss |
Priority: | VHI | Keywords: | drkonqi |
Version: | 5.108.0 | ||
Target Milestone: | --- | ||
Platform: | Debian stable | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/kjobwidgets/-/commit/6f3496ce99d5cb9e4ce561d0bfc3b703fe9eec24 | Version Fixed In: | |
Sentry Crash Report: |
Description
Riccardo Lesca
2023-06-28 12:32:49 UTC
*** Bug 471465 has been marked as a duplicate of this bug. *** Other bug shows 5.107.0 affected, too. *** Bug 461318 has been marked as a duplicate of this bug. *** *** Bug 462826 has been marked as a duplicate of this bug. *** *** Bug 470478 has been marked as a duplicate of this bug. *** *** Bug 468323 has been marked as a duplicate of this bug. *** *** Bug 466663 has been marked as a duplicate of this bug. *** -- Backtrace: Application: Dolphin (dolphin), signal: Segmentation fault Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>} [KCrash Handler] #6 0x00007f49c8abab63 in QObject::property (this=this@entry=0x55889ae883d0, name=name@entry=0x7f49ca906f96 "desktopFileName") at kernel/qobject.cpp:4123 #7 0x00007f49ca900b85 in KUiServerV2JobTracker::registerJob (this=0x55889aeba0a0, job=<optimized out>) at /usr/src/debug/kjobwidgets/kjobwidgets-5.103.0/src/kuiserverv2jobtracker.cpp:186 #8 0x00007f49ca8fdae3 in operator() (__closure=0x55889aeccd60) at /usr/src/debug/kjobwidgets/kjobwidgets-5.103.0/src/kuiserverv2jobtracker.cpp:227 #9 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KUiServerV2JobTracker::registerJob(KJob*)::<lambda()> >::call (arg=<optimized out>, f=...) at /usr/include/qt/QtCore/qobjectdefs_impl.h:146 #10 QtPrivate::Functor<KUiServerV2JobTracker::registerJob(KJob*)::<lambda()>, 0>::call<QtPrivate::List<>, void> (arg=<optimized out>, f=...) at /usr/include/qt/QtCore/qobjectdefs_impl.h:256 #11 QtPrivate::QFunctorSlotObject<KUiServerV2JobTracker::registerJob(KJob*)::<lambda()>, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized out>, this_=0x55889aeccd50, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /usr/include/qt/QtCore/qobjectdefs_impl.h:443 #12 0x00007f49c8abea71 in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 #13 doActivate<false> (sender=0x7f49ca90e060 <_ZZN12_GLOBAL__N_117Q_QGS_serverProxy13innerFunctionEvE6holder.lto_priv.1>, signal_index=3, argv=0x7ffdaf9bd9e0) at kernel/qobject.cpp:3923 #14 0x00007f49c8abea71 in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=<optimized out>, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 #15 doActivate<false> (sender=0x55889aebdbe0, signal_index=5, argv=0x7ffdaf9bdb00) at kernel/qobject.cpp:3923 #16 0x00007f49c9eb9e94 in QDBusServiceWatcher::serviceOwnerChanged (this=this@entry=0x55889aebdbe0, _t1=..., _t2=..., _t3=...) at .moc/moc_qdbusservicewatcher.cpp:242 #17 0x00007f49c9ebfb33 in QDBusServiceWatcherPrivate::_q_serviceOwnerChanged (this=<optimized out>, newOwner=..., oldOwner=..., service=...) at /usr/src/debug/qt5-base/qtbase/src/dbus/qdbusservicewatcher.cpp:76 #18 QDBusServiceWatcher::qt_static_metacall (_o=_o@entry=0x55889aebdbe0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=3, _a=_a@entry=0x7ffdaf9bdc80) at .moc/moc_qdbusservicewatcher.cpp:116 #19 0x00007f49c9ebfe13 in QDBusServiceWatcher::qt_metacall (this=0x55889aebdbe0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7ffdaf9bdc80) at .moc/moc_qdbusservicewatcher.cpp:197 #20 0x00007f49c9ec345f in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int) [clone .constprop.0] (this=<optimized out>, object=<optimized out>, msg=..., metaTypes=..., slotIdx=<optimized out>) at /usr/src/debug/qt5-base/qtbase/src/dbus/qdbusintegrator.cpp:1001 #21 0x00007f49c8ab1bb0 in QObject::event (this=0x55889aebdbe0, e=0x7f49bc011ec0) at kernel/qobject.cpp:1347 #22 0x00007f49c9778b5c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55889aebdbe0, e=0x7f49bc011ec0) at kernel/qapplication.cpp:3640 #23 0x00007f49c8a8df48 in QCoreApplication::notifyInternal2 (receiver=0x55889aebdbe0, event=0x7f49bc011ec0) at kernel/qcoreapplication.cpp:1064 #24 0x00007f49c8a8dfb3 in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462 #25 0x00007f49c8a8ea53 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55889a0edad0) at kernel/qcoreapplication.cpp:1821 #26 0x00007f49c8ad4e88 in postEventSourceDispatch (s=0x55889a115da0) at kernel/qeventdispatcher_glib.cpp:277 #27 0x00007f49c691682b in g_main_dispatch (context=0x7f49bc005010) at ../glib/glib/gmain.c:3454 #28 g_main_context_dispatch (context=0x7f49bc005010) at ../glib/glib/gmain.c:4172 #29 0x00007f49c696dcc9 in g_main_context_iterate.constprop.0 (context=0x7f49bc005010, block=1, dispatch=1, self=<optimized out>) at ../glib/glib/gmain.c:4248 #30 0x00007f49c69150e2 in g_main_context_iteration (context=0x7f49bc005010, may_block=1) at ../glib/glib/gmain.c:4313 #31 0x00007f49c8ad8c6c in QEventDispatcherGlib::processEvents (this=0x55889a0c95c0, flags=...) at kernel/qeventdispatcher_glib.cpp:423 #32 0x00007f49c8a866ec in QEventLoop::exec (this=0x7ffdaf9be150, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69 #33 0x00007f49c8a91219 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121 #34 0x00007f49c8f39fe2 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1870 #35 0x00007f49c9776f2a in QApplication::exec () at kernel/qapplication.cpp:2832 #36 0x00005588996e4f53 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/dolphin/dolphin-22.12.2/src/main.cpp:258 [Inferior 1 (process 11756) detached] *** Bug 465820 has been marked as a duplicate of this bug. *** *** Bug 465717 has been marked as a duplicate of this bug. *** *** Bug 464900 has been marked as a duplicate of this bug. *** *** Bug 464653 has been marked as a duplicate of this bug. *** *** Bug 463690 has been marked as a duplicate of this bug. *** *** Bug 461825 has been marked as a duplicate of this bug. *** *** Bug 457314 has been marked as a duplicate of this bug. *** *** Bug 473455 has been marked as a duplicate of this bug. *** *** Bug 473781 has been marked as a duplicate of this bug. *** *** Bug 455696 has been marked as a duplicate of this bug. *** *** Bug 476582 has been marked as a duplicate of this bug. *** *** Bug 476202 has been marked as a duplicate of this bug. *** *** Bug 475803 has been marked as a duplicate of this bug. *** *** Bug 473625 has been marked as a duplicate of this bug. *** *** Bug 473722 has been marked as a duplicate of this bug. *** *** Bug 474156 has been marked as a duplicate of this bug. *** *** Bug 474867 has been marked as a duplicate of this bug. *** *** Bug 473482 has been marked as a duplicate of this bug. *** Git commit 75410fa3df5fbb182790a14af22ce5705cc1b86d by Méven Car. Committed on 03/12/2023 at 09:41. Pushed by meven into branch 'master'. KUiServerV2JobTracker: prevent potenial use-after-free M +7 -5 src/kuiserverv2jobtracker.cpp https://invent.kde.org/frameworks/kjobwidgets/-/commit/75410fa3df5fbb182790a14af22ce5705cc1b86d A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kjobwidgets/-/merge_requests/48 Git commit 10f8cb306978f2a70d2e4388b67cc6855a1ca8a3 by Méven Car. Committed on 03/12/2023 at 16:27. Pushed by cullmann into branch 'kf5'. KUiServerV2JobTracker: prevent potenial use-after-free (cherry picked from commit 75410fa3df5fbb182790a14af22ce5705cc1b86d) M +7 -5 src/kuiserverv2jobtracker.cpp https://invent.kde.org/frameworks/kjobwidgets/-/commit/10f8cb306978f2a70d2e4388b67cc6855a1ca8a3 *** Bug 480524 has been marked as a duplicate of this bug. *** *** Bug 481529 has been marked as a duplicate of this bug. *** *** Bug 484297 has been marked as a duplicate of this bug. *** *** Bug 483153 has been marked as a duplicate of this bug. *** *** Bug 481451 has been marked as a duplicate of this bug. *** *** Bug 481343 has been marked as a duplicate of this bug. *** *** Bug 481169 has been marked as a duplicate of this bug. *** A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kjobwidgets/-/merge_requests/53 Git commit 6f3496ce99d5cb9e4ce561d0bfc3b703fe9eec24 by Christoph Cullmann, on behalf of Méven Car. Committed on 07/05/2024 at 19:28. Pushed by cullmann into branch 'master'. KUiServerV2JobTracker: prevent a crash Related: bug 483582 This is a very-common crash, happening when plasma crashes itself: https://crash-reports.kde.org/organizations/kde/issues/10390/activity/?project=4&query=is%3Aunresolved&referrer=issue-stream&stream_index=0 I think this is due to the line 204 indeed, dereferencing a jobViews key, which is nullptr, because the `QTimer::timeout` callback in `KUiServerV2JobTracker::registerJob` did implicitely insert a jobViews[nullptr] when the job was already removed. Guard with jobGuard. The first change is not necessary but I felt it makes the code implicit, otherwise we have a QPointer implicit conversion to `*`. cc @broulik M +5 -6 src/kuiserverv2jobtracker.cpp https://invent.kde.org/frameworks/kjobwidgets/-/commit/6f3496ce99d5cb9e4ce561d0bfc3b703fe9eec24 This doesn't seem to be fixed. https://crash-reports.kde.org/organizations/kde/issues/72734 |