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.

classification
Title: thread Module Breaks PyGILState_Ensure()
Type: Stage:
Components: Extension Modules Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mhammond Nosy List: anthonybaxter, jbelmonte, mhammond, philthompson10, zilche
Priority: high Keywords: patch

Created on 2004-08-17 12:08 by philthompson10, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
threadmodule.c.patch philthompson10, 2004-08-17 12:08 Patch to threadmodule.c to fix the bug
test_capi.py.patch philthompson10, 2004-08-18 10:23 Patch to test_capi.py to demonstrate the bug
Messages (6)
msg46721 - (view) Author: Phil Thompson (philthompson10) Date: 2004-08-17 12:08
The thread module creates thread states that 
PyGILState_Ensure() doesn't know about. This means that the 
latter can try to acquire the GIL when it already has it - resulting 
in a deadlock. 
msg46722 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2004-08-24 13:14
Logged In: YES 
user_id=29957

Boosting to pri 7 for pre-2.4 inclusion.
msg46723 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2004-08-24 22:24
Logged In: YES 
user_id=14198

Fixed - thanks!

Checking in Modules/threadmodule.c;
new revision: 2.59; previous revision: 2.58
Checking in Lib/test/test_capi.py;
new revision: 1.7; previous revision: 1.6
msg46724 - (view) Author: Johan Dahlin (zilche) Date: 2004-09-01 15:10
Logged In: YES 
user_id=132216

Can this be backported release23-maint as well? 
PyGTK suffers quite badly from this. 
msg46725 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2004-09-01 22:32
Logged In: YES 
user_id=14198

Checked into 2.3 maint branch:
Checking in Lib/test/test_capi.py;
new revision: 1.6.10.1; previous revision: 1.6
Checking in Modules/threadmodule.c;
new revision: 2.56.8.1; previous revision: 2.56
msg46726 - (view) Author: John Belmonte (jbelmonte) * Date: 2005-04-16 20:43
Logged In: YES 
user_id=282299

This patch seems to have caused [ 1163563 ] Sub  
threads execute in restricted mode  
(http://sourceforge.net/tracker/?func=detail&aid=1163563&group_id=5470&atid=105470).    
  
I don't have an explanation-- I only know that when this 
patch is applied, the symptom appears.  
  
History
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40772
2004-08-17 12:08:48philthompson10create