Bug 324831 - Mail not being shown
Summary: Mail not being shown
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: message list (show other bugs)
Version: 4.11
Platform: Gentoo Packages Linux
: NOR grave
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 327216 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-12 10:23 UTC by Sean Harmer
Modified: 2014-03-02 20:29 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Harmer 2013-09-12 10:23:13 UTC
With KDE 4.11.1 I have started noticing a strange new bug with akonadi.

If I start kontact/kmail and within an IMAP resource move some messages to another imap folder then switch to that folder. Sometimes, only the mails that I just moved are visible. All older existing mails are not shown. It's like the imap resource is not querying the server for the folder contents but rather relying upon it's own incomplete cache.

I thought was a mail loss bug which would be very serious. However, restarting the akonadi server makes the mails reappear (but then some in another folder may well have disappeared). I can check with other mail clients and on the server itself that the mails are all still there so this seems to be a cache synchronisation issue.

Reproducible: Sometimes

Steps to Reproduce:
1. Start kmail with an imap resource
2. Move some mails to another imap dir
3. Change to that imap dir and observe only the moved mails are there, no pre-existing ones are shown
Actual Results:  
Pre-existing mails in the dir are not shown. Only the newly moved ones.

Expected Results:  
New mails and pre-existing mails are shown

This renders kmail useless for me as a mail client as I am often moving mails around and needing to reference older ones.
Comment 1 Nico Kruber 2013-09-17 13:53:09 UTC
I also have this problem on openSUSE since 4.11.0. Re-starting Kontact also solves is, so I guess it is some sort of too aggressive caching in KMail, not akonadi
Comment 2 Vojtěch Zeisek 2013-09-17 14:08:50 UTC
I don't know if my problem is same, but I think so. Very often when I receive new email, I see notification (among other KDE notifications) and I see respective number of unread emails on Kmail's tray icon and folder icon within IMAP resource. But when I open that IMAP folder, I don't see new e-mails. When I open that folder in another IMAP client or using webmail, I see all e-mails.
Also I have the issue with moving some messages as described in #1. But I think Akonadi is working, because I see notifications about new e-mails and I have to restart KMail (not Akonadi) to view those "lost" e-mails. It is very, very annoying.
I use openSUSE 12.3, 64 bit, KDE 4.11.1.
Comment 3 Georg Greve 2013-09-18 14:50:40 UTC
Seeing the same issue here. 

Seems related to https://bugs.kde.org/show_bug.cgi?id=312460 occurring.
Comment 4 Torsten Grote 2013-09-18 15:24:40 UTC
I can confirm this problem as well, although it does not happen in a reproducible fashion to me. Sometimes it is there, sometimes not.
Comment 5 Daniel Vrátil 2013-09-18 15:30:58 UTC
Haven't seen this in a while, but I'm restarting Akonadi/KMail quite often.

Anyway, most probably the same as bug 312460.

*** This bug has been marked as a duplicate of bug 312460 ***
Comment 6 Christian Mollekopf 2013-12-03 18:08:48 UTC
*** Bug 327216 has been marked as a duplicate of this bug. ***
Comment 7 Christian Mollekopf 2014-02-24 09:02:08 UTC
See comments in 312460
Comment 8 Wolfgang Rohdewald 2014-02-24 09:11:55 UTC
porting my comment from bug 312460: I have this problem with KDE 4.12.2, but I am not using IMAP at all. Only POP3.

Just a feeling but no hard evidence: This seemed to have gone away but since shortly it is back, maybe since I installed KDE 4.12.2. But of course that may have many other reasons.
Comment 9 Rigo Wenning 2014-02-24 10:53:38 UTC
I have that too (porting my comments from https://bugs.kde.org/show_bug.cgi?id=312460 Note that this is probably an akonadi or notification issue. Click on a folder nearby, wait 2-5 seconds, then click back on the folder you've moved the messages into. All messages appear. IMHO, some caching optimization went wrong. It came after performance improvements from 4.10 to 4.11 IMHO
Comment 10 Christian Mollekopf 2014-02-24 15:31:04 UTC
Git commit 6b29ca41b923a150758bc58dda37f38b1eb84f07 by Christian Mollekopf.
Committed on 24/02/2014 at 15:30.
Pushed by cmollekopf into branch 'master'.

Fixed the "only new items appear in collections" bug.

We have to avoid populating not-yet populated collectoins through signals
as otherwise internal assumptions are broken resulting in the ETM never fetching
the missing items.

M  +6    -0    akonadi/entitytreemodel_p.cpp
M  +93   -14   akonadi/tests/lazypopulationtest.cpp

http://commits.kde.org/kdepimlibs/6b29ca41b923a150758bc58dda37f38b1eb84f07
Comment 11 Christian Mollekopf 2014-02-24 15:33:36 UTC
Git commit b9dd26b6eadc9673c521185d8aad2aea2dc4f5e6 by Christian Mollekopf.
Committed on 24/02/2014 at 15:32.
Pushed by cmollekopf into branch 'KDE/4.12'.

Fixed the "only new items appear in collections" bug.

We have to avoid populating not-yet populated collectoins through signals
as otherwise internal assumptions are broken resulting in the ETM never fetching
the missing items.

M  +6    -0    akonadi/entitytreemodel_p.cpp

http://commits.kde.org/kdepimlibs/b9dd26b6eadc9673c521185d8aad2aea2dc4f5e6
Comment 12 Martin Steigerwald 2014-03-02 20:29:41 UTC
THis bug seems to be a duplicate of

Bug 319212 -  kmail doesn´t show all the mails that are in the folder, while Akonadiconsole does

or vice versa, at least when I read the initially description carefully. Feel free to mark those both as duplicated.