[Akonadi] [Bug 486350] New: KMail akonadi_maildir_resource crashes on manual update

Christoph Thielecke bugzilla_noreply at kde.org
Tue Apr 30 16:42:59 BST 2024


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 at kde.org
          Reporter: crissi99 at gmx.de
                CC: carl at 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 0x00007f5aa94db94b 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.thielecke at gmx.de (akonadi_maildir_resource), signal:
Segmentation fault

[KCrash Handler]
#4  0x00007f5aaa09ce99 in QHash<QByteArray, Akonadi::Attribute*>::findNode
(ahp=0x0, akey=..., this=0x40) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:945
#5  QHash<QByteArray, Akonadi::Attribute*>::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  0x00007f5aaa0bb570 in Akonadi::Collection::hasAttribute
(this=this at entry=0x55bd0944d5d0, type=...) at
/usr/src/akonadi-4:23.08.5-0ubuntu3/src/core/collection.cpp:163
#8  0x00007f5aaa442980 in
Akonadi::Collection::hasAttribute<Akonadi::SpecialCollectionAttribute>
(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 0x00007f5aaa447290 in __gnu_cxx::__ops::_Iter_comp_iter<bool
(*)(Akonadi::Collection const&, Akonadi::Collection
const&)>::operator()<QTypedArrayData<Akonadi::Collection>::iterator,
QTypedArrayData<Akonadi::Collection>::iterator> (__it2=..., __it1=...,
this=<synthetic pointer>) at /usr/include/c++/13/bits/predefined_ops.h:158
#11 std::__unguarded_partition<QTypedArrayData<Akonadi::Collection>::iterator,
__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(Akonadi::Collection const&,
Akonadi::Collection const&)> > (__comp=..., __pivot=..., __last=...,
__first=...) at /usr/include/c++/13/bits/stl_algo.h:1880
#12
std::__unguarded_partition_pivot<QTypedArrayData<Akonadi::Collection>::iterator,
__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(Akonadi::Collection const&,
Akonadi::Collection const&)> > (__comp=..., __last=..., __first=...) at
/usr/include/c++/13/bits/stl_algo.h:1899
#13 std::__introsort_loop<QTypedArrayData<Akonadi::Collection>::iterator, int,
__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(Akonadi::Collection const&,
Akonadi::Collection const&)> > (__first=..., __last=...,
__depth_limit=<optimized out>, __comp=__comp at entry=...) at
/usr/include/c++/13/bits/stl_algo.h:1930
#14 0x00007f5aaa4408d2 in
std::__sort<QTypedArrayData<Akonadi::Collection>::iterator,
__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(Akonadi::Collection const&,
Akonadi::Collection const&)> > (__comp=..., __last=..., __first=...) at
/usr/include/c++/13/bits/stl_algo.h:1947
#15 std::sort<QTypedArrayData<Akonadi::Collection>::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=<optimized out>) at
/usr/src/akonadi-4:23.08.5-0ubuntu3/src/agentbase/resourcebase.cpp:897
#17 0x00007f5aa9512e16 in QtPrivate::QSlotObjectBase::call (a=0x7fff9c665c90,
r=0x55bd0942ca20, this=0x55bd09c61e40) at
../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#18 doActivate<false> (sender=0x55bd09c53200, signal_index=6,
argv=0x7fff9c665c90) at kernel/qobject.cpp:3925
#19 0x00007f5aa950b697 in QMetaObject::activate
(sender=sender at entry=0x55bd09c53200, m=<optimized out>,
local_signal_index=local_signal_index at entry=3, argv=argv at entry=0x7fff9c665c90)
at kernel/qobject.cpp:3985
#20 0x00007f5aaa2cd266 in KJob::result (this=this at entry=0x55bd09c53200,
_t1=<optimized out>, _t1 at 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 0x00007f5aaa2d30eb in KJob::finishJob (this=0x55bd09c53200,
emitResult=<optimized out>) at
/usr/src/kcoreaddons-5.115.0-0ubuntu5/src/lib/jobs/kjob.cpp:98
#22 0x00007f5aa9506343 in QObject::event (this=0x55bd09c53200,
e=0x55bd09a66070) at kernel/qobject.cpp:1347
#23 0x00007f5aa996bd45 in QApplicationPrivate::notify_helper (this=<optimized
out>, receiver=0x55bd09c53200, e=0x55bd09a66070) at
kernel/qapplication.cpp:3640
#24 0x00007f5aa94d8118 in QCoreApplication::notifyInternal2
(receiver=0x55bd09c53200, event=0x55bd09a66070) at
kernel/qcoreapplication.cpp:1064
#25 0x00007f5aa94d8332 in QCoreApplication::sendEvent (receiver=<optimized
out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1462
#26 0x00007f5aa94db94b in QCoreApplicationPrivate::sendPostedEvents
(receiver=0x0, event_type=0, data=0x55bd091cbf30) at
kernel/qcoreapplication.cpp:1821
#27 0x00007f5aa94dbebd in QCoreApplication::sendPostedEvents
(receiver=<optimized out>, event_type=<optimized out>) at
kernel/qcoreapplication.cpp:1680
#28 0x00007f5aa9535c0f in postEventSourceDispatch (s=0x55bd09385400) at
kernel/qeventdispatcher_glib.cpp:277
#29 0x00007f5aa91145b5 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007f5aa9173717 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f5aa9113a53 in g_main_context_iteration () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f5aa9535279 in QEventDispatcherGlib::processEvents
(this=0x55bd09389ff0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#33 0x00007f5aa94d6a7b in QEventLoop::exec (this=this at entry=0x7fff9c6660c0,
flags=..., flags at entry=...) at
../../include/QtCore/../../src/corelib/global/qflags.h:69
#34 0x00007f5aa94df3e8 in QCoreApplication::exec () at
../../include/QtCore/../../src/corelib/global/qflags.h:121
#35 0x000055bd07fc8874 in Akonadi::ResourceBase::init<MaildirResource>
(argv=<optimized out>, argc=<optimized out>) at
/usr/include/KPim5/AkonadiAgentBase/akonadi/resourcebase.h:184
#36 main (argc=<optimized out>, argv=<optimized out>) at
/usr/src/kdepim-runtime-4:23.08.5-0ubuntu3/resources/maildir/main.cpp:9
[Inferior 1 (process 18928) detached]

Reported using DrKonqi

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list