Bug 440343

Summary: Akonadi crashes every time I try and configure an account
Product: [Frameworks and Libraries] Akonadi Reporter: Aaron Williams <aaronw>
Component: IMAP resourceAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: crash CC: rahulc93
Priority: NOR Keywords: drkonqi
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Aaron Williams 2021-07-28 02:39:47 UTC
Application: akonadi_imap_resource (5.17.80 (21.08.0))

Qt Version: 5.15.2
Frameworks Version: 5.84.0
Operating System: Linux 5.3.18-lp152.84-preempt x86_64
Windowing System: X11
Drkonqi Version: 5.22.3
Distribution: "openSUSE Leap 15.2"

-- Information about the crash:
I recently updated Akonadi and Kontact and now I am seeing a problem with my Office365 email account. Akonadi keeps logging with about once per second:

org.kde.pim.kimap: The stream parser raised an exception: Unable to read more data

In the settings dialog when I go to Accounts and the Receiving tab I keep seeing this account flickering from "Ready (0%) to some other message ending with 'INBOX' (0%). It flashes too fast for me to read it.

When I click on the Modify button for either my home email account (which has no problems since it's running on Cyrus IMAP) or my Office365 account I get this crash.

Note that I've seen another problem with Office365. I have over 10 years worth of email and I have seen the Office365 email server respond with an error telling the client to pause for a certain length of time. This happens 100% of the time with EWS but I have seen this problem with IMAP as well.

See https://bugs.kde.org/show_bug.cgi?id=403903 for EWS.

I do not know if this is related to the update, but the update occurred over 3 hours before this problem started.

The crash can be reproduced every time.

-- Backtrace:
Application: Home (akonadi_imap_resource), signal: Segmentation fault
Content of s_kcrashErrorMessage: [Current thread is 1 (Thread 0x7ffbc15df980 (LWP 104093))]
[KCrash Handler]
#6  std::__uniq_ptr_impl<KPasswordLineEditPrivate, std::default_delete<KPasswordLineEditPrivate> >::_M_ptr() const (this=<optimized out>) at /usr/include/c++/7/bits/unique_ptr.h:147
#7  std::unique_ptr<KPasswordLineEditPrivate, std::default_delete<KPasswordLineEditPrivate> >::get() const (this=<optimized out>) at /usr/include/c++/7/bits/unique_ptr.h:332
#8  std::unique_ptr<KPasswordLineEditPrivate, std::default_delete<KPasswordLineEditPrivate> >::operator->() const (this=<optimized out>) at /usr/include/c++/7/bits/unique_ptr.h:326
#9  KPasswordLineEdit::setRevealPasswordAvailable(bool) (this=0xbabababababababa, reveal=true) at /usr/src/debug/kwidgetsaddons-5.84.0-lp152.241.2.x86_64/src/kpasswordlineedit.cpp:141
#10 0x0000557c0a8e8c35 in  ()
#11 0x0000557c0a8e186d in  ()
#12 0x0000557c0a9120ed in  ()
#13 0x00007ffbc000b5c3 in  () at /usr/lib64/libKF5AkonadiAgentBase.so.5
#14 0x00007ffbbc551418 in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QVector<int> const&, int) (this=this@entry=0x557c0bf668f0, object=object@entry=0x557c0bf49630, msg=..., metaTypes=..., slotIdx=<optimized out>) at qdbusintegrator.cpp:1001
#15 0x00007ffbbc5548a0 in QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (this=this@entry=0x557c0bf668f0, object=0x557c0bf49630, flags=flags@entry=273, msg=...) at qdbusintegrator.cpp:904
#16 0x00007ffbbc55521c in QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (msg=..., flags=273, object=<optimized out>, this=0x557c0bf668f0) at qdbusintegrator.cpp:853
#17 QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (this=0x557c0bf668f0, node=<optimized out>, msg=..., pathStartPos=<optimized out>) at qdbusintegrator.cpp:1497
#18 0x00007ffbbc5573d8 in QDBusActivateObjectEvent::placeMetaCall(QObject*) (this=0x557c0c059120) at qdbusintegrator.cpp:1617
#19 0x00007ffbbc07126b in QObject::event(QEvent*) (this=0x7ffd1b0e14f0, e=0x557c0c059120) at kernel/qobject.cpp:1314
#20 0x00007ffbbd4de37c in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x557c0bc73b40, receiver=receiver@entry=0x7ffd1b0e14f0, e=e@entry=0x557c0c059120) at kernel/qapplication.cpp:3632
#21 0x00007ffbbd4e5170 in QApplication::notify(QObject*, QEvent*) (this=0x7ffd1b0e14e0, receiver=0x7ffd1b0e14f0, e=0x557c0c059120) at kernel/qapplication.cpp:3156
#22 0x00007ffbbc03d073 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x7ffd1b0e14f0, event=0x557c0c059120) at kernel/qcoreapplication.cpp:1064
#23 0x00007ffbbc03d24e in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=receiver@entry=0x7ffd1b0e14f0, event=event@entry=0x557c0c059120) at kernel/qcoreapplication.cpp:1462
#24 0x00007ffbbc03fa91 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x557c0bc73960) at kernel/qcoreapplication.cpp:1821
#25 0x00007ffbbc040018 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1680
#26 0x00007ffbbc09ffa3 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x557c0bebaa90) at kernel/qeventdispatcher_glib.cpp:277
#27 0x00007ffbb7d00624 in g_main_dispatch (context=0x557c0bc98aa0) at ../glib/gmain.c:3216
#28 g_main_context_dispatch (context=context@entry=0x557c0bc98aa0) at ../glib/gmain.c:3881
#29 0x00007ffbb7d009c0 in g_main_context_iterate (context=context@entry=0x557c0bc98aa0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:3954
#30 0x00007ffbb7d00a4c in g_main_context_iteration (context=0x557c0bc98aa0, may_block=may_block@entry=1) at ../glib/gmain.c:4015
#31 0x00007ffbbc09f64c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x557c0bc7f130, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#32 0x00007ffbbc03b8ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffd1b0e1430, flags=..., flags@entry=...) at kernel/qeventloop.cpp:232
#33 0x00007ffbbc0450f7 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1375
#34 0x00007ffbbfff175d in Akonadi::ResourceBase::init(Akonadi::ResourceBase&) () at /usr/lib64/libKF5AkonadiAgentBase.so.5
#35 0x0000557c0a8e138f in  ()
#36 0x00007ffbbb3dc34a in __libc_start_main (main=0x557c0a8df370, argc=3, argv=0x7ffd1b0e1668, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd1b0e1658) at ../csu/libc-start.c:308
#37 0x0000557c0a8df3aa in  ()
[Inferior 1 (process 104093) detached]

Possible duplicates by query: bug 439991, bug 428358, bug 425651, bug 418844, bug 418707.

Reported using DrKonqi
Comment 1 Aaron Williams 2021-07-28 03:48:21 UTC
Update, this was due to Akonadi not handling a very long CC list properly. The server thought it received a "CC" command and failed. I have the entire log entry, but I do not want to attach it here for obvious reasons.

Here's the IMAP log entry:


C: A000005 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CLIENTACCESSRULES CLIENTNETWORKPRESENCELOCATION BACKENDAUTHENTICATE CHILDREN IDLE NAMESPACE LITERAL+
S: A000005 OK CAPABILITY completed.
C: A000006 NAMESPACE
S: * NAMESPACE ( ("" "/") ) ( ) ( )
S: A000006 OK NAMESPACE completed.
C: A000007 ID ("name" "Kontact IMAP Resource")
S: * ID ( name Microsoft.Exchange.Imap4.Imap4Server version 15.20 )
S: A000007 OK ID completed
C: A000008 APPEND "INBOX" "27-Jul-2021 14:58:48 +0000" {110937}
S: + Ready for additional command text.
C: Received: from DM5PR1801MB1898.namprd18.prod.outlook.com (2603:10b6:4:6c::35) by BYAPR18MB2469.namprd18.prod.outlook.com with HTTPS; Tue, 27 Jul 2021 14:59:39 +0000
Received: from CO2PR04CA0074.namprd04.prod.outlook.com (2603:10b6:102:1::42) by DM5PR1801MB1898.namprd18.prod.outlook.com (2603:10b6:4:6c::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.29; Tue, 27 Jul 2021 14:59:30 +0000
Received: from MW2NAM04FT047.eop-NAM04.prod.protection.outlook.com (2603:10b6:102:1:cafe::2c) by CO2PR04CA0074.outlook.office365.com (2603:10b6:102:1::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.20 via Frontend Transport; Tue, 27 Jul 2021 14:59:30 +0000
...
S: Cc: BAD Command Error. 10
X
Comment 2 Aaron Williams 2021-07-28 03:51:33 UTC
I'm going to open a new bug.
Comment 3 Carl Schwan 2023-04-27 18:57:17 UTC
*** Bug 440377 has been marked as a duplicate of this bug. ***