Bug 235481 - all dimap data / receiving mail accounts deleted
Summary: all dimap data / receiving mail accounts deleted
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.13.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-26 21:08 UTC by Kaleb Pederson
Modified: 2015-04-12 10:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
one of 47 dialogs displaying a uid cache file error (30.30 KB, image/png)
2010-08-27 23:33 UTC, Kaleb Pederson
Details
New accounts dialog I was greeted with. (40.47 KB, image/png)
2010-08-27 23:34 UTC, Kaleb Pederson
Details
strace log showing dimap files being deleted (166.40 KB, application/x-gzip)
2010-08-27 23:35 UTC, Kaleb Pederson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kaleb Pederson 2010-04-26 21:08:58 UTC
Version:           1.13.2 (using 4.4.2 (KDE 4.4.2), Gentoo)
Compiler:          x86_64-pc-linux-gnu-gcc
OS:                Linux (x86_64) release 2.6.32-gentoo-r1

My one year old pushed the power button on my UPS so my system shutdown quite unexpectedly while KMail was running.  After logging back in, I started KMail but it didn't come up immediately. I didn't think much of it but came back to it a couple of minutes later to discover about 30 dialog boxes that said something to the effect that it couldn't access the correct files and that I should check filesystem permissions.

After dismissing the dialogs, I discovered that:

* KMail's layout didn't match my saved settings
* all my accounts for receiving mail were gone, and 
* all data (over 500M) for my three dimap accounts was gone.

A `find ~/.kde4 -print` showed my data to truly be gone. Luckily, my data is still present on my imap servers.

---

Related notes. About a year ago I was building a new machine whose RAM happened to be bad.  The machine would consistently shutdown or restart in the middle of various operations.  KMail behaved similarly under those situations, with the exception of the dialog boxes popping up.

The behavior was as follows:

1) System would shutdown unexpectedly
2) Upon starting KMail, it wouldn't appear as quickly as normal,
3) I would hear lots of disk activity which was kmail deleting the ~/.kde4/share/apps/kmail/dimap directory contents.
4) Once KMail started up, all my dimap data would be gone as well as my settings for receiving e-mail.
5) My accounts for sending e-mail were still present and functional.
6) My POP account data, which I have stored in ~/Mail, was still present.

I wish I had more information, but I'll try to respond to any questions and inquiries....

And I'll definitely start a better system backup regimen ;)
Comment 1 Kaleb Pederson 2010-08-27 23:31:32 UTC
This just happened again. Upon restarting my system and logging in I started kmail. It didn't appear right away. Remembering what happened before, I ran strace:


[***kibab@kibab ~***]$ ps aux | grep [k]mail
kibab    19634  3.5  0.4 475692 37216 ?        D    14:05   0:02 /usr/bin/kmail -caption KMail
[***kibab@kibab ~***]$ strace -o strace.log -f -ff -s1024 -p 19634
Process 19634 attached - interrupt to quit
^CProcess 19634 detached

The strace log shows that it was indeed deleting all my files. Here's a small excerpt:

stat("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272262518.17914.pEJzl:2,S", {st_mode=S_IFREG|0644, st_size=3345, ...}) = 0
lstat("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272262518.17914.pEJzl:2,S", {st_mode=S_IFREG|0644, st_size=3345, ...}) = 0
getdents(16, /* 0 entries */, 32768)    = 0
close(16)                               = 0
stat("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272262518.17914.UT4E3:2,S", {st_mode=S_IFREG|0644, st_size=2240, ...}) = 0
lstat("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272262518.17914.UT4E3:2,S", {st_mode=S_IFREG|0644, st_size=2240, ...}) = 0
brk(0x14f1000)                          = 0x14f1000
brk(0x1512000)                          = 0x1512000
unlink("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272261978.17914.QbIQK:2,S") = 0
unlink("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272261978.17914.riLCe:2,S") = 0
unlink("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272261978.17914.yejcA:2,S") = 0
unlink("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272261979.17914.382pG:2,S") = 0
unlink("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272261979.17914.CnuoW:2,S") = 0
unlink("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272261979.17914.rxmbp:2,S") = 0
unlink("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272261980.17914.avpv7:2,S") = 0
unlink("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272261980.17914.NXR67:2,S") = 0
unlink("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272261981.17914.7BMzz:2,S") = 0
unlink("/home/kibab/.kde4/share/apps/kmail/dimap/.1948823749.directory/qt/cur/1272261981.17914.TJhkk:2,S") = 0

I'll attach the full log, which I probably should have let run longer to help in debugging.

When kmail finally came up I was greeted with 47 dialogs like kmail_permissions_error.png (attached).  The error message read:

The UID cache file for folder 2046725245/[Gmail]/Trash could not be written. There could be a problem with file system permissions.

Once I closed down all the error dialogs, I was once again greeted with the new accounts dialog (kmail_new_accounts.png, attached).

As last time, this resulted in both of my dimap accounts being completely deleted. My account settings were also deleted although my POP-based e-mail was still present.
Comment 2 Kaleb Pederson 2010-08-27 23:33:26 UTC
Created attachment 51037 [details]
one of 47 dialogs displaying a uid cache file error
Comment 3 Kaleb Pederson 2010-08-27 23:34:04 UTC
Created attachment 51038 [details]
New accounts dialog I was greeted with.
Comment 4 Kaleb Pederson 2010-08-27 23:35:01 UTC
Created attachment 51039 [details]
strace log showing dimap files being deleted
Comment 5 Kaleb Pederson 2010-08-27 23:44:15 UTC
Note, I'm currently running KMail version 1.13.5 on KDE 4.4.5 on 64-bit Gentoo.

Although after the fact, the following found no files for which I did not have read-write access:

$ find . ! -perm -600 -print
Comment 6 Laurent Montel 2015-04-12 10:07:09 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.