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 ronaldoussoren
Recipients amaury.forgeotdarc, gvanrossum, ronaldoussoren
Date 2007-11-27.05:38:41
SpamBayes Score 0.0023048087
Marked as misclassified No
Message-id <1196141924.44.0.277011101078.issue1402@psf.upfronthosting.co.za>
In-reply-to
Content
This is not a mac-specific issue, the script happens to be mac-specific 
because that's how I found the issue.

Amaury's patch adds a unittest that reproduces the problem in a 
platform-indepenent way using ctypes.

The _PyGILState_Fini function might cause user code to run as well, it 
removes the thread-local variable that contains the PyThreadState for 
threads, and that contains some Python objects that might contain 
arbitrary values (such as the last exception value). I guess that means 
that a variation on Amaury's patch would cause a patched interpreter to 
crash (create on instance of 'C' as an attribute on an exception, e.g. 
raise ValueError(C()) in the second thread). 

BTW. I would be very uncomfortable if my patch were applied without 
review from someone that knows his way around the threading code.  

BTW2. I have a workaround for my initial issue (the crash in 
threads.py): if I add an atexit handler that performs some cleanup in 
PyObjC the problem goes away.
History
Date User Action Args
2007-11-27 05:38:44ronaldoussorensetspambayes_score: 0.00230481 -> 0.0023048087
recipients: + ronaldoussoren, gvanrossum, amaury.forgeotdarc
2007-11-27 05:38:44ronaldoussorensetspambayes_score: 0.00230481 -> 0.00230481
messageid: <1196141924.44.0.277011101078.issue1402@psf.upfronthosting.co.za>
2007-11-27 05:38:44ronaldoussorenlinkissue1402 messages
2007-11-27 05:38:42ronaldoussorencreate