[kmymoney] [Bug 503551] kmymoney prints "File ... is already opened by another process"
Thomas Baumgart
bugzilla_noreply at kde.org
Thu May 1 07:23:32 BST 2025
https://bugs.kde.org/show_bug.cgi?id=503551
--- Comment #10 from Thomas Baumgart <tbaumgart at kde.org> ---
Looking at the Qt code here is what happens:
KMyMoney calls QLockFile::tryLock() on the .lck file which fails in
QLockFilePrivate::tryLock_sys() with QLockFile::LockFailedError because the
.lck file already exists. tryLock() then calls
QLockFilePrivate::isApparentlyStale() which uses getLockInfo_helper() to read
the information about the file (opening as read-only). isApparentlyStale()
rightfully returns true, because this machine created the lock in the first run
and then quit prematurely. The next thing in tryLock() is to create another
QLockFile object on filename.lck.rmlock which should prevent that two processes
remove the file at the same time. For that matter it calls tryLock() on it but
setting the lock on this .rmlock file is where the permission error is
encountered.
So the question is why NFS allowed to set the lock on the first .lck file but
not on the second .lck.rmlock.
Not much we can do about in KMyMoney :(
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the KMyMoney-devel
mailing list