Bug 314964 - after deleting large number of email, Invalid uidset errors
Summary: after deleting large number of email, Invalid uidset errors
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 4.10
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Mollekopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-12 04:44 UTC by Blindauer Emmanuel
Modified: 2013-12-19 13:50 UTC (History)
5 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 Blindauer Emmanuel 2013-02-12 04:44:53 UTC
Hello
After deleting several hundred of emails, kmail is unable to change state of new mails.
They keep being on "unread", and each mail generates the error: "IMAP Account: Store failed, server replied: X034489 BAD Error in IMAP command UID STORE: Invalid uidset"

Only new mails get these errors. old mails can be read without problem

Getting akonadiconsole up and browsing makes it consumes 100% of CPU and grows several Go. of memory



Reproducible: Always

Steps to Reproduce:
1. Delete 3000 mails (select + shift delete)
2. wait that all messages disappear
3. Verify with a webmail that all is gone
4. Get new mail and select latest .
Comment 1 Blindauer Emmanuel 2013-02-12 04:45:49 UTC
(same errors with kde 4.8)
Comment 2 Murz 2013-07-31 09:28:46 UTC
I got the same error on KDEPIM 4.11 Beta2 after sending message:
mymail@example.com: Store failed, server replied: A003406 BAD Error in IMAP command UID STORE: Invalid uidset
Comment 3 Murz 2013-07-31 09:29:24 UTC
Similar thread in forum about this error: http://forum.kde.org/viewtopic.php?f=215&t=111898
Comment 4 Daniel Vrátil 2013-10-30 16:22:28 UTC
Git commit 498d6678f478bd1bd9bdc944bb790f6b16b7ade4 by Dan Vrátil.
Committed on 30/10/2013 at 15:46.
Pushed by dvratil into branch 'KDE/4.11'.

Wait for changes from resource to be written to Akonadi before marking change as processed

This fixes a problem with invalid RIDs after inter-resource moves.
When there is an another changeReplay for the just moved item
scheduled in the new parent resource, the item will have invalid RID
(or rather RID assigned to it by the previous parent resource).
It's because the ItemModifyJob dispatched from ResourceBase::changesCommitted()
with the new RID is not finished yet when the next task is dispatched,
and so the item in resource's EntityCache is not invalidated
and the resource will use it instead of the updated one.

By waiting for the ItemModifyJob dispatched from changesCommited()
to finish before marking the change as processed and dispatching
next task we make sure that in case the next task involves the
same item the change will be stored in Akonadi and the item will
be invalidated in local caches, forcing the resource to fetch the
item again from Akonadi before starting the task.

This fixes 'Invalid uidset' error reported by IMAP resources after
the MailDispatcher agent moves the mail from local Outbox to remote
Sent folder and updates it's flags.
Related: bug 323762, bug 324807
FIXED-IN: 4.11.3

M  +11   -5    akonadi/resourcebase.cpp

http://commits.kde.org/kdepimlibs/498d6678f478bd1bd9bdc944bb790f6b16b7ade4
Comment 5 Kevin Ottens 2013-11-16 07:29:55 UTC
The IMAP resource has a new maintainer, reassigning to him.
Comment 6 Christian Mollekopf 2013-12-03 17:19:04 UTC
Looks like this has already been fixed
Comment 7 Kunszt Arpad 2013-12-19 13:06:21 UTC
I can confirm this - or a similar bug to this - in 4.11.2.

I deleted a lot of e-mails one of my IMAP accounts. After that I've got this error messages on the other account when I send an e-mail. The e-mail is sent, it saved in the Sent folder but this pops out every time.

I'm not sure that the mass e-mail removal is directly caused it. I upgraded to 4.11 from 4.10 and just after deleted a lot of unnecessary mails. The bug is appeared after those events.
Comment 8 Murz 2013-12-19 13:50:19 UTC
I have KDE & KMail Version 4.11.2 and this errors is still showing every time, but not after deleting - after storing message in "Sent" folder: http://i.imgur.com/VeeOv0x.png