Bug 433117

Summary: Kimap crashes constantly on Web.de imap account after a few weeks
Product: [Frameworks and Libraries] kimap Reporter: Leszek Lesner <leszek.lesner>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: nicolas.fella
Priority: NOR    
Version: git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch to fix imapset Q_ASSERT

Description Leszek Lesner 2021-02-17 21:19:54 UTC
SUMMARY
My KImap crashes after a few weeks of usage. If I remove my account and readd it it starts working for a few weeks again


OBSERVED RESULT
Crash

EXPECTED RESULT
Don't crash

SOFTWARE/OS VERSIONS
KDE Plasma Version: master
KDE Frameworks Version: 5.80
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Thats the debug output by dr.konqui

Application: WEB.DE Freemail (leszek.lesner) (akonadi_imap_resource), signal: Aborted
Content of s_kcrashErrorMessage: [Current thread is 1 (Thread 0x7fc8f5612980 (LWP 841011))]
[KCrash Handler]
#5  0x00007fc8fb22c7bb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#6  0x00007fc8fb217535 in __GI_abort () at abort.c:79
#7  0x00007fc8fb76ca05 in qt_message_fatal (context=..., message=<synthetic pointer>...) at /home/leszek/kde/src/Qt5/qtbase/src/corelib/global/qlogging.cpp:1914
#8  0x00007fc8fb76ca05 in QMessageLogger::fatal(char const*, ...) const (this=this@entry=0x7ffd15428460, msg=msg@entry=0x7fc8fba3dea0 "ASSERT: \"%s\" in file %s, line %d") at /home/leszek/kde/src/Qt5/qtbase/src/corelib/global/qlogging.cpp:893
#9  0x00007fc8fb76bf23 in qt_assert(char const*, char const*, int) (assertion=<optimized out>, file=<optimized out>, line=<optimized out>) at ../../include/QtCore/../../../../../src/Qt5/qtbase/src/corelib/global/qlogging.h:90
#10 0x00007fc8fe323c65 in KIMAP::ImapSet::add(QVector<long long> const&) (this=0x7ffd15428568, values=...) at /home/leszek/kde/src/kimap/src/imapset.cpp:240
#11 0x00007fc8fe323b60 in KIMAP::ImapSet::add(long long) (this=0x7ffd15428568, value=-1) at /home/leszek/kde/src/kimap/src/imapset.cpp:231
#12 0x0000561ab193015f in ChangeItemsFlagsTask::prepareJob(KIMAP::Session*) (this=0x561ab1dff190, session=0x561ab1e1efa0) at /home/leszek/kde/src/kdepim-runtime/resources/imap/changeitemsflagstask.cpp:75
#13 0x0000561ab1930394 in ChangeItemsFlagsTask::triggerAppendFlagsJob(KIMAP::Session*) (this=0x561ab1dff190, session=0x561ab1e1efa0) at /home/leszek/kde/src/kdepim-runtime/resources/imap/changeitemsflagstask.cpp:97
#14 0x0000561ab192feb4 in ChangeItemsFlagsTask::onSelectDone(KJob*) (this=0x561ab1dff190, job=0x561ab1da4ad0) at /home/leszek/kde/src/kdepim-runtime/resources/imap/changeitemsflagstask.cpp:56
#15 0x0000561ab19312b2 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<KJob*>, void, void (ChangeItemsFlagsTask::*)(KJob*)>::call(void (ChangeItemsFlagsTask::*)(KJob*), ChangeItemsFlagsTask*, void**) (f=(void (ChangeItemsFlagsTask::*)(class ChangeItemsFlagsTask * const, class KJob *)) 0x561ab192fc10 <ChangeItemsFlagsTask::onSelectDone(KJob*)>, o=0x561ab1dff190, arg=0x7ffd154288e0) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:152
#16 0x0000561ab1931232 in QtPrivate::FunctionPointer<void (ChangeItemsFlagsTask::*)(KJob*)>::call<QtPrivate::List<KJob*>, void>(void (ChangeItemsFlagsTask::*)(KJob*), ChangeItemsFlagsTask*, void**) (f=(void (ChangeItemsFlagsTask::*)(class ChangeItemsFlagsTask * const, class KJob *)) 0x561ab192fc10 <ChangeItemsFlagsTask::onSelectDone(KJob*)>, o=0x561ab1dff190, arg=0x7ffd154288e0) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:185
#17 0x0000561ab193119c in QtPrivate::QSlotObject<void (ChangeItemsFlagsTask::*)(KJob*), QtPrivate::List<KJob*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x561ab1d5e1c0, r=0x561ab1dff190, a=0x7ffd154288e0, ret=0x0) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:418
#18 0x00007fc8fb99b66c in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffd154288e0, r=0x561ab1dff190, this=0x561ab1d5e1c0) at ../../include/QtCore/../../../../../src/Qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398
#19 0x00007fc8fb99b66c in doActivate<false>(QObject*, int, void**) (sender=0x561ab1da4ad0, signal_index=6, argv=0x7ffd154288e0) at /home/leszek/kde/src/Qt5/qtbase/src/corelib/kernel/qobject.cpp:3886
#20 0x00007fc8fd0aa6f2 in KJob::result(KJob*, KJob::QPrivateSignal) (this=0x561ab1da4ad0, _t1=0x561ab1da4ad0, _t2=...) at /home/leszek/kde/build/kcoreaddons/src/lib/KF5CoreAddons_autogen/include/moc_kjob.cpp:576
#21 0x00007fc8fd0a8657 in KJob::finishJob(bool) (this=0x561ab1da4ad0, emitResult=true) at /home/leszek/kde/src/kcoreaddons/src/lib/jobs/kjob.cpp:92
#22 0x00007fc8fd0a8da6 in KJob::emitResult() (this=0x561ab1da4ad0) at /home/leszek/kde/src/kcoreaddons/src/lib/jobs/kjob.cpp:296
#23 0x00007fc8fe32cae1 in KIMAP::Job::handleErrorReplies(KIMAP::Response const&) (this=0x561ab1da4ad0, response=...) at /home/leszek/kde/src/kimap/src/job.cpp:72
#24 0x00007fc8fe34226b in KIMAP::SelectJob::handleResponse(KIMAP::Response const&) (this=0x561ab1da4ad0, response=...) at /home/leszek/kde/src/kimap/src/selectjob.cpp:222
#25 0x00007fc8fe345173 in KIMAP::SessionPrivate::responseReceived(KIMAP::Response const&) (this=0x561ab1e1efc0, response=...) at /home/leszek/kde/src/kimap/src/session.cpp:288
#26 0x00007fc8fe349e5e in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<KIMAP::Response const&>, void, void (KIMAP::SessionPrivate::*)(KIMAP::Response const&)>::call(void (KIMAP::SessionPrivate::*)(KIMAP::Response const&), KIMAP::SessionPrivate*, void**) (f=(void (KIMAP::SessionPrivate::*)(class KIMAP::SessionPrivate * const, const struct KIMAP::Response &)) 0x7fc8fe3448f8 <KIMAP::SessionPrivate::responseReceived(KIMAP::Response const&)>, o=0x561ab1e1efc0, arg=0x7fc8d804ea88) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:152
#27 0x00007fc8fe349844 in QtPrivate::FunctionPointer<void (KIMAP::SessionPrivate::*)(KIMAP::Response const&)>::call<QtPrivate::List<KIMAP::Response const&>, void>(void (KIMAP::SessionPrivate::*)(KIMAP::Response const&), KIMAP::SessionPrivate*, void**) (f=(void (KIMAP::SessionPrivate::*)(class KIMAP::SessionPrivate * const, const struct KIMAP::Response &)) 0x7fc8fe3448f8 <KIMAP::SessionPrivate::responseReceived(KIMAP::Response const&)>, o=0x561ab1e1efc0, arg=0x7fc8d804ea88) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:185
#28 0x00007fc8fe348db2 in QtPrivate::QSlotObject<void (KIMAP::SessionPrivate::*)(KIMAP::Response const&), QtPrivate::List<KIMAP::Response const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x561ab1e1f600, r=0x561ab1e1efc0, a=0x7fc8d804ea88, ret=0x0) at /home/leszek/kde/qt5/include/QtCore/qobjectdefs_impl.h:418
#29 0x00007fc8fb99393e in QObject::event(QEvent*) (this=0x561ab1e1efc0, e=0x7fc8d804ea40) at /home/leszek/kde/src/Qt5/qtbase/src/corelib/kernel/qobject.cpp:1314
#30 0x00007fc8fc56a11e in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x561ab1c4ea70, receiver=receiver@entry=0x561ab1e1efc0, e=e@entry=0x7fc8d804ea40) at /home/leszek/kde/src/Qt5/qtbase/src/widgets/kernel/qapplication.cpp:3632
#31 0x00007fc8fc5709a0 in QApplication::notify(QObject*, QEvent*) (this=0x7ffd154293f0, receiver=0x561ab1e1efc0, e=0x7fc8d804ea40) at /home/leszek/kde/src/Qt5/qtbase/src/widgets/kernel/qapplication.cpp:3156
#32 0x00007fc8fb968ba9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x561ab1e1efc0, event=0x7fc8d804ea40) at ../../include/QtCore/5.15.2/QtCore/private/../../../../../../../../src/Qt5/qtbase/src/corelib/thread/qthread_p.h:325
#33 0x00007fc8fb96b5d1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x561ab1c49580) at /home/leszek/kde/src/Qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1817
#34 0x00007fc8fb9bcc93 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x561ab1d1db30) at /home/leszek/kde/src/Qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:277
#35 0x00007fc8fa33cf2e in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007fc8fa33d1c8 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007fc8fa33d25c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007fc8fb9bc354 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x561ab1d2ce30, flags=...) at /home/leszek/kde/src/Qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:423
#39 0x00007fc8fb967853 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffd154292d0, flags=..., flags@entry=...) at ../../include/QtCore/../../../../../src/Qt5/qtbase/src/corelib/global/qflags.h:141
#40 0x00007fc8fb96f6cc in QCoreApplication::exec() () at ../../include/QtCore/../../../../../src/Qt5/qtbase/src/corelib/global/qflags.h:121
#41 0x00007fc8fe151c0f in Akonadi::ResourceBase::init(Akonadi::ResourceBase&) (r=...) at /home/leszek/kde/src/akonadi/src/agentbase/resourcebase.cpp:564
#42 0x0000561ab18fc0ec in Akonadi::ResourceBase::init<ImapResource>(int, char**) (argc=3, argv=0x7ffd15429528) at /opt/plasma5/include/KF5/AkonadiAgentBase/resourcebase.h:183
#43 0x0000561ab18fbfc9 in main(int, char**) (argc=3, argv=0x7ffd15429528) at /home/leszek/kde/src/kdepim-runtime/resources/imap/main.cpp:9
[Inferior 1 (process 841011) detached]
Comment 1 Leszek Lesner 2021-04-22 10:26:19 UTC
Created attachment 137793 [details]
Patch to fix imapset Q_ASSERT

I think I found a fix now. After adding this patch where I adjust the assert I don't get any web.de imap crash anymore. 
All the other imap accounts run fine after the change aswell.
Comment 2 Bug Janitor Service 2021-04-22 12:14:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/kimap/-/merge_requests/8
Comment 3 Nicolas Fella 2022-01-08 22:26:04 UTC

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