Description

Working with my local MoinMoin works fine for some time. After 15-20 page visits I see the following entry in error.log:

SError: [Errno 13] Permission denied: 'D:\\data\\DEV\\workspace\\websody\\home\\Moin\\emnosWiki\\data\\cache\\i18n\\__lock__\\write_lock'

I work with:

I found out, that this is caused by ExclusiveLock._removeLockDir. The error leads to an exception raised in the browser (data not defined). After exactly 1 minute, MoinMoin works again. -- MichaelRau 2006-04-30 16:45:30

Here is some information

error.log

[Sun Apr 30 18:55:34 2006] Can't acquire write lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:55:47 2006] Can't acquire read lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:55:48 2006] Can't acquire write lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:55:52 2006] Can't acquire read lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:55:53 2006] Can't acquire write lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:55:57 2006] Can't acquire read lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:55:58 2006] Can't acquire write lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:56:01 2006] Can't acquire read lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:56:02 2006] Can't acquire write lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:56:02 2006] Can't acquire read lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:56:03 2006] Can't acquire write lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:56:07 2006] Can't acquire read lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:56:08 2006] Can't acquire write lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__
[Sun Apr 30 18:56:08 2006] OSError: [Errno 13] Permission denied: 'D:\\data\\DEV\\workspace\\websody\\home\\Moin\\emnosWiki\\data\\cache\\user\\__lock__\\write_lock'
[Sun Apr 30 18:58:49 2006] Can't acquire write lock in D:\data\DEV\workspace\websody\home\Moin\emnosWiki\data\cache\wikidicts\__lock__

event-log

1146416127783000        VIEWPAGE        pagename=MyStartingPage&HTTP_USER_AGENT=Mozilla/5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.2%29+Gecko/20060308+Firefox/1.5.0.2&REMOTE_ADDR=127.0.0.1
1146416132930000        VIEWPAGE        pagename=MichaelRau&HTTP_USER_AGENT=Mozilla/5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.2%29+Gecko/20060308+Firefox/1.5.0.2&HTTP_REFERER=http%3A//127.0.0.1/emnosWiki&REMOTE_ADDR=127.0.0.1
1146416151247000        VIEWPAGE        pagename=MichaelRau&HTTP_USER_AGENT=Mozilla/5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.2%29+Gecko/20060308+Firefox/1.5.0.2&HTTP_REFERER=http%3A//127.0.0.1/emnosWiki/MichaelRau%3Faction%3Dfullsearch%26value%3Dlinkto%253A%2522MichaelRau%2522%26context%3D180&REMOTE_ADDR=127.0.0.1
1146416156344000        VIEWPAGE        pagename=FrontPage&HTTP_USER_AGENT=Mozilla/5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.2%29+Gecko/20060308+Firefox/1.5.0.2&HTTP_REFERER=http%3A//127.0.0.1/emnosWiki/MichaelRau&REMOTE_ADDR=127.0.0.1
1146416161241000        VIEWPAGE        pagename=HelpContents&HTTP_USER_AGENT=Mozilla/5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.2%29+Gecko/20060308+Firefox/1.5.0.2&HTTP_REFERER=http%3A//127.0.0.1/emnosWiki/FrontPage&REMOTE_ADDR=127.0.0.1
1146416165968000        VIEWPAGE        pagename=WikiSandBox&HTTP_USER_AGENT=Mozilla/5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.2%29+Gecko/20060308+Firefox/1.5.0.2&HTTP_REFERER=http%3A//127.0.0.1/emnosWiki/HelpContents&REMOTE_ADDR=127.0.0.1
1146416326879000        VIEWPAGE        pagename=WikiSandBox&HTTP_USER_AGENT=Mozilla/5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.8.0.2%29+Gecko/20060308+Firefox/1.5.0.2&HTTP_REFERER=http%3A//127.0.0.1/emnosWiki/HelpContents&REMOTE_ADDR=127.0.0.1

edit-log

is empty

error html page

see ERROR.htm

Steps to reproduce

unknown

Workaround

I found that the following change to ExclusiveLock._removeLockDir solves the problem:

   1     def _removeLockDir(self):
   2         """ Remove lockDir ignoring 'No such file or directory' errors """
   3         timer = self.timerClass(1)
   4         timer.start()
   5         while timer.haveTime():
   6             try:
   7                 os.rmdir(self.lockDir)
   8                 removed = True
   9                 break
  10             except OSError, err:
  11                 log( "_removeLockDir delayed\n" )
  12                 timer.sleep()
  13         if not removed:
  14             if err.errno != errno.EEXIST:
  15                 raise

In the error.log, I actually see the log message "_removeLockDir delayed" from time to time. -- MichaelRau 2006-04-30 16:45:30

Discussion

Would be nice to know what that EACCESS error happens at all.

I (StigIversen) have seen something like this for about 1-2 years on Windows XP PC's. I have seen it in Python and plan C programs. I suspect a virus scanner or indexer is preventing the delete of directory for a short time, but I have not been able to confirm this. I occur very often for me, and on multiple PC's. My current solution is like the above (a loop).

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/RemoveLockDirFails (last edited 2008-11-08 13:49:29 by ThomasWaldmann)