This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kristjan.jonsson
Recipients ezio.melotti, kristjan.jonsson, pitrou
Date 2009-09-13.14:00:20
SpamBayes Score 4.3318293e-11
Marked as misclassified No
Message-id <1252850423.22.0.0637359544374.issue6499@psf.upfronthosting.co.za>
In-reply-to
Content
Ok, this means that the exception is raised after the finally, when the 
thread is exiting.
Now, at this point the process is exiting and therefore we have trouble 
printing the exception.  (this is probably also the cause of the 
exception in the first place, some cleanup that fails because the 
process is exiting).
Now, the traceback printing code is complex and it could fail in a 
multitude of places, but from the stuff that is output, it would appear 
that printing to sys.stderr is failing.  To find out the error, we need 
to goad python into displaying the exception, even though the process is 
exiting.
On a windows machiine, I would put a DebugBreak() call in t_bootstrap() 
in threadmodule_t and try to find out where the error output code is 
failing.  I don't know if you can do just-in-time debugging on your 
machine.  It would be best, of course, to singlestep through the code at 
line 452 in threadmodule.c.  Then we could pinpoint where the output is 
failing and fix python to make it more resilient at process exit.

Now, lines 452-455 don't produce any output.  For starters, try to 
insert "file=0" before line 452 in threadmodule.c, so that 
PyObject_Print is called instead of PyFile_WriteObject() (which I think 
is failing.)
If that produces output, then we can proceed to hardwire "stderr" into 
the traceback stuff.
History
Date User Action Args
2009-09-13 14:00:23kristjan.jonssonsetrecipients: + kristjan.jonsson, pitrou, ezio.melotti
2009-09-13 14:00:23kristjan.jonssonsetmessageid: <1252850423.22.0.0637359544374.issue6499@psf.upfronthosting.co.za>
2009-09-13 14:00:21kristjan.jonssonlinkissue6499 messages
2009-09-13 14:00:20kristjan.jonssoncreate