Version: (using KDE KDE 3.5.5) Installed from: Debian testing/unstable Packages From Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=399016 I have noticed this behavior for some time, since back in KDE 3.4.x at least, but this is the last straw, so I'm filing a bug. A week or so ago I entered a few new contacts into my KDE address book. When I went to look up the contacts' e-mail addresses just now, my search in KABC found nothing. I opened a shell and found this: $ cd .kde/share/apps/kabc/ $ ll total 504K drwx------ 2 first first 4.0K 2006-11-16 05:15 lock drwx------ 2 first first 4.0K 2005-12-19 18:58 logos drwx------ 2 first first 4.0K 2005-12-19 18:58 photos drwx------ 2 first first 4.0K 2005-12-19 18:58 sounds - -rwx------ 1 first first 41K 2006-11-16 05:15 std.vcf - -rwx------ 1 first first 41K 2006-11-16 05:15 std.vcf__0 - -rw-r--r-- 1 first first 41K 2006-11-16 05:15 std.vcf__1 - -rw-r--r-- 1 first first 41K 2006-11-16 05:15 std.vcf__2 - -rwx------ 1 first first 0 2006-11-09 03:03 std.vcf2WPY5b.new - -rw-r--r-- 1 first first 41K 2006-11-16 05:15 std.vcf__3 - -rw-r--r-- 1 first first 41K 2006-11-16 05:15 std.vcf__4 - -rw-r--r-- 1 first first 41K 2006-11-16 05:15 std.vcf__5 - -rw-r--r-- 1 first first 42K 2006-11-16 05:15 std.vcf__6 - -rw-r--r-- 1 first first 42K 2006-11-16 05:15 std.vcf__7 - -rw-r--r-- 1 first first 42K 2006-11-16 05:15 std.vcf__8 - -rw-r--r-- 1 first first 41K 2006-11-16 05:15 std.vcf__9 - -rwx------ 1 first first 0 2006-11-13 02:55 std.vcfVRcdrb.new $ ll lock total 8.0K - -rw-r--r-- 1 first first 11 2006-11-09 03:03 _home_first_.kde_share_apps_kabc_std.vcfMuo9TRh0 - -rw-r--r-- 1 first first 10 2006-11-13 02:55 _home_first_.kde_share_apps_kabc_std.vcfSj652hp5 $ rgrep lash . ../std.vcf__6:EMAIL:lashs@example.com ../std.vcf__7:EMAIL:lashs@example.com ../std.vcf__8:EMAIL:lashs@example.com As you can see, there are many duplicates of the std.vcf file, and two lock files. The dates on the lock files don't match the date on the current std.vcf file. There are two old std.vcf...new files that are empty. There are three std.vcf__# files that are larger than the rest, and inside those three files are the contacts that I entered that are now missing in std.vcf. Thankfully, I can copy one of those three files over the std.vcf file and regain those contacts. But what in the world is going on here? I'm rating this as grave because I consider it a data-loss bug. Most users won't have any idea how to dig for the vcf files, and even if they do, there's no guarantee that the missing data will be there. And even worse, if this went unnoticed for a while, you could end up with a branching scenario where some files had some contacts, and other files had other contacts, and somehow you'd have to merge them back together into a single file to get them all back. Worst of all, this makes the KDE address book system (which is used by Kontact/KMail/etc) completely unreliable and untrustworthy. I hope Etch isn't released with this bug. Please let me know how I can help debug this.
We are trying to reproduce this. Since you have the contacts in at least one backup file, they seem to have been saved correctly, but then "pushed back" by some other save operation with older contents. Maybe it's a certain combination of applications which triggers this problem. Do you use KDE PIM applications stand-alone or combined in Kontact? Do you use Kopete and store links from addressbook contacts to Kopete contacts?
I use KMail separately (usually left running in the background all the time), and I usually have korgac running in the background for alarms. I do use Kopete, and I think a couple of contacts in it are linked to the KDE address book. Thank you for working on this. Please let me know what else I can do to help.
I am using a similar setup (no Kopete though) but haven't experienced such a behavior yet. I tried creating new address book entries almost simlutaniously in KAddressBook and Kopete and almost every time the one from Kopete is "lost", but the didn't manage to loose one from KAddressBook. The moment I closed the addressee editor, the addressbook seems to be written and Kopete reloads it. However you report loosing "real" entries, i.e. ones from KAddressBook, right? Is your .kde/ directory on your local harddisk or on a networked share (NFS, Samba, or similar)?
Kevin, Yes, I lose entries from KAddressBook. No, I have only local filesystems. Thanks for your help.
If anyone can reproduce this with a new (recent) kaddressbook profile, please report when that profile was created.
*** This bug has been confirmed by popular vote. ***
I've saw the same behavior. I could provide a strace output if it helps.
I observe the creation of new std.vcf__XXX files whenever I access the addressbook in kontact. Procedure: - I start kontact. - I switch between the kmail and kaddressbook modules (without changing anything) - I quit kontact. - and I get two additional std.vcf__XXX files ... This does not happen when I start kaddressbook alone. - L.
I see the same behavior wit kmail only. Every time I use kmail, it rewrites my addressbook (std.cvf).
>Maybe it's a certain combination of applications which triggers this problem. I guess it's kmail. When shutting down KDE+machine while mail composer window opened, i had three complete losses of all contact records while last 6 month - on a *very* slow CF-27 toughbook machine (though i reboot not more than 2-3 times a month!). Probably the Kabc stuff gets killed by shutdown scripts before it has finished writing out the files and cleaning locks. See Bug 147326. I don't see why kmail is writing out a new standard.vcf at all in this situation - and i think it mustn't do this on system shutdown. It's a bad idea to modify any valuable data in a hurry while shutdown is pending.
Kmail did it again: had an open maileditor win. "Quit" from Kontact. No shutdown for unknown reason (heavy cpu usage and swaping from other apps while that). Sent the open mail. POP3 failed, SMTP failed - protocol timeout (still heavy load from other prog, so timeout may be ok). Sent pending mail, when cpu had "spare time" again. Quit. Restart. ALL contacts GONE. This time NO reboot or session management interfered with KABC! check files creation date of lock! $ ls -l insgesamt 88 -rw-r--r-- 1 jr users 280 2006-09-16 16:59 bookmarks.xml -rw-r--r-- 1 jr users 63 2006-09-16 16:59 bookmarks.xml.bak -rw-r--r-- 1 jr users 0 2006-09-16 16:59 bookmarks.xml.tbcache -rw-r--r-- 1 jr users 202 2007-09-12 01:46 distlists drwxr-xr-x 2 jr users 4096 2007-09-16 20:25 lock drwxr-xr-x 2 jr users 4096 2007-06-28 15:12 lock-fault drwxr-xr-x 2 jr users 4096 2006-09-16 16:57 logos drwxr-xr-x 2 jr users 4096 2006-09-16 16:57 photos drwxr-xr-x 2 jr users 4096 2006-09-16 16:57 sounds -rw-r--r-- 1 jr users 3309 2006-09-16 16:59 std.log drwxr-xr-x 2 jr users 4096 2007-03-03 16:32 stdvcf -rw-r--r-- 1 jr users 0 2007-09-16 20:25 std.vcf -rw-r--r-- 1 jr users 2474 2007-09-10 13:16 std.vcf_1 -rw-r--r-- 1 jr users 1959 2007-07-23 10:39 std.vcf_1back -rw-r--r-- 1 jr users 3131 2007-09-11 17:38 std.vcf_2 -rw-r--r-- 1 jr users 3265 2007-09-12 03:16 std.vcf_3 -rw-r--r-- 1 jr users 2474 2007-09-06 12:55 std.vcf_4 -rw-r--r-- 1 jr users 2474 2007-09-07 23:19 std.vcf_5 -rw-r--r-- 1 jr users 2474 2007-08-25 18:26 std.vcf_6 -rw-r--r-- 1 jr users 3185 2007-09-16 20:25 std.vcf_7 -rw-r--r-- 1 jr users 0 2007-01-09 20:57 std.vcfRMFtUb.new -rw-r--r-- 1 jr users 0 2006-09-16 16:59 std.vcftHdxUb.new -rw-r--r-- 1 jr users 12 2007-05-06 15:36 text_binaer -rw-r--r-- 1 jr users 375 2007-03-03 16:32 text_binaer_6 -rw-r--r-- 1 jr users 12 2007-05-06 15:36 text_binaer_7 -rw-r--r-- 1 jr users 12 2007-05-06 15:01 text_binaerTbqTJb.new this is *really* annoying! An Addressbook that's losing records is simply useless. There's absolutely no strange setup of my machine other than slow + short on RAM (but plenty of swap free).
I have just experienced a very similar problem on Kubuntu Intrepid 8.10 (32-bit), using KDE 4.2.00 and KMail 1.11.0. My contacts suddenly completely disappeared from my KAddressbook in KMail... This was a fresh install only a few days ago and the only changes I have made have been to configure the options of some of the basic KDE apps - so its very close to a "default" install. I had added 7 contacts to KAddressbook, and these worked fine for several days. Then I decided to configure and use Kopete for the first time... and after closing down Kopete and opening up KMail again I realised that all my KAddressbook contacts had gone! I tried adding 2 more contacts - successfully, and I couldn't make them disappear. Strange... After reading through the comments on this thread, I went searching... and found my original 7 contacts stored as 7 business cards (with file-names like "4A4dS4dQNz") at the following location: /home/ian/.kde/share/apps/kabc/stdvcf However - and this bit was really strange - the 2 extra contacts I had just added were stored at a slightly different location: /home/ian/.kde/share/apps/kabc/ - i.e., one level higher up the directory tree. And another strange thing - these 2 business cards both contained the details of BOTH contacts. The files were called "std.vcf" and "std.vcf_2" So, perhaps Kopete is moving contacts to a location where KAddressbook/KMail can't find them (even though I didn't create any contacts in Kopete.) I too think this is a serious bug and should be classed as "data loss" - an address book that "forgets" addresses is not very useful! I am lucky that I knew where to go looking for my missing data, but I think many other users would lose everything and this would make my favourite mail client look very bad ;-)
EDIT: RE the above, I have just realised that if I create a new email message in KMail, click in the "To" field and then on the "Select" button to open the "Select Recipient" box , all 7 of my "missing" contacts are there in the list. This list also shows the 2 extra new contacts I created today, as well as (strangely) another contact that I previously deleted a couple of days ago. By default, the "Address book" is set to "All" in the drop-down list. If I select "resource", the list only shows the 2 most recent contacts I added. If I then return to the main "Address Book Browser - KAddressBook" window in KMail, I realise that in the "Address Books" field at the bottom left, the only Address Book showing is "resource". There was another address book here previously - the "Akonadi Address Book" - but it has disappeared (and I didn't delete it!)
EDIT 2 - OK, I have now successfully added in a new "Akonadi Address Book" in the "Address Books" field in the main "Address Book Browser - KAddressBook" window - and all my contacts have reappeared. However, the question remains - why was my Akonadi address book randomly deleted from the "Address Books" field in the "Address Book Browser - KAddressBook"?
The development of the old KAddressBook will be discontinued for KDE 4.4. Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product.