Crash in LocalStatus.py when removing the tmp file

Dirk Wallenstein dirk.impersonator at gmail.com
Sun Jul 22 12:41:04 BST 2012


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

https://github.com/nicolas33/offlineimap/blob/master/offlineimap/folder/LocalStatus.py#L34

I get this after a few messages:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/offlineimap/threadutil.py",
line 156, in run
    Thread.run(self)
  File "/usr/lib64/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/site-packages/offlineimap/folder/Base.py",
line 324, in copymessageto
    statusfolder.savemessage(uid, None, flags, rtime)
  File "/usr/lib/python2.7/site-packages/offlineimap/folder/LocalStatus.py",
line 128, in savemessage
    self.save()
  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.




More information about the OfflineIMAP-project mailing list