Bug 362420 - DAV Resource 16.12.0: Segfaults randomly
Summary: DAV Resource 16.12.0: Segfaults randomly
Status: RESOLVED DUPLICATE of bug 360792
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: DAV Resource (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-28 14:49 UTC by Till Schäfer
Modified: 2017-10-10 22:30 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Till Schäfer 2016-04-28 14:49:18 UTC
The DAV Resource starts to segfault randomly (most of the times shortly after akonadi was startet)

Software: 
- kde-apps 16.04.0
- frameworks 5.21


Thread 1 (Thread 0x7f421c7207c0 (LWP 11813)):
[KCrash Handler]
#6  QMap<QString, QString>::detach (this=0x10) at /usr/include/qt5/QtCore/qmap.h:364
#7  QMap<QString, QString>::operator[] (akey=..., this=0x10) at /usr/include/qt5/QtCore/qmap.h:629
#8  EtagCache::setEtag (this=0x0, remoteId=..., etag=...) at /var/tmp/portage/kde-apps/kdepim-runtime-16.04.0/work/kdepim-runtime-16.04.0/resources/dav/common/etagcache.cpp:38
#9  0x0000000000452728 in DavGroupwareResource::onItemFetched (this=0x1f3f2b0, job=<optimized out>, updateType=DavGroupwareResource::ItemUpdateAdd) at /var/tmp/portage/kde-apps/kdepim-runtime-16.04.0/work/kdepim-runtime-16.04.0/resources/dav/resource/davgroupwareresource.cpp:958
#10 0x00007f42314feef3 in QtPrivate::QSlotObjectBase::call (a=0x7ffdf8673440, r=0x1f3f2b0, this=0x2016980) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#11 QMetaObject::activate (sender=sender@entry=0x2056b90, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffdf8673440) at kernel/qobject.cpp:3698
#12 0x00007f42314ffb37 in QMetaObject::activate (sender=sender@entry=0x2056b90, m=m@entry=0x7f4232bbd320 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffdf8673440) at kernel/qobject.cpp:3578
#13 0x00007f423296b1b2 in KJob::result (this=this@entry=0x2056b90, _t1=_t1@entry=0x2056b90) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.21.0-r1/work/kcoreaddons-5.21.0_build/src/lib/moc_kjob.cpp:555
#14 0x00007f423296bcd1 in KJob::finishJob (this=this@entry=0x2056b90, emitResult=emitResult@entry=true) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.21.0-r1/work/kcoreaddons-5.21.0/src/lib/jobs/kjob.cpp:109
#15 0x00007f423296bd5a in KJob::emitResult (this=this@entry=0x2056b90) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.21.0-r1/work/kcoreaddons-5.21.0/src/lib/jobs/kjob.cpp:293
#16 0x0000000000422004 in DavItemFetchJob::davJobFinished (this=0x2056b90, job=<optimized out>) at /var/tmp/portage/kde-apps/kdepim-runtime-16.04.0/work/kdepim-runtime-16.04.0/resources/dav/common/davitemfetchjob.cpp:92
#17 0x00007f42314feef3 in QtPrivate::QSlotObjectBase::call (a=0x7ffdf86736b0, r=0x2056b90, this=0x1f67bc0) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#18 QMetaObject::activate (sender=sender@entry=0x2044170, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffdf86736b0) at kernel/qobject.cpp:3698
#19 0x00007f42314ffb37 in QMetaObject::activate (sender=sender@entry=0x2044170, m=m@entry=0x7f4232bbd320 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffdf86736b0) at kernel/qobject.cpp:3578
#20 0x00007f423296b1b2 in KJob::result (this=this@entry=0x2044170, _t1=_t1@entry=0x2044170) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.21.0-r1/work/kcoreaddons-5.21.0_build/src/lib/moc_kjob.cpp:555
#21 0x00007f423296bcd1 in KJob::finishJob (this=this@entry=0x2044170, emitResult=emitResult@entry=true) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.21.0-r1/work/kcoreaddons-5.21.0/src/lib/jobs/kjob.cpp:109
#22 0x00007f423296bd5a in KJob::emitResult (this=this@entry=0x2044170) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.21.0-r1/work/kcoreaddons-5.21.0/src/lib/jobs/kjob.cpp:293
#23 0x00007f4233d86ca2 in KIO::SimpleJob::slotFinished (this=this@entry=0x2044170) at /var/tmp/portage/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/core/simplejob.cpp:230
#24 0x00007f4233d903b6 in KIO::TransferJob::slotFinished (this=0x2044170) at /var/tmp/portage/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/core/transferjob.cpp:166
#25 0x00007f4233d8fae1 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.21.0/work/kio-5.21.0_build/src/core/moc_transferjob.cpp:155
#26 0x00007f42314ff474 in QMetaObject::activate (sender=sender@entry=0x205d430, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0) at kernel/qobject.cpp:3713
#27 0x00007f42314ffb37 in QMetaObject::activate (sender=sender@entry=0x205d430, m=m@entry=0x7f423402c140 <KIO::SlaveInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0) at kernel/qobject.cpp:3578
#28 0x00007f4233d66a73 in KIO::SlaveInterface::finished (this=this@entry=0x205d430) at /var/tmp/portage/kde-frameworks/kio-5.21.0/work/kio-5.21.0_build/src/core/moc_slaveinterface.cpp:402
#29 0x00007f4233d69a51 in KIO::SlaveInterface::dispatch (this=0x205d430, _cmd=<optimized out>, rawdata=...) at /var/tmp/portage/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/core/slaveinterface.cpp:160
#30 0x00007f4233d67027 in KIO::SlaveInterface::dispatch (this=0x205d430) at /var/tmp/portage/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/core/slaveinterface.cpp:89
#31 0x00007f4233d6b656 in KIO::Slave::gotInput (this=0x205d430) at /var/tmp/portage/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/core/slave.cpp:393
#32 0x00007f4233de9335 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.21.0/work/kio-5.21.0_build/src/core/moc_slave.cpp:87
#33 0x00007f42314ff474 in QMetaObject::activate (sender=0x1f95280, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3713
#34 0x00007f42314ffb37 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f423402abc0 <KIO::Connection::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3578
#35 0x00007f4233d18c78 in KIO::Connection::readyRead (this=<optimized out>) at /var/tmp/portage/kde-frameworks/kio-5.21.0/work/kio-5.21.0_build/src/core/moc_connection_p.cpp:141
#36 KIO::ConnectionPrivate::dequeue (this=0x1f544c0) at /var/tmp/portage/kde-frameworks/kio-5.21.0/work/kio-5.21.0/src/core/connection.cpp:45
#37 0x00007f42315004fa in QObject::event (this=0x1f95280, e=<optimized out>) at kernel/qobject.cpp:1239
#38 0x00007f42324016bc in QApplicationPrivate::notify_helper (this=this@entry=0x1ed54e0, receiver=receiver@entry=0x1f95280, e=e@entry=0x1f64980) at kernel/qapplication.cpp:3716
#39 0x00007f4232406ba8 in QApplication::notify (this=0x7ffdf8674350, receiver=0x1f95280, e=0x1f64980) at kernel/qapplication.cpp:3499
#40 0x00007f42314d774d in QCoreApplication::notifyInternal (this=0x7ffdf8674350, receiver=0x1f95280, event=event@entry=0x1f64980) at kernel/qcoreapplication.cpp:965
#41 0x00007f42314da4e3 in QCoreApplication::sendEvent (event=0x1f64980, receiver=<optimized out>) at kernel/qcoreapplication.h:224
#42 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1ecf720) at kernel/qcoreapplication.cpp:1593
#43 0x00007f42314daaa8 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1451
#44 0x00007f4231524773 in postEventSourceDispatch (s=0x1f0fc20) at kernel/qeventdispatcher_glib.cpp:271
#45 0x00007f4229a83c6d in g_main_dispatch (context=0x7f42140016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r2/work/glib-2.46.2/glib/gmain.c:3154
#46 g_main_context_dispatch (context=context@entry=0x7f42140016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r2/work/glib-2.46.2/glib/gmain.c:3769
#47 0x00007f4229a83f50 in g_main_context_iterate (context=context@entry=0x7f42140016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.46.2-r2/work/glib-2.46.2/glib/gmain.c:3840
#48 0x00007f4229a83ffc in g_main_context_iteration (context=0x7f42140016f0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r2/work/glib-2.46.2/glib/gmain.c:3901
#49 0x00007f42315247e7 in QEventDispatcherGlib::processEvents (this=0x1f09db0, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#50 0x00007f42314d63aa in QEventLoop::exec (this=this@entry=0x7ffdf86742b0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#51 0x00007f42314dd68c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#52 0x00007f4231cae40c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1527
#53 0x00007f42323fd2e5 in QApplication::exec () at kernel/qapplication.cpp:2976
#54 0x00007f4234c681ee in Akonadi::ResourceBase::init (r=r@entry=0x1f3f2b0) at /var/tmp/portage/kde-apps/akonadi-16.04.0/work/akonadi-16.04.0/src/agentbase/resourcebase.cpp:605
#55 0x000000000045fa27 in Akonadi::ResourceBase::init<DavGroupwareResource> (argc=3, argv=<optimized out>) at /usr/include/KF5/AkonadiAgentBase/resourcebase.h:196
#56 0x00007f42309eb620 in __libc_start_main (main=0x415c60 <main(int, char**)>, argc=3, argv=0x7ffdf8674478, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffdf8674468) at libc-start.c:289
#57 0x0000000000415c99 in _start ()

Reproducible: Sometimes
Comment 1 Till Schäfer 2016-09-07 20:13:21 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 ()
Comment 2 NightSky 2016-12-18 12:31:43 UTC
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< - -  - - - - - - - - - - - - - - - - - - - - - - - - - -
Comment 3 jansen 2017-01-11 12:18:50 UTC
Might be the same as #360792 ?

Looks like I´m affected on latest openSUSE Tumbleweed with KDE apps 16.12
Comment 4 Christoph Feck 2017-10-10 22:30:04 UTC

*** This bug has been marked as a duplicate of bug 360792 ***