Crash in LocalStatus.py when removing the tmp file

Sebastian Spaeth Sebastian at SSpaeth.de
Sat Sep 1 00:25:23 BST 2012


Sebastian Spaeth <Sebastian at SSpaeth.de> writes:

> 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

Had a look at it. We would recreate a new Folder instance every time we
asked for it via getfolder("name"), even if the name is the same. This
could have led to 2 instances of LocalStatus folders pointing to the
same file hanging around simultanously.

I have pushed a change to the next branch to cache and reuse instances
when we ask for them again. Can you try the "next" branch and see if you
still see those errors?

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20120901/7061a427/attachment.sig>


More information about the OfflineIMAP-project mailing list