Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue6343] TimedRotatingFileHandler permission denied rename failure on Windows

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Jun 25, 2009, 9:59 AM

Post #1 of 6 (475 views)
Permalink
[issue6343] TimedRotatingFileHandler permission denied rename failure on Windows

New submission from Dale Nagata <nagata [at] telus>:

Traceback (most recent call last):
File "C:\python24\lib\logging\handlers.py", line 74, in emit
self.doRollover()
File "C:\python24\lib\logging\handlers.py", line 271, in doRollover
os.rename(self.baseFilename, dfn)
OSError: [Errno 13] Permission denied

originally hit on W2K3 but could not see evidence as it was running as a
service with stderr not going anywhere, but deeply suspicious since it
failed right at midnight each time.

whittled down to bare essentials, repro'd on XP running in console
window, test case will fail in 2 min when rollover is attempted

logging set up as follows:

def initlog():
#h = logging.handlers.TimedRotatingFileHandler( LOGFILEPATH,
'MIDNIGHT', 1, 7 )
h = logging.handlers.TimedRotatingFileHandler( LOGFILEPATH, 'M', 2, 7 )
h.setLevel( logging.DEBUG )
f = logging.Formatter( '%(asctime)s %(levelname)s %(message)s',
'%Y-%m-%d %H:%M:%S' )
h.setFormatter( f )
logging.root.addHandler( h )
logging.root.setLevel( logging.DEBUG )

searched issue tracker for TimedRotatingFileHandler, no hits

----------
components: Library (Lib)
files: testlog.py
messages: 89711
nosy: dnagata
severity: normal
status: open
title: TimedRotatingFileHandler permission denied rename failure on Windows
type: crash
versions: Python 2.4
Added file: http://bugs.python.org/file14365/testlog.py

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue6343>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 25, 2009, 10:09 AM

Post #2 of 6 (443 views)
Permalink
[issue6343] TimedRotatingFileHandler permission denied rename failure on Windows [In reply to]

Changes by Dale Nagata <nagata [at] telus>:


Removed file: http://bugs.python.org/file14365/testlog.py

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue6343>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jun 25, 2009, 10:10 AM

Post #3 of 6 (446 views)
Permalink
[issue6343] TimedRotatingFileHandler permission denied rename failure on Windows [In reply to]

Changes by Dale Nagata <nagata [at] telus>:


Added file: http://bugs.python.org/file14366/testlog.py

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue6343>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 5, 2009, 4:43 AM

Post #4 of 6 (396 views)
Permalink
[issue6343] TimedRotatingFileHandler permission denied rename failure on Windows [In reply to]

Vinay Sajip <vinay_sajip [at] yahoo> added the comment:

I'm running your test script (WinXP, Python 2.5) and am unable to
reproduce the error, after running the script for a couple of hours.

Is it possible that you have e.g. anti-virus software or backup software
or some other application (e.g. a service) running in the background
which could temporarily be locking the log files? If the failure happens
repeatably on your system, try running filemon (Microsoft sysinternals)
to see system-wide file activity which could be causing the problem.

----------
nosy: +vsajip
resolution: -> works for me
status: open -> pending

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue6343>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 5, 2009, 4:53 AM

Post #5 of 6 (399 views)
Permalink
[issue6343] TimedRotatingFileHandler permission denied rename failure on Windows [In reply to]

Vinay Sajip <vinay_sajip [at] yahoo> added the comment:

See http://img15.imageshack.us/img15/5909/screenshotcpc.png which shows
the script being run.

----------
status: pending -> open

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue6343>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 7, 2009, 12:11 AM

Post #6 of 6 (368 views)
Permalink
[issue6343] TimedRotatingFileHandler permission denied rename failure on Windows [In reply to]

Changes by Vinay Sajip <vinay_sajip [at] yahoo>:


----------
assignee: -> vsajip
status: open -> pending

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue6343>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.