Bug 364802 - Kmail stops syncing with an IMAP account
Summary: Kmail stops syncing with an IMAP account
Status: RESOLVED WORKSFORME
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 5.1
Platform: Kubuntu Linux
: NOR grave
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-27 09:19 UTC by Lastique
Modified: 2022-12-29 05:24 UTC (History)
7 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 Lastique 2016-06-27 09:19:30 UTC
Sometimes Kmail stops syncing with one of my IMAP accounts (Gmail). It doesn't download new messages, even if I press the Check Mail button. No errors are displayed. I know there are messages since I can see them in web interface and Thunderbird.

Killing akonadi_imap_resource helps sometimes, but not always.


Reproducible: Sometimes
Comment 1 Lastique 2016-06-29 23:16:33 UTC
Also when that happens I can see that the email account is hanging "syncing" some of the folders at 97% and not changing.

I have another IMAP account, also hosted on GMail, and the problem does not appear with it. It has much less messages in it though.
Comment 2 Lastique 2016-06-29 23:17:38 UTC
The problem is on Kubuntu 16.04, x86_64.
Comment 3 Michael Mikowski 2016-07-02 03:28:50 UTC
I also ran into this problem today, but it might just be a problem with Google Imap because now works.  Can you try auto-detecting the server under Settings ->  Configure Kmail -> Accounts -> Receiving -> Modify (selected account) -> Advanced ->  Auto Detect (under Connection Settings)? Does it now work?
Comment 4 Lastique 2016-07-02 09:40:54 UTC
(In reply to Michael Mikowski from comment #3)
> I also ran into this problem today, but it might just be a problem with
> Google Imap because now works.

Thunderbird worked fine with the same account while Kmail did not. If this is a problem related to GMail then I guess some workaround is present in Thunderbird and missing in Akonadi.

> Can you try auto-detecting the server under
> Settings ->  Configure Kmail -> Accounts -> Receiving -> Modify (selected
> account) -> Advanced ->  Auto Detect (under Connection Settings)? Does it
> now work?

No, it's the same. Even after I restart the IMAP resource and press Check Mail, it starts syncing and eventually hangs on one of the folders.
Comment 5 Lastique 2016-09-25 00:42:29 UTC
I stopped using kmail because of this bug. Please, fix it.
Comment 6 Lastique 2016-09-25 02:08:30 UTC
Could the problem be related to the amount of messages in the email account? My ~/.local/share/akonadi/file_db_data contains 112871 files plus 100 directories with more files inside. Reading the file_db_data directory takes a noticeable amount of time.
Comment 7 Christophe Marin 2016-09-25 09:10:32 UTC
(In reply to Lastique from comment #6)
> Could the problem be related to the amount of messages in the email account?
> My ~/.local/share/akonadi/file_db_data contains 112871 files plus 100
> directories with more files inside. Reading the file_db_data directory takes
> a noticeable amount of time.

file_db_data should only contain directories nowadays. run 'akonadictl fsck' and check if you still have files inside.

This is completely unrelated however.
Comment 8 Lastique 2016-09-25 12:05:48 UTC
(In reply to Christophe Giboudeaux from comment #7)
> file_db_data should only contain directories nowadays. run 'akonadictl fsck'
> and check if you still have files inside.

Thanks, 'akonadictl fsck' removed the files from file_db_data. It didn't fix syncing though.
Comment 9 Michael D 2017-11-16 20:14:22 UTC
I had this happen after resuming from suspend sometimes, but now it's happening much more frequently, to the point of being unusable. Running "akonadictl restart" fixes it, but only temporarily.

I'm running kmail2 5.6.3.
Comment 10 Marco Gamberoni 2017-12-12 12:07:55 UTC
Me too.
Since many months, about once a day, have to work around this bug with "akonadictl restart".
Unrelated to gmail. For me it happens on imapmail.libero.it:993 (SSL)
Comment 11 Marco Gamberoni 2017-12-20 10:38:41 UTC
Some details from akonadiconsole when the bug is here, after a resuming (cannot say suspend in ram has something to do with the bug, but could.) 
After copying the info below, "Abort activity" does not stop task 24652, "Toggle Online/Offline" does.
No idea of how to go from this info to the relevant source code. Hints?


==================================================================
akonadikonsole, resource task list for akonadi_imap_resource_3 has:
__________________________________________________________________
ResourceScheduler: Online
 current task: 24652 SyncCollectionAttributes collection 52 
 queue 0 is empty
 queue 1 1 tasks:
  24667 ChangeReplay 
 queue 2 is empty
 queue 3 is empty
 queue 4 3 tasks:
  24651 SyncCollection collection 55 
  24654 SyncCollection collection 48 
  24656 SyncCollection collection 52 

IMAP tasks: RetrieveCollectionMetadataTask

============================================================
akonadiconsole debugger tab for the  akonadi_imap_resource_3
____________________________________________________________
akonadi_imap_resource_3 (0x564323260440) 423831 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "48" Name: "outbox" Parent ID: "42" Remote ID: "/outbox" Remote Revision: "" Resource: "akonadi_imap_resource_3" Mimetypes: "(message/rfc822, inode/directory)" Statistics: { Count: "204" Unseen: "0" Size: "100488225" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "5" Cache Timeout: "-1" Sync on Demand: "true" Local Parts: "(ENVELOPE, HEAD, RFC822)" } Ancestors: { { ID: "42" Remote ID: "imap://gamberoni@libero.it@imapmail.libero.it/" Name: "gamberoni@libero.it" Attributes: "QMap()" } { ID: "0" Remote ID: "" Name: "" Attributes: "QMap()" } } Attributes: "QMap((ENTITYDISPLAY, ("" "mail-folder-sent" "mail-folder-sent" ()))(MESSAGEFOLDER, outbound)(collectionannotations, /shared )(collectionflags, \Answered \Flagged \Deleted \Seen \Draft $SENT $ATTACHMENT $FORWARDED $QUEUED \*)(collectionquota, 330485760 1073741824)(expirationcollectionattribute, 
akonadi_imap_resource_3 (0x564323260440) 423831 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "-1" Name: "" Parent ID: "-1" Remote ID: "" Remote Revision: "" Resource: "" Mimetypes: "()" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "-1" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "()" } Ancestors: { } Attributes: "QMap()" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
akonadi_imap_resource_3 (0x564323260440) 423832 { Command: "FetchCollections" Collections: "UID 55" Depth: "0" Resource: "akonadi_imap_resource_3" Mimetypes: "()" Ancestors Depth: "2" Ancestors Attributes: "QSet()" Enabled: "false" Sync: "true" Display: "false" Index: "false" Status: "true" }
akonadi_imap_resource_3 (0x564323260440) 423832 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "55" Name: "trash" Parent ID: "42" Remote ID: "/trash" Remote Revision: "" Resource: "akonadi_imap_resource_3" Mimetypes: "(message/rfc822, inode/directory)" Statistics: { Count: "538" Unseen: "428" Size: "34264841" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "5" Cache Timeout: "-1" Sync on Demand: "true" Local Parts: "(ENVELOPE, HEAD, RFC822)" } Ancestors: { { ID: "42" Remote ID: "imap://gamberoni@libero.it@imapmail.libero.it/" Name: "gamberoni@libero.it" Attributes: "QMap()" } { ID: "0" Remote ID: "" Name: "" Attributes: "QMap()" } } Attributes: "QMap((ENTITYDISPLAY, ("" "user-trash" "" ()))(SpecialCollectionAttribute, trash)(collectionannotations, /shared )(collectionflags, \Answered \Flagged \Deleted \Seen \Draft $social $offerte \*)(collectionquota, 330485760 1073741824)(highestmodseq, 390)(imapacl, gamberoni@libero.it lrswipckxtdae %% %% lrswipckxtdae)(imapquota, %%%% STORAGE % 1048576 %%%% STORAGE % 322740)(timestamp, 1445581578)(uidnext, 6811)(uidvalidity, 1330668286))" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
akonadi_imap_resource_3 (0x564323260440) 423832 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "-1" Name: "" Parent ID: "-1" Remote ID: "" Remote Revision: "" Resource: "" Mimetypes: "()" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "-1" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "()" } Ancestors: { } Attributes: "QMap()" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
akonadi_imap_resource_3 (0x564323260440) 423833 { Command: "FetchCollections" Collections: "UID 52" Depth: "0" Resource: "akonadi_imap_resource_3" Mimetypes: "()" Ancestors Depth: "2" Ancestors Attributes: "QSet()" Enabled: "false" Sync: "true" Display: "false" Index: "false" Status: "true" }
akonadi_imap_resource_3 (0x564323260440) 423833 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "52" Name: "INBOX" Parent ID: "42" Remote ID: "/INBOX" Remote Revision: "" Resource: "akonadi_imap_resource_3" Mimetypes: "(message/rfc822, inode/directory)" Statistics: { Count: "414" Unseen: "62" Size: "196123129" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "5" Cache Timeout: "-1" Sync on Demand: "true" Local Parts: "(ENVELOPE, HEAD, RFC822)" } Ancestors: { { ID: "42" Remote ID: "imap://gamberoni@libero.it@imapmail.libero.it/" Name: "gamberoni@libero.it" Attributes: "QMap()" } { ID: "0" Remote ID: "" Name: "" Attributes: "QMap()" } } Attributes: "QMap((AccessRights, wcdWD)(ENTITYDISPLAY, ("Posta in arrivo" "mail-folder-inbox" "" ()))(collectionannotations, /shared )(collectionflags, \Answered \Flagged \Deleted \Seen \Draft $offerte $social $FORWARDED $TODO \*)(collectionquota, 330485760 1073741824)(expirationcollectionattribute, 
akonadi_imap_resource_3 (0x564323260440) 423833 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "-1" Name: "" Parent ID: "-1" Remote ID: "" Remote Revision: "" Resource: "" Mimetypes: "()" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "-1" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "()" } Ancestors: { } Attributes: "QMap()" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
akonadi_imap_resource_3 (0x564323260440) 423834 { Command: "FetchCollections" Collections: "UID 52" Depth: "0" Resource: "akonadi_imap_resource_3" Mimetypes: "()" Ancestors Depth: "2" Ancestors Attributes: "QSet()" Enabled: "false" Sync: "true" Display: "false" Index: "false" Status: "true" }
akonadi_imap_resource_3 (0x564323260440) 423834 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "52" Name: "INBOX" Parent ID: "42" Remote ID: "/INBOX" Remote Revision: "" Resource: "akonadi_imap_resource_3" Mimetypes: "(message/rfc822, inode/directory)" Statistics: { Count: "414" Unseen: "62" Size: "196123129" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "5" Cache Timeout: "-1" Sync on Demand: "true" Local Parts: "(ENVELOPE, HEAD, RFC822)" } Ancestors: { { ID: "42" Remote ID: "imap://gamberoni@libero.it@imapmail.libero.it/" Name: "gamberoni@libero.it" Attributes: "QMap()" } { ID: "0" Remote ID: "" Name: "" Attributes: "QMap()" } } Attributes: "QMap((AccessRights, wcdWD)(ENTITYDISPLAY, ("Posta in arrivo" "mail-folder-inbox" "" ()))(collectionannotations, /shared )(collectionflags, \Answered \Flagged \Deleted \Seen \Draft $offerte $social $FORWARDED $TODO \*)(collectionquota, 330485760 1073741824)(expirationcollectionattribute, 
akonadi_imap_resource_3 (0x564323260440) 423834 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "-1" Name: "" Parent ID: "-1" Remote ID: "" Remote Revision: "" Resource: "" Mimetypes: "()" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "-1" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "()" } Ancestors: { } Attributes: "QMap()" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
akonadi_imap_resource_3 (0x564323260440) 423835 { Command: "FetchCollections" Collections: "UID 55" Depth: "0" Resource: "akonadi_imap_resource_3" Mimetypes: "()" Ancestors Depth: "2" Ancestors Attributes: "QSet()" Enabled: "false" Sync: "true" Display: "false" Index: "false" Status: "true" }
akonadi_imap_resource_3 (0x564323260440) 423835 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "55" Name: "trash" Parent ID: "42" Remote ID: "/trash" Remote Revision: "" Resource: "akonadi_imap_resource_3" Mimetypes: "(message/rfc822, inode/directory)" Statistics: { Count: "538" Unseen: "428" Size: "34264841" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "5" Cache Timeout: "-1" Sync on Demand: "true" Local Parts: "(ENVELOPE, HEAD, RFC822)" } Ancestors: { { ID: "42" Remote ID: "imap://gamberoni@libero.it@imapmail.libero.it/" Name: "gamberoni@libero.it" Attributes: "QMap()" } { ID: "0" Remote ID: "" Name: "" Attributes: "QMap()" } } Attributes: "QMap((ENTITYDISPLAY, ("" "user-trash" "" ()))(SpecialCollectionAttribute, trash)(collectionannotations, /shared )(collectionflags, \Answered \Flagged \Deleted \Seen \Draft $social $offerte \*)(collectionquota, 330485760 1073741824)(highestmodseq, 390)(imapacl, gamberoni@libero.it lrswipckxtdae %% %% lrswipckxtdae)(imapquota, %%%% STORAGE % 1048576 %%%% STORAGE % 322740)(timestamp, 1445581578)(uidnext, 6811)(uidvalidity, 1330668286))" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
akonadi_imap_resource_3 (0x564323260440) 423835 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "-1" Name: "" Parent ID: "-1" Remote ID: "" Remote Revision: "" Resource: "" Mimetypes: "()" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "-1" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "()" } Ancestors: { } Attributes: "QMap()" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
akonadi_imap_resource_3 (0x564323260440) 423836 { Command: "FetchCollections" Collections: "UID 48" Depth: "0" Resource: "akonadi_imap_resource_3" Mimetypes: "()" Ancestors Depth: "2" Ancestors Attributes: "QSet()" Enabled: "false" Sync: "true" Display: "false" Index: "false" Status: "true" }
akonadi_imap_resource_3 (0x564323260440) 423836 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "48" Name: "outbox" Parent ID: "42" Remote ID: "/outbox" Remote Revision: "" Resource: "akonadi_imap_resource_3" Mimetypes: "(message/rfc822, inode/directory)" Statistics: { Count: "204" Unseen: "0" Size: "100488225" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "5" Cache Timeout: "-1" Sync on Demand: "true" Local Parts: "(ENVELOPE, HEAD, RFC822)" } Ancestors: { { ID: "42" Remote ID: "imap://gamberoni@libero.it@imapmail.libero.it/" Name: "gamberoni@libero.it" Attributes: "QMap()" } { ID: "0" Remote ID: "" Name: "" Attributes: "QMap()" } } Attributes: "QMap((ENTITYDISPLAY, ("" "mail-folder-sent" "mail-folder-sent" ()))(MESSAGEFOLDER, outbound)(collectionannotations, /shared )(collectionflags, \Answered \Flagged \Deleted \Seen \Draft $SENT $ATTACHMENT $FORWARDED $QUEUED \*)(collectionquota, 330485760 1073741824)(expirationcollectionattribute, 
akonadi_imap_resource_3 (0x564323260440) 423836 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "-1" Name: "" Parent ID: "-1" Remote ID: "" Remote Revision: "" Resource: "" Mimetypes: "()" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "-1" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "()" } Ancestors: { } Attributes: "QMap()" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }
Comment 12 Jure Repinc 2017-12-27 20:24:48 UTC
This problem also started happening here after upgrading to KDE Applications 17.12. I have 2 GMail accounts set up and with these it helps to go offline and then online (which effectively kills the akonadi_imap_resource processes). But with the other account going offline/online does not help. I have to restart akonadi itself or kill the corresponding imap resource process by hand.
Comment 13 CnZhx 2018-07-31 08:36:51 UTC
This problem seems have been fixed in recent updates and it has worked for me for a while. Should we mark this as fixed?
Comment 14 Justin Zobel 2022-11-29 05:06:10 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 15 Bug Janitor Service 2022-12-14 05:12:48 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 16 Bug Janitor Service 2022-12-29 05:24:33 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!