[issue9947] Weird locking in logging config system

2010-09-27 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

Fix checked into release31-maint (r85046).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9947
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9947] Weird locking in logging config system

2010-09-25 Thread Armin Ronacher

New submission from Armin Ronacher armin.ronac...@active-4.com:

Another case of improper locking in logging.  The stopListening() method of the 
logging config acquires the logging lock, but it doesn't do it early enough.  
In order for this function to be thread safe it would have to lock before the 
if.

Currently that lock used is useless because it locks assigning to a single 
attribute assignment and a global assignment that is never checked to existence 
besides the stopListening() function.

The attached patch proposes moving the lock before the if to make it 
threadsafe, but in all fairness sake that method is probably never executed 
from more than one thread.

--
assignee: vinay.sajip
files: logging-config-threadsafety.patch
keywords: patch
messages: 117370
nosy: aronacher, vinay.sajip
priority: normal
severity: normal
status: open
title: Weird locking in logging config system
versions: Python 2.7
Added file: http://bugs.python.org/file19007/logging-config-threadsafety.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9947
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9947] Weird locking in logging config system

2010-09-25 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

Fix checked into py3k and release27-maint, r85013.

Thanks!

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9947
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com