[Kde-pim] Cannot read old local email (mixedmaildir resource) - "unable to list items"

David Faure faure at kde.org
Wed May 2 20:19:13 BST 2012


On Thursday 19 April 2012 18:28:54 Andras Mantia wrote:
> David Faure wrote:
> > On Saturday 14 April 2012 10:11:52 Andras Mantia wrote:
> >> David Faure wrote:
> >> > I click on a local folder, then on an old local email, and I see:
> >> > nothing.
> >> > 
> >> > On stderr, kmail says:
> >> > 
> >> > kmail2(8079) KMKernel::instanceError:  instance :
> >> > "akonadi_mixedmaildir_resource_2"  received error : "Unable to list
> >> > items"
> >> > 
> >> > Looking at the code, this error message comes from akonadiserver, NOT
> >> > from the resource (confusing!).
> >> > 
> >> > Looking at the server logs, I see:
> >> > 
> >> > Error during executing query "SELECT PimItemTable.id,
> >> > PimItemTable.remoteId, MimeTypeTable.name, ResourceTable.name,
> >> > PimItemTable.rev, PimItemTable.rem oteRevision, PimItemTable.size,
> >> > PimItemTable.datetime, PimItemTable.collectionId FROM PimItemTable
> >> > INNER JOIN MimeTypeTable ON ( PimItemTable.mimeTypeId =
> >> > MimeTypeTable.id ) INNER JOIN CollectionTable ON (
> >> > PimItemTable.collectionId = CollectionTable.id ) INNER JOIN
> >> > ResourceTable ON ( CollectionTable.resourceId = ResourceTable.id )
> >> > WHERE ( ( PimItemTable.id = :0
> >> > ) ) ORDER BY PimItemTable.id DESC" :  "MySQL server has gone away
> >> > QMYSQL: Unable to execute query"
> >> > 
> >> > What does this mean, it has gone away?? It's working for other
> >> > resources, so I suppose this is rather a symptom of a mysql error?
> >> 
> >> As you are a, hm, developer, the standard questions come:
> >> - do you have the content on the disk?
> > 
> > Yes, I found the local mail with grep:
> > ~/Mail/sent-mail/cur/1304552594.11432.U76yj:2,S
> 
> Then the easy fix is recreating the account. ;)

True. I guess I'll resort to that if nothing else works.

Right now, this resource is making me discover all sorts of other bugs...
1) a dbus timeout when opening the folder, because the resource parses the 
whole maildir listing (14K emails). I'm trying to increase the dbus timeout 
(using the method I added to Qt-4.8), but it seems to lead to an immediate 
timeout... I'll keep debugging.

2) this error:
akonadi_mixedmaildir_resource_2(32114)/akonadiresource (maildir): "Unknown 
error. (NO [LRCONFLICT] Resource tries to modify item with dirty payload, 
aborting STORE.

but maybe this is a consequence of the dbus timeout that happens before that:

request for item 321797 "1304552594.11432.U76yj:2,S" failed: "Unable to 
retrieve item from resource: Did not receive a reply.
 
> >> - what is in the database? Same problem if you run the query from
> >> akonadiconsole?
> > 
> > Hmm, the question is what to use instead of ":0"...
> > I used "> 0" instead of "= :0", and the query worked indeed, I got 417433
> > rows of results.
> 
> Pimitemtable.id is probably the id of the item (mail). What you should do is
> to find your mail in the db. Try to find it by remote it in the
> pimitemtable, the remote id would be the file name.
> If you have it, you have the id as well, and see what the query does in the
> akonadiconsole.

Ah I see.
Found it with WHERE PimItemTable.remoteId = '1304552594.11432.U76yj:2,S'
which gives id = 321797
and then ran the query with id = 321797
and it ran fine.
But of course this is 3 weeks later, and I can't reproduce the "MySQL server 
has gone away" error, instead I get the issue 1) and 2) above...
Well, it happened again while debugging in gdb, maybe it's a timeout at the 
mysql level. It doesn't happen in akonadiconsole because there's nothing wrong 
with the query itself, it's about the context (many threads in 
akonadiserver!).


-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5

_______________________________________________
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