Summary: | DAV Resource 16.12.0: Segfaults randomly | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Till Schäfer <till2.schaefer> |
Component: | DAV Resource | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | jansen, kdenis, kramski, risimi |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Till Schäfer
2016-04-28 14:49:18 UTC
the bug is still valid on 16.08.0 (Frameworks 5.25), although the stack trace changed slightly: Application: akonadi_davgroupware_resource (akonadi_davgroupware_resource), signal: Segmentation fault Using host libthread_db library "/lib64/libthread_db.so.1". [Current thread is 1 (Thread 0x7f57b9ca37c0 (LWP 4953))] Thread 1 (Thread 0x7f57b9ca37c0 (LWP 4953)): [KCrash Handler] #6 std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=<optimized out>) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/atomic_base.h:500 #7 QAtomicOps<int>::load<int> (_q_value=...) at /usr/include/qt5/QtCore/qatomic_cxx11.h:96 #8 QBasicAtomicInteger<int>::load (this=<optimized out>) at /usr/include/qt5/QtCore/qbasicatomic.h:116 #9 QtPrivate::RefCount::isShared (this=<optimized out>) at /usr/include/qt5/QtCore/qrefcount.h:95 #10 QMap<QString, QString>::detach (this=<optimized out>) at /usr/include/qt5/QtCore/qmap.h:360 #11 QMap<QString, QString>::operator[] (akey=..., this=<optimized out>) at /usr/include/qt5/QtCore/qmap.h:658 #12 EtagCache::setEtag (this=this@entry=0x0, remoteId=..., etag=...) at /var/tmp/portage/kde-apps/kdepim-runtime-16.08.0/work/kdepim-runtime-16.08.0/resources/dav/common/etagcache.cpp:38 #13 0x000000000045569d in DavGroupwareResource::onItemFetched (this=0x1a7abc0, job=<optimized out>, updateType=DavGroupwareResource::ItemUpdateAdd) at /var/tmp/portage/kde-apps/kdepim-runtime-16.08.0/work/kdepim-runtime-16.08.0/resources/dav/resource/davgroupwareresource.cpp:959 #14 0x00007f57d55ef882 in QtPrivate::QSlotObjectBase::call (a=0x7fff13f158e0, r=0x1a7abc0, this=0x1c82ad0) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124 #15 QMetaObject::activate (sender=sender@entry=0x1cacf60, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff13f158e0) at kernel/qobject.cpp:3715 #16 0x00007f57d55efdb7 in QMetaObject::activate (sender=sender@entry=0x1cacf60, m=m@entry=0x7f57d6cee2e0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff13f158e0) at kernel/qobject.cpp:3595 #17 0x00007f57d6a98682 in KJob::result (this=this@entry=0x1cacf60, _t1=_t1@entry=0x1cacf60) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.25.0/work/kcoreaddons-5.25.0_build/src/lib/moc_kjob.cpp:568 #18 0x00007f57d6a99da1 in KJob::finishJob (this=this@entry=0x1cacf60, emitResult=emitResult@entry=true) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.25.0/work/kcoreaddons-5.25.0/src/lib/jobs/kjob.cpp:109 #19 0x00007f57d6a99e2a in KJob::emitResult (this=this@entry=0x1cacf60) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.25.0/work/kcoreaddons-5.25.0/src/lib/jobs/kjob.cpp:293 #20 0x0000000000421bf9 in DavItemFetchJob::davJobFinished (this=0x1cacf60, job=<optimized out>) at /var/tmp/portage/kde-apps/kdepim-runtime-16.08.0/work/kdepim-runtime-16.08.0/resources/dav/common/davitemfetchjob.cpp:92 #21 0x00007f57d55ef882 in QtPrivate::QSlotObjectBase::call (a=0x7fff13f15b50, r=0x1cacf60, this=0x1d06670) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124 #22 QMetaObject::activate (sender=sender@entry=0x1ca8a60, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff13f15b50) at kernel/qobject.cpp:3715 #23 0x00007f57d55efdb7 in QMetaObject::activate (sender=sender@entry=0x1ca8a60, m=m@entry=0x7f57d6cee2e0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff13f15b50) at kernel/qobject.cpp:3595 #24 0x00007f57d6a98682 in KJob::result (this=this@entry=0x1ca8a60, _t1=_t1@entry=0x1ca8a60) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.25.0/work/kcoreaddons-5.25.0_build/src/lib/moc_kjob.cpp:568 #25 0x00007f57d6a99da1 in KJob::finishJob (this=this@entry=0x1ca8a60, emitResult=emitResult@entry=true) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.25.0/work/kcoreaddons-5.25.0/src/lib/jobs/kjob.cpp:109 #26 0x00007f57d6a99e2a in KJob::emitResult (this=this@entry=0x1ca8a60) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.25.0/work/kcoreaddons-5.25.0/src/lib/jobs/kjob.cpp:293 #27 0x00007f57d7ebc7e2 in KIO::SimpleJob::slotFinished (this=this@entry=0x1ca8a60) at /var/tmp/portage/kde-frameworks/kio-5.25.0/work/kio-5.25.0/src/core/simplejob.cpp:230 #28 0x00007f57d7ec5b86 in KIO::TransferJob::slotFinished (this=0x1ca8a60) at /var/tmp/portage/kde-frameworks/kio-5.25.0/work/kio-5.25.0/src/core/transferjob.cpp:166 #29 0x00007f57d7ec5311 in KIO::TransferJob::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/kde-frameworks/kio-5.25.0/work/kio-5.25.0_build/src/core/moc_transferjob.cpp:155 #30 0x00007f57d55ef21c in QMetaObject::activate (sender=sender@entry=0x1a7b1f0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0) at kernel/qobject.cpp:3730 #31 0x00007f57d55efdb7 in QMetaObject::activate (sender=sender@entry=0x1a7b1f0, m=m@entry=0x7f57d8164180 <KIO::SlaveInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0) at kernel/qobject.cpp:3595 #32 0x00007f57d7e9df13 in KIO::SlaveInterface::finished (this=this@entry=0x1a7b1f0) at /var/tmp/portage/kde-frameworks/kio-5.25.0/work/kio-5.25.0_build/src/core/moc_slaveinterface.cpp:424 #33 0x00007f57d7ea0ea1 in KIO::SlaveInterface::dispatch (this=0x1a7b1f0, _cmd=<optimized out>, rawdata=...) at /var/tmp/portage/kde-frameworks/kio-5.25.0/work/kio-5.25.0/src/core/slaveinterface.cpp:160 #34 0x00007f57d7e9e4c7 in KIO::SlaveInterface::dispatch (this=0x1a7b1f0) at /var/tmp/portage/kde-frameworks/kio-5.25.0/work/kio-5.25.0/src/core/slaveinterface.cpp:89 #35 0x00007f57d7ea2976 in KIO::Slave::gotInput (this=0x1a7b1f0) at /var/tmp/portage/kde-frameworks/kio-5.25.0/work/kio-5.25.0/src/core/slave.cpp:398 #36 0x00007f57d7f20815 in KIO::Slave::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/kde-frameworks/kio-5.25.0/work/kio-5.25.0_build/src/core/moc_slave.cpp:87 #37 0x00007f57d55ef21c in QMetaObject::activate (sender=0x1c270d0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3730 #38 0x00007f57d55efdb7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f57d8162c00 <KIO::Connection::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3595 #39 0x00007f57d7e4bf17 in KIO::Connection::readyRead (this=<optimized out>) at /var/tmp/portage/kde-frameworks/kio-5.25.0/work/kio-5.25.0_build/src/core/moc_connection_p.cpp:142 #40 KIO::ConnectionPrivate::dequeue (this=0x1c4cfd0) at /var/tmp/portage/kde-frameworks/kio-5.25.0/work/kio-5.25.0/src/core/connection.cpp:45 #41 0x00007f57d55f078a in QObject::event (this=0x1c270d0, e=<optimized out>) at kernel/qobject.cpp:1256 #42 0x00007f57d65355dc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1c270d0, e=0x1c811f0) at kernel/qapplication.cpp:3804 #43 0x00007f57d6539d00 in QApplication::notify (this=0x7fff13f167f0, receiver=0x1c270d0, e=0x1c811f0) at kernel/qapplication.cpp:3561 #44 0x00007f57d55c81e0 in QCoreApplication::notifyInternal2 (receiver=0x1c270d0, event=event@entry=0x1c811f0) at kernel/qcoreapplication.cpp:1015 #45 0x00007f57d55ca413 in QCoreApplication::sendEvent (event=0x1c811f0, receiver=<optimized out>) at kernel/qcoreapplication.h:225 #46 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1914b50) at kernel/qcoreapplication.cpp:1650 #47 0x00007f57d55ca9b8 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1508 #48 0x00007f57d5614683 in postEventSourceDispatch (s=0x19546f0) at kernel/qeventdispatcher_glib.cpp:270 #49 0x00007f57cdaa0c6d in g_main_dispatch (context=0x7f57b00016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3154 #50 g_main_context_dispatch (context=context@entry=0x7f57b00016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3769 #51 0x00007f57cdaa0f50 in g_main_context_iterate (context=context@entry=0x7f57b00016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3840 #52 0x00007f57cdaa0ffc in g_main_context_iteration (context=0x7f57b00016f0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901 #53 0x00007f57d56146f7 in QEventDispatcherGlib::processEvents (this=0x195c3e0, flags=...) at kernel/qeventdispatcher_glib.cpp:417 #54 0x00007f57d55c6d7a in QEventLoop::exec (this=this@entry=0x7fff13f16750, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204 #55 0x00007f57d55ce83c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1285 #56 0x00007f57d5da892c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1607 #57 0x00007f57d6532235 in QApplication::exec () at kernel/qapplication.cpp:2979 #58 0x00007f57d8da43ae in Akonadi::ResourceBase::init (r=r@entry=0x1a7abc0) at /var/tmp/portage/kde-apps/akonadi-16.08.0/work/akonadi-16.08.0/src/agentbase/resourcebase.cpp:605 #59 0x0000000000461207 in Akonadi::ResourceBase::init<DavGroupwareResource> (argc=3, argv=<optimized out>) at /usr/include/KF5/AkonadiAgentBase/resourcebase.h:196 #60 0x00007f57d4a94620 in __libc_start_main (main=0x415ec0 <main(int, char**)>, argc=3, argv=0x7fff13f16918, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff13f16908) at libc-start.c:289 #61 0x0000000000415ef9 in _start () Same here on Gentoo Linux, kde-frameworks-5.29, kde-applications-16.12.0 with similar stack trace. According to the stack trace: EtagCache::setEtag (this=__0x0__, remoteId=..., etag=...) DavGroupwareResource::onItemFetched(...) it looks like DavGroupwareResource::onItemFetched() is got a nullptr instead of EtagCache*. Relevant lines from davgroupwareresource.cpp: 956: // update etag 957: item.setRemoteRevision(davItem.etag()); 958:>>> EtagCache *etag = mEtagCaches[collection.remoteId()]; <<< 959: etag->setEtag(item.remoteId(), davItem.etag()); If collection.remoteId() is not in the mEtagCaches, the etag pointer will be initialized to null. ( https://doc.qt.io/qt-5.7/qmap.html#operator-5b-5d ) ( https://doc.qt.io/qt-5.7/containers.html#default-constructed-value ) I don't really know what the DavGroupwareResource should do in such case, so meanwhile I just copy pasted a relevant check from another DavGroupwareResource method (see below). And now, instead of the segfault I get an "org.kde.pim.davresource: Fetched item is in a collection we don't have in the cache" in the logs, each time I open KOrganizer. Hope that helps. - - - - - - - - - - - - - - - - - - - - - - - - - - - ->8 diff --git a/resources/dav/resource/davgroupwareresource.cpp b/resources/dav/resource/davgroupwareresource.cpp --- a/resources/dav/resource/davgroupwareresource.cpp +++ b/resources/dav/resource/davgroupwareresource.cpp @@ -955,6 +955,14 @@ // update etag item.setRemoteRevision(davItem.etag()); + + if (!mEtagCaches.contains(collection.remoteId())) { + qCWarning(DAVRESOURCE_LOG) << "Fetched item is in a collection we don't have in the cache"; + // TODO: fix #362420 "DAV Resource 16.08.0: Segfaults randomly" + cancelTask(); + return; + } + EtagCache *etag = mEtagCaches[collection.remoteId()]; etag->setEtag(item.remoteId(), davItem.etag()); 8< - - - - - - - - - - - - - - - - - - - - - - - - - - - - Might be the same as #360792 ? Looks like I´m affected on latest openSUSE Tumbleweed with KDE apps 16.12 *** This bug has been marked as a duplicate of bug 360792 *** |