Bug 309015 - Kontact stops working on internet connection loss, KDE logout needed for recovery
Summary: Kontact stops working on internet connection loss, KDE logout needed for reco...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kontact
Classification: Applications
Component: mail (show other bugs)
Version: 4.8.x
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-25 22:36 UTC by gustavo
Modified: 2017-01-07 22:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
folders after killing akonadi_imap (15.31 KB, image/png)
2012-10-25 22:36 UTC, gustavo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gustavo 2012-10-25 22:36:00 UTC
Kontact stops fetching emails upon internet connection loss and doesn't recover. The account type is IMAP with SSL. Kontact version is 4.8.5 (not available in the version list in the bugtracker).

Closing Kontact and opening again doesn't help. It still doesn't fetch emails and the progress 
indicator (progress bar at the right bottom corner) doesn't show up.

It be seen that an akonadi_imap processe is left ofer:
user 22261  9154  1 Oct24 ?        00:19:25 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resource_0

Stracing the process we can see it is in a cycle of

poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=6, events=POLLIN}, {fd=12, events=POLLIN}], 5, -1) = 1 ([{fd=6, revents=POLLIN}])
read(3, 0xbf812c6c, 16)                 = -1 EAGAIN (Resource temporarily unavailable)
recv(6, "j\0\3\1C\0\0\0\1\0\200\2\1\0\0\0\251\255\7\232\251\255\7\232\10\200\273\277z\32\6\10", 4096, 0) = 32
recv(6, 0x9276f90, 4096, 0)             = -1 EAGAIN (Resource temporarily unavailable)
recv(6, 0x9276f90, 4096, 0)             = -1 EAGAIN (Resource temporarily unavailable)
recv(6, 0x9276f90, 4096, 0)             = -1 EAGAIN (Resource temporarily unavailable)
recv(6, 0x9276f90, 4096, 0)             = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {3043019, 547303416}) = 0
recv(6, 0x9276f90, 4096, 0)             = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=6, events=POLLIN}, {fd=12, events=POLLIN}], 5, -1) = 1 ([{fd=6, revents=POLLIN}])

We can also see with netstat that a connection is still in state ESTABLISHED

tcp        0      0 192.168.1.10:51614      X.Y.W.Z:993        ESTABLISHED 22261/akonadi_imap

Killing the akonadi_imap processes doesn't help: kontact starts up with all the email folders in red characters (see atachment).

Killing ALL akonadi processes solves the problem as Kontact restarts akonadi.

An end user would have to logout / login again to restart receiving emails.

Conclusion: the akonadi backend does not deal with connections interruptions and Kontact does not deal with akonadi's misbehaviour.

Reproducible: Always

Steps to Reproduce:
1. open Kontact and fetch mails
2. loose internet connection
3. observe that Kontact is not fetching emails anymore
Actual Results:  
Kontact stopped fetching emails.

Expected Results:  
Kontact should realize the internet connection is available already and restar working properly.
Comment 1 gustavo 2012-10-25 22:36:52 UTC
Created attachment 74802 [details]
folders after killing akonadi_imap
Comment 2 Dennis Schridde 2013-01-14 18:13:14 UTC
As a temporary workaround, try running "akonadictl restart" in a console. That restarts the Akonadi daemon, which (on my system) makes Kontact work again.

For me the problem is also a little bit different (and I am not sure whether it is related to internet connection loss - I put my laptop in standby very often, which implies no network connection or a different IP, since it may be in a different network when it resume): Sometimes Kontact stops doing anything at all. It does not display the contents of folders anymore when I switch to them, or fails to show me the contents of messages in the current folder.
Comment 3 Denis Kurz 2016-09-24 19:19:29 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kontact (version 5.0 or later, as part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 4 Denis Kurz 2017-01-07 22:36:25 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.