Bug 291746 - sometimes imap accounts are not updated any more
Summary: sometimes imap accounts are not updated any more
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 4.8
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-17 08:58 UTC by tim blechmann
Modified: 2017-01-07 21:26 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tim blechmann 2012-01-17 08:58:59 UTC
Version:           4.8 (using Devel) 
OS:                Linux

i am using kmail with an imap account. sometimes the imap account stops being updated. kmail is still usable, but new emails do not show up. `check emails' does have no effect. the only way to restore the functionality is to stop kmail and to restart akonadi. sometimes it stops working after like 10 minutes, sometimes it works for an hour.

could be either a deadlock or a starvation.

Reproducible: Sometimes

Steps to Reproduce:
use kmail with an imap account and hope for the worst.
deadlocks or starvations are hard to reproduce. instead of testing, a detailed code analysis may be required.


Expected Results:  
kmail should fetch new mails from an imap account.
Comment 1 Laurent Montel 2012-01-17 11:50:58 UTC
imap is online ? (look at with akonadiconsole)
Comment 2 MarkusH 2012-01-28 20:08:12 UTC
I can confirm that on KDE 4.8 on Arch Linux. It seems to always be the secondary IMAP account. On "Settings" -> "Configure KMail" the Status for the account changes to "Connection established" but stucks. Restarting, KMail as well as Akonadi and the integrated MySQL server does not solve the problem. And even a reboot didn't change the behavior.
Comment 3 Christian 2012-08-08 11:57:49 UTC
I have the same problem or a similar problem. Sometimes, after a while of absence (it is possible that the network connection was lost in the meantime, but it is now available again, KMail was running all the time), the IMAP folder contents and new message counts are out of sync with the IMAP server. (Checked eg on the webmail in a browser window.) Then, also, KMail cannot display IMAP messages that have to be fetched from the server. The status bar says it is "ready", the progress bar says 0%, and when I click on the arrow, it shows me that it is busy synchronising another IMAP account (0%).
Clicking on "Update account" or "Update folder" seems to have no effect. Closing Kontact (i.e. completely closing Kontact so that the icons disappear) and restarting it helps sometimes, but not always.
Comment 4 Christian 2012-08-25 10:10:48 UTC
More information on my experience with this bug. I think it happens when the internet connection has been extremely slow (but not offline). Sometimes the account folders are greyed out in KMail2 then, sometimes they aren't, but the symptoms are the same. It refuses to check for new mail (I mean, nothing happens). It also doesn't send out mail and instead queues it. Sometimes I can read in the pop-up progress bar "0% - is not in the network" (this is what the Finnish text means), but usually it doesn't indicate any activity (I mean, nothing happens).

I think a workaround is to select "Work offline" from the main menu, then select "Work online". Afterwards everything seems to be ok again. My hunch is that KMail2's function for detecting network online status gets thrown off by slow/unreliable connections and doesn't attempt to detect at a later stage if the connection is actually still working.
Comment 5 Christian 2012-08-27 18:45:23 UTC
Another note: I thought my workaround fixed this, but sometimes it doesn't. In that case, I fixed it as follows:
1. Quit Kontact
2. Using the AkonadiTray icon, shut down Akonadi.
3. Wait until it is shut down.
4. Start Kontact.
On start up there was a message about Filters, then a message that an item could not be fetched. Ignore them.
5. Open the Kontact settings. It takes ages, but I think this re-starts Akonadi.
Now it worked for me. However, applying Filters was extremely slow. So probably this isn't really a work-around. However, continuing from above:
6. Log out
7. Log in
8. Restart Kontact.
Now everything is fine in my case. (For a while at last... let's hope it sticks.)
Comment 6 Christian 2012-09-01 06:44:06 UTC
Here's a better workaround:
1. Log out of KDE
2. Log in again
3. Start Kontact (it still doesn't work right at this stage)
4. Mark "Work offline" in the menu.
5. Mark as "Work online"
6. Go to the folder that doesn't update and right-click it to "Update this folder".
Then wait. It usually still takes a couple of minutes before anything happens, but it did update eventually.
Comment 7 Dmitri Kolobov 2013-02-05 09:25:14 UTC
I'm using OpenSuSE 12.2 and experiencing the same problem. 
kmail Version 4.9.5 Using KDE Development Platform 4.9.5 "release 3".

Workaround 'Work offline' -> 'Work online' from kmail menu helps.
Comment 8 Denis Kurz 2016-09-24 17:56:50 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 kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 9 Denis Kurz 2017-01-07 21:26:53 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.