Created attachment 104167 [details] akonadiconsole debugger I've got a mail folder into which a filter is moving newsletters upon arrival. Something might have gone wrong when filtering, but a few of the emails appear twice. When I click on an unread email in the folder, kmail gets stuck on "retrieving folder content". I had applied akonadictl fsck and akonadictl vacuum previously, but this doesn't change the situation. I've attached pictures from akonadiconsole's debugger and job tracker.
Created attachment 104168 [details] akonadiconsole job tracker
Please try the following guide to resolve the problem: http://www.dvratil.cz/2017/01/kmail-multiple-merge-candidates-error-and-how-to-fix-it/
Thanks for your quick reply, this fixed it. I should have probably googled more thoroughly. BTW: You mentioned in the blog post that this bug should be fixed in 16.12.1, I experienced it on 16.12.2 (openSUSE Tumbleweed packages).
In case this helps: I've just had to clear the cache of a folder once more, so this still happens in 16.12.2. It seems to be connected to filtering: the folder contains newsletters, which are put there by a filter rule upon receipt. I can't see anything special about the filter I use, though.
I experience a similar issue in 16.12.3 on manjaro.
Same problem here. Updated on OpenSUSE Tumbleweed. The Kmail/ Akonadi combo is very much a "hit and miss" at the moment. Sometimes I can read quite some emails in a row, sometimes I get the "Retrieving Folder Content" message for hours on end. In the past restarting akonadi seemed to help, but no longer. Akonadi is at 5.4.3. I'll be happy to provide any logs, info whatever that could help in fixing this.
Created attachment 105826 [details] Patch to have akonadi return the first result if her are multiple log multiple merge candidates as an error, but rather than returning nothing, return the first result. This seems like a less bad result than the stalls that currently happen in kmail/kontact.
The patch above is compile tested. The patch applies and builds across a wide range of versions, but finding the right version and variables to work with kubuntu 17.04's kf5 5.31
What your patch does it dangerous as it can potentially overwrite the wrong data (that's why the code bails out if it finds more than one candidate - it cannot tell which one it should overwrite).
Hi, Daniel. I hear what you are saying in theory, but the current situation with kmail/kontact is worse, with mail sync cycles just hanging and the program becoming inoperable, sometimes becoming usable again by restarting akonadi, and sometimes requiring the db to be deleted. In practice email message ID's may be duplicated in terms of actual copies, but each copy should contain exactly the same message. The current behavior is clearly wrong. Either it should be updating ALL the entries, or if it is just returning a reference to the content, then any one of them will do (I was understanding it to be the second). Can you tell me which it is? Maybe I'm misunderstanding how this is being used.
(In reply to farandole from comment #5) > I experience a similar issue in 16.12.3 on manjaro. Also here on Mageia-6: https://bugs.mageia.org/show_bug.cgi?id=21486
*** This bug has been marked as a duplicate of bug 338658 ***