[issue21742] WatchedFileHandler can fail due to race conditions or file open issues.

2014-06-12 Thread Vishvananda Ishaya

New submission from Vishvananda Ishaya:

If there is a failure during the re-opening of the file WatchedFileHandler can 
lose the ability to log and starts throwing IOErrors.

--
messages: 220403
nosy: vishvananda
priority: normal
severity: normal
status: open
title: WatchedFileHandler can fail due to race conditions or file open issues.
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 
<http://bugs.python.org/issue21742>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21742] WatchedFileHandler can fail due to race conditions or file open issues.

2014-06-12 Thread Vishvananda Ishaya

Vishvananda Ishaya added the comment:

The attached file illustrates the error when attempting to call handler.emit() 
from multiple threads at the same time.

--
Added file: http://bugs.python.org/file35604/log.py

___
Python tracker 
<http://bugs.python.org/issue21742>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21742] WatchedFileHandler can fail due to race conditions or file open issues.

2014-06-12 Thread Vishvananda Ishaya

Vishvananda Ishaya added the comment:

The attached file illustrates the error when attempting to call handler.emit() 
when the file cannot be opened. Even if this situation is later remedied all 
future emit() calls will fail since stream.flush() is called on a fd that has 
already been closed.

--
Added file: http://bugs.python.org/file35605/log2.py

___
Python tracker 
<http://bugs.python.org/issue21742>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21742] WatchedFileHandler can fail due to race conditions or file open issues.

2014-06-12 Thread Vishvananda Ishaya

Vishvananda Ishaya added the comment:

Example diff against python 2.7.6 that fixes the issues

--
keywords: +patch
Added file: http://bugs.python.org/file35606/log.diff

___
Python tracker 
<http://bugs.python.org/issue21742>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com