https://bugs.kde.org/show_bug.cgi?id=486350
Bug ID: 486350
Summary: KMail akonadi_maildir_resource crashes on manual
update
Classification: Frameworks and Libraries
Product: Akonadi
Version: unspecified
Platform: Ubuntu
OS: Linux
Status: REPORTED
Keywords: drkonqi
Severity: crash
Priority: NOR
Component: Maildir Resource
Assignee: kdepim-bugs@kde.org
Reporter: criss...@gmx.de
CC: c...@carlschwan.eu
Target Milestone: ---
Application: akonadi_maildir_resource (5.24.5 (23.08.5))
Qt Version: 5.15.13
Frameworks Version: 5.115.0
Operating System: Linux 6.1.12-060112-generic x86_64
Windowing System: X11
Distribution: Ubuntu 24.04 LTS
DrKonqi: 5.27.11 [KCrashBackend]
-- Information about the crash:
When Kmail is configured with a lot of accounts (> 4), a lot of filters (>20)
and large mail dirs a manual check causes sometimes the crash of
akonadi_maildir_resource.
Restarting the akonadi_maildir_resource helps.
It seems there is a null pointer used (receiver=0x0) which is not checked:
#26 0x7f5aa94db94b in QCoreApplicationPrivate::sendPostedEvents
(receiver=0x0, event_type=0, data=0x55bd091cbf30) at
kernel/qcoreapplication.cpp:1821
I think this happens as race condition.
The crash can be reproduced sometimes.
-- Backtrace:
Application: christoph.thiele...@gmx.de (akonadi_maildir_resource), signal:
Segmentation fault
[KCrash Handler]
#4 0x7f5aaa09ce99 in QHash::findNode
(ahp=0x0, akey=..., this=0x40) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:945
#5 QHash::contains (akey=..., this=0x40) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:920
#6 Akonadi::AttributeStorage::hasAttribute (this=0x40, type=...) at
/usr/src/akonadi-4:23.08.5-0ubuntu3/src/core/attributestorage.cpp:69
#7 0x7f5aaa0bb570 in Akonadi::Collection::hasAttribute
(this=this@entry=0x55bd0944d5d0, type=...) at
/usr/src/akonadi-4:23.08.5-0ubuntu3/src/core/collection.cpp:163
#8 0x7f5aaa442980 in
Akonadi::Collection::hasAttribute
(this=0x55bd0944d5d0) at
/usr/src/akonadi-4:23.08.5-0ubuntu3/src/core/collection.h:595
#9 (anonymous namespace)::sortCollectionsForSync (l=..., r=...) at
/usr/src/akonadi-4:23.08.5-0ubuntu3/src/agentbase/resourcebase.cpp:855
#10 0x7f5aaa447290 in __gnu_cxx::__ops::_Iter_comp_iter::operator()::iterator,
QTypedArrayData::iterator> (__it2=..., __it1=...,
this=) at /usr/include/c++/13/bits/predefined_ops.h:158
#11 std::__unguarded_partition::iterator,
__gnu_cxx::__ops::_Iter_comp_iter > (__comp=..., __pivot=..., __last=...,
__first=...) at /usr/include/c++/13/bits/stl_algo.h:1880
#12
std::__unguarded_partition_pivot::iterator,
__gnu_cxx::__ops::_Iter_comp_iter > (__comp=..., __last=..., __first=...) at
/usr/include/c++/13/bits/stl_algo.h:1899
#13 std::__introsort_loop::iterator, int,
__gnu_cxx::__ops::_Iter_comp_iter > (__first=..., __last=...,
__depth_limit=, __comp=__comp@entry=...) at
/usr/include/c++/13/bits/stl_algo.h:1930
#14 0x7f5aaa4408d2 in
std::__sort::iterator,
__gnu_cxx::__ops::_Iter_comp_iter > (__comp=..., __last=..., __first=...) at
/usr/include/c++/13/bits/stl_algo.h:1947
#15 std::sort::iterator, bool
(*)(Akonadi::Collection const&, Akonadi::Collection const&)> (__first=...,
__last=..., __comp=0x7f5aaa442850 <(anonymous
namespace)::sortCollectionsForSync(Akonadi::Collection const&,
Akonadi::Collection const&)>) at /usr/include/c++/13/bits/stl_algo.h:4894
#16 Akonadi::ResourceBasePrivate::slotLocalListDone (this=0x55bd0942ca20,
job=) at
/usr/src/akonadi-4:23.08.5-0ubuntu3/src/agentbase/resourcebase.cpp:897
#17 0x7f5aa9512e16 in QtPrivate::QSlotObjectBase::call (a=0x7fff9c665c90,
r=0x55bd0942ca20, this=0x55bd09c61e40) at
../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#18 doActivate (sender=0x55bd09c53200, signal_index=6,
argv=0x7fff9c665c90) at kernel/qobject.cpp:3925
#19 0x7f5aa950b697 in QMetaObject::activate
(sender=sender@entry=0x55bd09c53200, m=,
local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff9c665c90)
at kernel/qobject.cpp:3985
#20 0x7f5aaa2cd266 in KJob::result (this=this@entry=0x55bd09c53200,
_t1=, _t1@entry=0x55bd09c53200, _t2=...) at
/usr/src/kcoreaddons-5.115.0-0ubuntu5/obj-x86_64-linux-gnu/src/lib/KF5CoreAddons_autogen/include/moc_kjob.cpp:633
#21 0x7f5aaa2d30eb in KJob::finishJob (this=0x55bd09c53200,
emitResult=) at
/usr/src/kcoreaddons-5.115.0-0ubuntu5/src/lib/jobs/kjob.cpp:98
#22 0x7f5aa9506343 in QObject::event (this=0x55bd09c53200,
e=0x55bd09a66070) at kernel/qobject.cpp:1347
#23 0x7f5aa996bd45 in QApplicationPrivate::notify_helper (this=, receiver=0x55bd09c53200, e=0x55bd09a66070) at
kernel/qapplication.cpp:3640
#24 0x7f5aa94d8118 in QCoreApplication::notifyInternal2
(receiver=0x55bd09c53200, event=0x55bd09a66070) at
kernel/qcoreapplication.cpp:1064
#25 0x7f5aa94d8332 in QCoreApplication::sendEvent