Bug 319212 - kmail doesn´t show all the mails that are in the folder, while Akonadiconsole does
Summary: kmail doesn´t show all the mails that are in the folder, while Akonadiconsole...
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: message list (show other bugs)
Version: 4.10.2
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 325338 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-02 09:51 UTC by Martin Steigerwald
Modified: 2015-03-14 10:15 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
kmails reduced view on the folder contents (264.89 KB, image/png)
2013-05-02 09:52 UTC, Martin Steigerwald
Details
akonadiconsole sees all 71 mails in that folder (291.46 KB, image/png)
2013-05-02 09:53 UTC, Martin Steigerwald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Steigerwald 2013-05-02 09:51:22 UTC
I just reported bug #319208 and moved the five mails I got back from Bugzilla to my kdepim folder where I store these bug reports mails. Then I accessed the folder and only see these five mails. "Geee", I thought it was mail data loss again, but it doesn´t appear to be, mails visible in Akonadiconsole and also as files in the maildir.

After a restart of KMail the mails appeared again.

Reproducible: Didn't try

Steps to Reproduce:
Honestly I have no idea, maybe just trying repeatedly:

1. Retrieve some mails via POP3
2. Move some of them to a folder with pre-existing mails
3. Access that folder.
Actual Results:  
See kmail.png that I will attach: KMail only shows the 5 mails I moved to the folder.

See akonadiconsole.png that I will attach: Akonadiconsole displays all 71 mails in that folder.

See:

martin@merkaba:~/.local/share/local-mail/.Lichtvoll.directory/.KDE.directory/pim> find -type f | wc -l
71

martin@merkaba:~/.local/share/local-mail/.Lichtvoll.directory/.KDE.directory/pim> find -type f -size -2k | wc -l 
0

Thus apparently no data loss (one-byte files as I experienced with previous migration attempts)

Expected Results:  
KMail shows all mails in the folder, without exception.

My fifth and last migration attempt looks like this:

 For this migration attempt, I put my old KMail-1 maildir contents (no mbox files in there) into ~/.local/share/local-mail and started with a fresh KMail configuration and newly created filter rules (no import). This works so far without any data losses as I experienced in my attempts with mutiple maildir resources (see bug #318444 and bug #318227, bug #318290, all on BTRFS, bug #319175 on Ext4). All Akonadi and Nepomuk data is stored on Ext 4 except for contacts and std.ics calender.

martin@merkaba:~> apt-show-versions | egrep "(mysql|akonadi|kmail)"
akonadi-backend-mysql/experimental uptodate 1.9.1-2
akonadi-backend-postgresql/experimental uptodate 1.9.1-2
akonadi-backend-sqlite/experimental uptodate 1.9.1-2
akonadi-server/experimental uptodate 1.9.1-2
akonadiconsole/experimental uptodate 4:4.10.2-2
kmail/experimental uptodate 4:4.10.2-2
libakonadi-calendar4/experimental uptodate 4:4.10.2-2
libakonadi-contact4/experimental uptodate 4:4.10.2-2
libakonadi-kabc4/experimental uptodate 4:4.10.2-2
libakonadi-kcal4/experimental uptodate 4:4.10.2-2
libakonadi-kde4/experimental uptodate 4:4.10.2-2
libakonadi-kmime4/experimental uptodate 4:4.10.2-2
libakonadi-notes4/experimental uptodate 4:4.10.2-2
libakonadiprotocolinternals1/experimental uptodate 1.9.1-2
libdbd-mysql-perl/sid uptodate 4.021-1+b1
libmysqlclient-dev/sid uptodate 5.5.30+dfsg-1.1
libmysqlclient18/sid uptodate 5.5.30+dfsg-1.1
libqt4-sql-mysql/sid uptodate 4:4.8.2+dfsg-11
mysql-client/sid uptodate 5.5.30+dfsg-1.1
mysql-client-5.5/sid uptodate 5.5.30+dfsg-1.1
mysql-common/sid uptodate 5.5.30+dfsg-1.1
mysql-server-core-5.5/sid uptodate 5.5.30+dfsg-1.1
python-mysqldb/sid uptodate 1.2.3-2
Comment 1 Martin Steigerwald 2013-05-02 09:52:17 UTC
Created attachment 79620 [details]
kmails reduced view on the folder contents

There are more than these 5 mails in it!
Comment 2 Martin Steigerwald 2013-05-02 09:53:30 UTC
Created attachment 79621 [details]
akonadiconsole sees all 71 mails in that folder
Comment 3 Martin Steigerwald 2013-05-02 09:59:10 UTC
Well, might have been related to having had two kmail processes running for whatever reason:

martin@merkaba:/tmp/akonadi-martin.o55AAq> ps aux | grep kmail
martin    2758  1.3  8.4 2572864 671692 ?      Sl   Mai01  14:48 /usr/bin/kmail -caption KMail
martin    3848  0.0  0.0   9836   960 pts/5    S+   11:49   0:00 grep kmail
martin    5529  0.0  0.8 2247864 66572 ?       S    Mai01   0:00 /usr/bin/kmail -caption KMail

After a restart of KMail it displays the complete folder contents again. And I have just one process running.

martin@merkaba:/tmp/akonadi-martin.o55AAq> ps aux | grep kmail | grep -v kio | grep -v grep
martin    3852  4.4  1.6 1836936 127544 ?      Sl   11:50   0:18 /usr/bin/kmail -caption KMail

Actually when trying to run kmail again just the kmail window pops up, so I have no idea how it could have happened to have two processes running. I tried hard by quitting and just Alt-F2 kmail directly after it several times, still only one process.

Wierd.
Comment 4 Martin Steigerwald 2013-05-02 10:00:56 UTC
Also it doesn´t reproduce with moving the recent bugzilla mails from my last comments to the kdepim folder. KMail just displays the folder contents fine. I´d suggest lets keep the bug report opened for a while for others to find it and comment on, or myself if it happens again, and if it doesn´t happen again close it.
Comment 5 Arthur Schiwon 2013-08-09 10:38:26 UTC
I have the same issue with Disconnected IMAP Accounts, KDE 4.10.5. It sometimes happens, no idea how to reproduce it. I don't run  Kmail standalone but with Kontact. There is only one Kontact process.
Comment 6 Till Schäfer 2013-09-11 15:05:55 UTC
I can confirm this behavior. Very often after moving some mails to another location the "to" folder only contain the moved mails. After restarting kontact/kmail, all mails are shown again. 

This bug is not limited to moved mails. Sometimes also newly received mails are not shown. The folder tree shows x new mails, but if you open that folder no new mail is present. Than after restarting, the new mails appear. 

I am using an IMAP account with storing mails for offline use.
Comment 7 Till Schäfer 2013-09-11 15:06:42 UTC
forget to mention that my kde version is 4.11.1
Comment 8 S. Bryant 2013-10-09 12:13:31 UTC
I am seeing this behaviour too.
KDE platform 4.11.2, OpenSUSE RPMs (64-bit).

Kontact also continues to show the same emails in the list after they've been removed using another client.

Restarting Kontact (without restarting Akonadi) seems to be enough to correct the list of emails for affected folders.

Steve
Comment 9 graham 2013-10-09 18:18:52 UTC
I can also confirm this bug, in 4.11.x.

The 4.10.x series didn't exhibit this bug for me.  I can confirm that the 4.10.x series did occasionally not show me all of the newly received messages in a folder until I'd restarted kmail, but the drag+drop problem is new in 4.11.x.

After dragging+dropping a message into any folder, upon navigating to that folder all I see are the messages which I'd just dropped there.  After restarting kmail I can see all of the messages, but I have to restart kmail first (which *REALLY* sucks as I file a lot of mail into per-client folders and then have to restart kmail every 10mins or so, just to be able to get to see the rest of the correspondence I'd had with them).

As with the original poster, I'm using POP3 accounts, not IMAP.

I can also confirm that this is *HIGHLY* reproduceable.  Take any message, drag it into any folder that already has mail in it.  Switch to that folder.  *ONLY* message you see is the one you just dragged there.  (e.g. this bug is so painfully obvious I'm actually surprised nobody caught it before release)
Comment 10 graham 2013-10-09 18:30:29 UTC
FYI... Bug 325338 appears to be a duplicate of this bug.
Comment 11 Jekyll Wu 2013-10-09 20:32:19 UTC
*** Bug 325338 has been marked as a duplicate of this bug. ***
Comment 12 Martin Steigerwald 2013-10-16 12:53:55 UTC
I see this bug more often in kmail 4.11 than in kmail 4.10. I saw it just three times in a row right after I upgraded to kmail 4.11.

Also setting to confirmed, cause the bug actually is confirmed.
Comment 13 graham 2013-11-19 19:40:12 UTC
After upgrading to KDE-4.11.3 on Fedora 19, I am not seeing this as a bug any longer (YAY!)...

I can drag+drop messages into other folders, switch _to_ those folders, and see *all* of the messages that are there (not just the ones that I dragged there moments ago).
Comment 14 Till Schäfer 2013-11-20 15:13:29 UTC
this is definitely NOT fixed to me in 4.11.3 (Gentoo Linux)
Comment 15 Guido Winkelmann 2013-12-13 10:55:56 UTC
I can confirm this bug with normal (not disconnected) IMAP folders on Gentoo with Kmail 4.11.3. Except for using IMAP instead of POP, the bug manifests exactly as described in comment #9.

The only workaround I have found is to kill and restart kmail.
Comment 16 graham 2014-01-15 00:17:20 UTC
Just updated to KDE-4.11.5 and this issue has returned.  :(((

Dragged a few messages into a folder, then switched to that folder later on, and the only messages that were visible were the six I dragged there; the other 700+ messages weren't visible in KMail until I restarted the application again.

Worse yet, it doesn't seem to be consistent; some folders work fine while others appear to get jammed up by dragging messages into them.
Comment 17 BastianBalthasarBux 2014-03-02 11:40:43 UTC
I can confirm this bug too, using KMail with Kontact in version 4.11.5, on two up-to-date openSuSE 13.1 machines one with 32bit and one 64bit.
I use IMAP solely, with three accounts ATM.
I want to add: to me it seems, that it does not happen with really _all_ folders/accounts, but I could not found out any rule by now, that explains which folders/accounts are concerned and which not.
BTW: if you hover over the folder, you can see the 'real' number of mails in the folder in the nice flyout which appears, guessing this information is maybe provided by akonadi console?

And yeah, the bug is very annoying. ;)
Comment 18 BastianBalthasarBux 2014-03-02 11:43:52 UTC
sed -e s/console/
Comment 19 Martin Steigerwald 2014-03-02 11:49:13 UTC
This still happens with 4.12.2 packages together with Akonadi 1.11.0. Can anybody confirm that? I am disappointed that this one and a lot of other bugs I reported are still not fixed within KDEPIM 4.12.2. Hopefully Munich switching to Kolab will add some more developer time to KDEPIM.

I think for 4.11 there are enough confirmations in this bug report already.
Comment 20 Kevin Krammer 2014-03-02 12:14:59 UTC
This sounds like the same behavior described in https://bugs.kde.org/show_bug.cgi?id=324831 which got fixed recently.

I have seen this as well any my workaround is to look at a couple of other folders which seems to "overflow" the message list's cache and it starts requesting the folder content anew.
Comment 21 Martin Steigerwald 2014-03-02 20:27:56 UTC
Kevin, that sounds exactly like the behavior I described and your workaround works as well. Just tested it. I will add a note to the bug report you mentioned.

Thanks,
Martin
Comment 22 Martin Steigerwald 2015-03-12 12:49:22 UTC
I didn´t see this since quite some time, currently using Akonadi 1.13 current master with MySQL performance improvements by Dan and Millian, kdepimlibs and kdepim-runtime from 24th of February and KMail 4.14.2. Does it still happen for you?

Otherwise I suggest to resolve it as "worksforme" and would do so in some time. Please give feedback.
Comment 23 Till Schäfer 2015-03-12 13:52:21 UTC
i also did not have noticed this problem in the last few month. Before, it was a quite regular problem.
Comment 24 Dirk Melcher 2015-03-12 19:06:35 UTC
Hello everybody,

I use Opensuse 13.1 with kmail4.11.5. I still encouter the problem 
oocasionally. It happens if I mark one or more mails from my main mailbox
and then choose "Message -> Move message to ..." to move them to another  
another mailbox. If I then open the mail box where I have moved the messages I 
see only the moved messages and not the other ones in this mail box.

If I close kmail, kill the kmail preocess with "pkill kmail" and reopen kmail 
all message can be seen and everything is fine.

Hope that helps! Many thanks fr your efforts,

Dirk Melcher



Am Donnerstag, 12. März 2015, 12:49:22 schrieben Sie:
> https://bugs.kde.org/show_bug.cgi?id=319212
> 
> --- Comment #22 from Martin Steigerwald <Martin@Lichtvoll.de> ---
> I didn´t see this since quite some time, currently using Akonadi 1.13
> current master with MySQL performance improvements by Dan and Millian,
> kdepimlibs and kdepim-runtime from 24th of February and KMail 4.14.2. Does
> it still happen for you?
> 
> Otherwise I suggest to resolve it as "worksforme" and would do so in some
> time. Please give feedback.
Comment 25 Till Schäfer 2015-03-12 21:49:18 UTC
I forgot to mention that my working version is 4.14.6 and akonadi server 1.13. 

@Dirk: That 4.11.x version was also affected at my computer. So maybe you should update to a newer version.
Comment 26 Dirk Melcher 2015-03-13 19:02:17 UTC
Hallo Till,

thank you for the hint. I don't know if a newer version of kmail ist available 
for OpenSuse 13.1.

Am Donnerstag, 12. März 2015, 21:49:18 schrieben Sie:
> https://bugs.kde.org/show_bug.cgi?id=319212
> 
> --- Comment #25 from Till Schäfer <till2.schaefer@uni-dortmund.de> ---
> I forgot to mention that my working version is 4.14.6 and akonadi server
> 1.13.
> 
> @Dirk: That 4.11.x version was also affected at my computer. So maybe you
> should update to a newer version.
Comment 27 Martin Steigerwald 2015-03-14 10:15:21 UTC
As Till also does not see the issue anymore, I am closing this.

Dirk, when it still happens with current versions on your system feel free to reopen or request a reopening (if you can´t do it).