[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2017-11-11 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> commit review status: open -> closed type: -> behavior ___ Python tracker ___ _

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2017-11-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset e84f6d3817ad3d18fdfbb5223b8078606166cea0 by Gregory P. Smith in branch '2.7': [2.7] bpo-21149: Workaround a GC finalization bug in logging. (#4368) https://github.com/python/cpython/commit/e84f6d3817ad3d18fdfbb5223b8078606166cea0 --

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2017-11-10 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +4321 stage: resolved -> patch review ___ Python tracker ___ ___ Python-bugs-list mail

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2017-11-10 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2017-11-10 Thread Yilei Yang
Yilei Yang added the comment: Here is a minimal example: main.py: from pkg_a import lib_a pkg_a/__init__.py pkg_a/lib_a.py import logging import sys import pkg_a # This is important handler = logging.StreamHandler(sys.stderr) It does not happen in Python 3 though (3.5.3 at

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2017-11-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: We're still seeing this (in 2.7.12, but the code at 2.7 head hasn't changed). In this case the RLock being used within _acquireLock() still exists but is an incomplete object by the time we use it. -- resolution: fixed -> status: closed -> open _

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2014-04-04 Thread Vinay Sajip
Vinay Sajip added the comment: The release notes say about PEP 442 that "As part of this change, module globals are no longer forcibly set to None during interpreter shutdown in most cases". I haven't looked at the PEP in detail, so I'm not sure specifically what "most cases" means - so I play

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2014-04-04 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Please don't take my word for it, but my understanding is that this issue doesn't apply to 3.4+ since module globals are no longer set to None during interpreter shutdown. (So all the checks against None could even be deleted.) -- __

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2014-04-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset b6deab7204e6 by Vinay Sajip in branch '2.7': Issue #21149: Improved thread-safety in logging cleanup during interpreter shutdown. http://hg.python.org/cpython/rev/b6deab7204e6 New changeset b5c91b61991a by Vinay Sajip in branch '3.4': Issue #21149:

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2014-04-03 Thread R. David Murray
R. David Murray added the comment: Yes, I remember previous discussions of the corporate agreement from Google, so I'm sure it exists. -- nosy: +r.david.murray ___ Python tracker __

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2014-04-03 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Are you sure? There should have been many previous contributions by Google, so the relevant copyright agreements _should_ have already been signed. I asked internally and was told that a corporate version of this agreement had been signed a long time ago. -

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2014-04-03 Thread Vinay Sajip
Vinay Sajip added the comment: > please let me know if there are any contributor agreements Yes, there is a contributor agreement form which needs to be completed and signed: https://www.python.org/psf/contrib/contrib-form-python/ -- ___ Python tra

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2014-04-03 Thread Ned Deily
Changes by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue21149] logging._removeHandlerRef is not threadsafe during interpreter shutdown

2014-04-03 Thread Devin Jeanpierre
New submission from Devin Jeanpierre: If another thread is active during interpreter shutdown, it can hold the last reference to a handler; when it drops that reference, the weakref callback -- _removeHandlerRef -- will be executed in this other thread. So while this callback is running, the m