[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#416366: kmail: overwrites changes to contacts at exit



Sune Vuorela wrote:
> I think libkabc (which handles the addressbook directly)  uses either fam
> or gamin to watch for changed files.  When either kaddressbook or kmail
> changes something, it uses libkabc and I think libkabc calls back to the
> other program to tell that it should reread the file.

Sounds fine. What I don't understand is why KMail would, in any circumstances, 
cause the address book to be written back, since I didn't modify any contacts 
with KMail.

> Do you use libfam or libgamin on yoru system?

Yes, gamin.

> Have you configured it to work across nfs?

I haven't found anything that indicates that it has to be configured for nfs. 
(If so, then that should really be documented.) The example config file has a 
line that sets it to polling mode for NFS, but it doesn't say if that is 
necessary.

Apparently KMail doesn't detect changes made in KAddressbook to the contacts 
on NFS. Enabling polling mode didn't help, but with local filesystems KMail 
picks up the changes immediately. So there seems to be a problem with gamin.

I just had an opportunity to catch KMail writing my address book red-handed, 
see the attached screenshot. This happened because I was apparently hit by 
#406984 simultaneously, so KMail displayed a "disk full" dialog and hung, 
leaving the file copying dialog frozen.

Moreover I got the following messages from KMail on the console when 
restarting it after the crash:

Weaver dtor: destroying inventory.
WeaverThreadLogger: thread (ID: 1) destroyed.
WeaverThreadLogger: thread (ID: 2) destroyed.
WeaverThreadLogger: thread (ID: 3) destroyed.
WeaverThreadLogger: thread (ID: 4) destroyed.
Weaver dtor: done
kmail: ERROR: Adressboken '/home/marcus/.kde/share/apps/kabc/std.vcf' är låst 
av programmet ''.
Om du tycker att det är felaktigt, ta bara bort låsfilen 
från '/home/marcus/.kde/share/apps/kabc/lock/*.lock'
kmail: ERROR: Kan inte spara till resursen "Lokal adressbok" eftersom den är 
låst.

(Translation for those who need it: The Address book '/home/marcus.../' is 
locked by the progra. If you think this is in error, remove the lock file 
from '...'.
kmail: ERROR: Cannot save the resource "Local address book" because it is 
locked.)

This proves that KMail is trying to _write_ the local address book as well. 
Why would it do that? But apparently file locking works here. This seems to 
point to a locking problem with NFS perhaps.

Marcus

Attachment: kmail-eats-contacts.png
Description: PNG image

Attachment: pgp79mOOf8S_a.pgp
Description: PGP signature


Reply to: