After crash, it leaves lock files. Must reboot to run again.
cs at zip.com.au
Mon Sep 5 05:22:28 BST 2011
On 31Aug2011 00:04, chris coleman <christocoleman at yahoo.com> wrote:
| Sebastian wrote:
| > On Tue, 30 Aug 2011 11:20:58 -0700 (PDT), chris coleman wrote:
| > > After a crash (steps to reproduce: disconnect the internet during the middle of a run), it leaves lock files on the disk.
| > Current OfflineImap always leaves the lock file existing, it just
| > request an exclusive lock via fcntl when it wants to take it. This way
| > the lock is going away when the process has gone away even if the lock
| > file is still there. [...]
| > If it doesn't work after a "crash" I would be very surprised (I believe
| > you though :-)). The locking code hasn't changed in ages.
| If I understand correctly, the lock is a secondary artifact of the actual exclusive lock object, which exists inside fcntl, and when our offlineimap python process crashes, the lock object is unlocked, and the file is also unlocked.
Sounds like it.
| To me, this implies that, on startup of offlineimap, the initialization procedure should be updated to try to delete the lock file(s),
Why? All that seems to be needed is no lock, not no lock file.
| and if succesful, this proves that there is no currently running offlineimap process, so by deleting the lock file(s) we just effectively did some garbage collection.
| But if deleting those lock file(s) fails, then this proves there is another offlineimap process currently running, so the code should exit with this info message.
I would expect deletion of the lock file to work even if it is locked;
delete only needs write on the directory, not write on the file itself.
Does offlineimap actually not run for you after a crash? Of do you just
not believe it will run? It sounds like more detail of the actual
failing behaviour is needed, since the lock file _should_ not be the cause of
Disclaimer: I am not an offlineimap developer.,
Cameron Simpson <cs at zip.com.au> DoD#743
A monkey has the right to copy what he sees other monkeys doing.
Shouldn't humans have equivalent rights?
- Alien Being <http://slashdot.org/~Alien%20Being>
More information about the OfflineIMAP-project