Summary: | dimap mail loss on kmail crash and troubleshoot / rebuild / refresh imap cache | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | Chris <cm> |
Component: | disconnected IMAP | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED WAITINGFORINFO | ||
Severity: | grave | CC: | bjoern, dg, jani-matti.hatinen, mgolden, richard, yzhernand |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Chris
2007-01-22 16:12:38 UTC
I experienced the same problem (same stack trace). Each time kmail crashes. I didn't had any message lost. Maybe because I ran cache update as soon as I started kmail without trying to synchronize first. Using Ubuntu Gutsy we also experienced the problem of losing emails when kmail crashes. I don't know if it is a ubuntu specific bug because we don't have other distributions available at the moment. Gutsy uses Kmail 1.9.6 (enterprise 0.20070907.709405). Just bacula rescued a whole bunch of emails. I lost my mails in inbox again while I removed some subscriptions. My IMAP-Server changed from courier to dovecot, so it doesn't seem to be a serverproblem. Thx to dovecot and lazyexpunge my mails are safe from being deleted from kmail. I must admit that there should be at least a warning using dimap that u could lose your emails! Yesterday this bug occured twice when I first ran kmail on the computer of my girlfriend. The emails in her inbox also got removed after changing subscription. Common guys it isn't funny for a user to lose mails. Now it's possible for me to restore the mails, but think about other users which don't have any experience and access to the server. Kmail doesn't simply delete the mails it expunges them. This is a severe bug in my opinion and it lasts long enough. I will try to reproduce it again. *** This bug has been confirmed by popular vote. *** This bug is most definitely confirmed on my machine. Last year, it affected my desktop and erased my whole inbox from my old gmail account which made me never use kmail on my desktop again. Since my laptop never gave me trouble, I continued to use it there. Today, however, it nearly happened again.I say nearly because all of my messges disappeared from my inbox in kmail, but fortunately not in gmail. This happened after trying to sync and then getting an error about not being able to get permissions for the inbox folder. I reflexively pressed "Continue", the default option, and say all the inbox folder cleared. When I attempted to sync once again, to restore my messages, I notice that the progress bar indicated it was deleting all "removed" messages from the folder on the server. I stopped it in time and only lost my 5 oldest messages. The first time, on my desktop, I did not see the dialog box about the permission error. That was on Kubuntu 7.10. Today's incident occurred on a laptop running Kubuntu 8.04 Now this problem again appeared with kmail 3.5.9 in Scalix mode (so also running with dimap). While kmail was running, another (!) file system mounted via NFS became unavailable so some programs did not respond any more. So I restarted the machine and started kmail again. Now I lost all my mail again - just the empty folder structure was left after the mail sync was finished. I can confirm that this bug is still present in kmail-1.10.0 on kde-4.1.0 on ubuntu-8.04. If a dimap sync is interrupted for whatever reason, on the next sync kmail will usually try to remove those messages, which it could not retrieve earlier. Furthermore, syncing a gmail account with more than a few hundred messages seems to be completely impossible at least on a slower connection. Although that could also be a timeout issue in the gmail server end. Please, please fix dimap so that won't eat people's e-mail under any circumstances. The current situation is simply unacceptable, especially considering how long bugs like this have been open. The easiest way to fix this is to reimplement dimap with journaling. Along with the local message cache there's also a local transaction cache. As with the message cache, each item in the transaction cahce is stored in a separate file (to minimise the possible effects of corruption). Whenever the user does something to a message locally (mark read, mark unread, mark important, move, copy, etc.), the action is stored in the transaction cache as well as the message state in the local message cache. When syncing to the server the items in the local transaction cache are reviewed one by one. If syncing to server is successful, the item in the transaction cache is marked as done. If syncing to server fails because the server state differs from the local state (message has already been removed, marked read, marked important, etc.), the item is marked as failed and ignored in further syncs. If syncing fails for any other reason (timeout, server down, etc.), the item is left in the transaction cache as open. Only when/if the local transaction cache is empty, the state between local message cache and server message store is compared and all differences are synced _from_ the server _to_ the client. For error situations the GUI can provide options for cleaning and/or reviewing the local transaction cache (in case particular transactions cause consistent errors). I'm not sure how close the current implementation is from the one I described, but from what I understand the above design shouldn't require too much refactoring. I can confirm I have experienced this problem a number of times with different kmail versions in dimap accounts. Today, after transferring a lot of mail to gmail archive via dimap and a few crashes I lost ability to check mail in gmail accountf see bug #169599 Looks like this bug is a duplicate of yet another bug, one that is FIVE YEARS OLD (bug #63353). Looks like we shouldn't be expecting a fix anytime soon... For me personally both kmail-1.9.10 (which ships with KDE-3.5.10) and kmail-1.10.92 (an SVN trunk checkout from 2008.12.09) don't exhibit this problem, so I'm cool. (Others may disagree, but I'd urge them to test with the latest SVN version, or at least with kmail-1.9.10 or KDE-4.2 once it's released, so we can close bugs like this) BTW, for the record, I use gmail with roughly 1,7GB of mail since early 2005 in two different accounts, one of them comprising 19 extra folders (in addition to the 8 default gmail folders) Please report whether this is still an issue in recent kmail Is there some reason to suppose that the problem has disappeared? Has there been a fix or rewrite to dimap? Yes, in the KDE 4.2 line there has been some bugfixing on IMAP code. Moreover I'm using kmail extensively since then and never found this problem. All reports here are older than KDE 4.2. Are these possibly the same bugs? https://bugs.kde.org/show_bug.cgi?id=164679 |