Crash in LocalStatus.py when removing the tmp file

Sebastian Spaeth Sebastian at SSpaeth.de
Fri Aug 31 21:48:13 BST 2012


Dirk Wallenstein <dirk.impersonator at gmail.com> writes:

> I don't think the LocalStatusFolder().savelock lock is properly shared among
> threads, or there can be multiple instances for the same folder.

>   File "/usr/lib/python2.7/site-packages/offlineimap/folder/LocalStatus.py",
> line 100, in save
>     os.rename(self.filename + ".tmp", self.filename)
> OSError: [Errno 2] No such file or directory
>
> I didn't look much into it but tried to use one single lock for all
> and it worked.

Yes, this has been reported a few times now. The only case where the
lock would not work is if there were several instances of the
LocalStatusFolder representing a single folder or pointing to the same
filename, which is something that should not happen at all. 

So using a global lock would certainly paper over some real bug, obviously.

I never see these errors, so I have a hard time reproducing this. Could you
find out if there are several LocalStatusFolder instances created for
the same folder for you?

Some help would be appreciated in this case :)

Sebastian




More information about the OfflineIMAP-project mailing list