[Kde-pim] Mail loss with maildir

Thomas McGuire mcguire at kde.org
Mon Sep 19 23:04:31 BST 2011


Hi,

today I tried to reproduce bug 279297, which is about mail being lost after a 
POP3 mailcheck.
I used a POP3 resource with 'leave on server' enabled, so that I don't really 
lose mail. My test was quite simple: Delete all mails from inbox, clear the 
seenUidList and the seenUidTimeList from the POP3 resource config. Upon next 
mail check with POP3, the resource will download all mails from the server 
again, and after the mail check, the amount of mails in the inbox should be 
equal to the amount of mails on the server. When done, delete the mails from 
inbox and delete the config keys to reset the test. Repeat the test a few 
times.
I was a bit shocked to see that I could indeed quite reliable trigger mail 
loss - I had 20 mails on the server, and only 18 or 19 would end up in the 
inbox.
After updating kdepim-runtime to master, the problem was gone.
So the mail loss bug did exist, but has been fixed now. With git bisect, I 
tracked down the commit that _fixed_ the mail loss, which is:
> commit 069f2897d372618e0428604b6954408b17ffb6bd
> Author: Andras Mantia <amantia at kde.org>
> Date:   Sat Sep 17 16:20:03 2011 +0300
> Avoid triggering the file system watcher when we add files ourselves.

Note that my tests could have been wrong. I tried multiple times though, and 
reverting 069f2897d372618e0428604b6954408b17ffb6bd caused the mail loss to re-
appear.

I have not analyzed this problem further yet. It seems that the file system 
watching in the mail dir resource can mess things up. Anyone an idea why? My 
guess is that the mail loss was introduced when first adding the file system 
watcher to the maildir resource, which would be with commit 
33ccaf415f2a4506b6ee997dd8db6ba9f4fc6c91 on June 13. Which means the mail loss 
would be in 4.7.0. This is only a guess, I did not verify.

What needs to be done now:
- Verify that it is indeed the FS watcher code somehow triggering the mail 
  loss, and analyzing what exactly happens
- Provide a minmal patch against 4.7.0 and send that to kde-packagers

I would appreciate if someone with a deeper understanding of the maildir 
resource or the syncing mechanism could have a look.

Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110920/723c8342/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list