[Kde-pim] KMail seems to loose connection to Akonadi at times

Daniel Vrátil dvratil at redhat.com
Thu Nov 6 11:17:45 GMT 2014


On Wednesday 05 of November 2014 23:29:49 Ingo Klöcker wrote:
> On Monday 03 November 2014 11:26:24 Daniel Vratil wrote:
> > From this description it sounds like the session is stuck (that's why
> > the window closes, but the event loop won't quit, as the Akonadi
> > Session is still active. You can debug this bug trying to log
> > communications between KMail and server:
> > 
> > export AKONADI_SESSION_LOGFILE=/tmp/akonadi.log
> > kmail
> 
> I tried this, but /tmp/akonadi.log wasn't even created. Maybe my KMail
> is too old?

IIRC I added this to kdepmlibs in 4.13.

> Anyway, before I looked up your message I ran akonadiconsole when KMail
> was stuck. In one of the many tabs in the Debugger tab (in a tab called
> "kmail2-<some number> (some hex number)") I found the following command
> (without reply):
> 
> 785 UID FETCH 441172 FULLPAYLOAD ALLATTR EXTERNALPAYLOAD (UID REMOTEID
> REMOTEREVISION COLLECTIONID FLAGS SIZE DATETIME PLD:HEAD)
> 
> 
> After shutting down and restarting KMail, I could reproduce the problem
> by selecting the same message (resp. the same folder in the problematic
> account; the message is selected automatically by KMail) that caused the
> problem the first time. This time I found the following in
> akonadiconsole
> 
> 15 UID FETCH 441172 FULLPAYLOAD ALLATTR ANCESTORS 1 EXTERNALPAYLOAD (UID
> REMOTEID REMOTEREVISION COLLECTIONID FLAGS SIZE DATETIME
> ATR:ErrorAttribute)
> 15 NO Unable to fetch item from backend (collection 0) : Unable to
> retrieve item from resource: Did not receive a reply. Possible causes
> include: the remote application did not send a reply, the message bus
> security policy blocked the reply, the reply timeout expired, or the
> network connection was broken.

So this is most probably a problem with Resource task processing getting stuck 
(most probably on a change replay).

> 16 UID FETCH 441172 FULLPAYLOAD ALLATTR EXTERNALPAYLOAD (UID REMOTEID
> REMOTEREVISION COLLECTIONID FLAGS SIZE DATETIME PLD:HEAD)
> 
> 
> Once the account goes bad, I can reproduce the problem after each
> restart of KMail simply by selecting the problematic folder.

Yep, because the retrieval requests will just be piling up in the resource 
queue, but the resource is not processing new tasks.

> I tried whether killing the problematic agent helps. If I do this then
> KMail no longer gets stuck when I select the problematic folder. But
> KMail cannot display the message either. In akonadiconsole I see
> 
> 15 UID FETCH 441172 FULLPAYLOAD ALLATTR ANCESTORS 1 EXTERNALPAYLOAD (UID
> REMOTEID REMOTEREVISION COLLECTIONID FLAGS SIZE DATETIME
> ATR:ErrorAttribute)
> 15 NO Unable to fetch item from backend (collection 0) : Unable to
> contact resource
> 16 UID FETCH 441172 FULLPAYLOAD ALLATTR EXTERNALPAYLOAD (UID REMOTEID
> REMOTEREVISION COLLECTIONID FLAGS SIZE DATETIME PLD:HEAD)
> 16 NO Unable to fetch item from backend (collection 0) : Unable to
> contact resource
> 17 UID FETCH 441172 FULLPAYLOAD ALLATTR EXTERNALPAYLOAD (UID REMOTEID
> REMOTEREVISION COLLECTIONID FLAGS SIZE DATETIME PLD:HEAD)
> 17 NO Unable to fetch item from backend (collection 0) : Unable to
> contact resource
> 
> This makes sense because the agent has not been restarted.

Yep. Restarting the broken agent should usually help, as it will restart 
processing of the ChangeReplay queue. There is a probability, that the queue 
will get stuck again (if there's a change at the beginning of the queue that 
triggers some bug and breaks the tasks processing - the change won't get 
removed from the queue until it finishes, so if it never finishes, it will 
always be there -> then you need to remove the change replay log), but it does 
not happen often.

I don't have any solution to this, other than completely changing the way 
tasks are processed in ResourceScheduler, and to stop using DBus for retrieval 
request.

Dan

> 
> 
> Regards,
> Ingo

-- 
Daniel Vrátil | dvratil at redhat.com | dvratil on #kde-devel, #kontact, #akonadi
Software Engineer - KDE Desktop Team, Red Hat Inc.

GPG Key: 0xC59D614F6F4AE348
Fingerprint: 4EC1 86E3 C54E 0B39 5FDD B5FB C59D 614F 6F4A E348
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20141106/662b4507/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