[Patches] [ python-Patches-954922 ] Fix for 754449: hiding exc in
threading during interp shutdn
SourceForge.net
noreply at sourceforge.net
Mon May 17 19:08:41 EDT 2004
Patches item #954922, was opened at 2004-05-16 11:43
Message generated for change (Settings changed) made by bcannon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=954922&group_id=5470
Category: Library (Lib)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Brett Cannon (bcannon)
Assigned to: Nobody/Anonymous (nobody)
>Summary: Fix for 754449: hiding exc in threading during interp shutdn
Initial Comment:
Decided to start a fresh tracker item for this patch since I already
attempted to close bug 754449 once before and I want to make
sure the two fixes stay separate.
Someone emailed me a program whose testing suite could reliably
reproduce the problem as reported in the bug report (for a quck
refresher, basically if someone leaves a threading.Thread instance
running while the interpreter is being shutdown and an exception is
raised in the thread then that exception will cause *another*
exception in the subsequent attempt to report the exception from
the thread because all globals have been set to None at that point).
The previous fix that I checked in turned out not to be thorough
enough (still needed, though). I am currently waiting for the
person who emailed me the triggering code to let me know if I can
publish how to cause the error.
Attached is a patch to remove all instances of accessing globals
(just as if I was writing a __del__ method for threading.Thread) by
storing copies of sys.stderr, sys.exc_info, and sys.tracebacklimit.
All of this is so that a decent approximation of a traceback print-
out can occur without having to call the 'traceback' module since its
functions depend a lot on each other.
I mainly need someone else who is more familiar with dealing with
tracebacks to make sure that I have not done something stupid and
to make sure this is the best way to handle things.
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2004-05-16 21:37
Message:
Logged In: YES
user_id=357491
Just posted how to reproduce the bug using the in-dev version of mnet as
a post to the bug tracker item.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=954922&group_id=5470
More information about the Patches
mailing list