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: SSL bug in socketmodule.c using threads
Type: Stage:
Components: Extension Modules Versions: Python 2.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, nnorwitz, zaril
Priority: normal Keywords:

Created on 2003-07-21 03:46 by zaril, last changed 2022-04-10 16:10 by admin. This issue is now closed.

Messages (3)
msg17165 - (view) Author: Liraz Siri (zaril) Date: 2003-07-21 03:46
I recently came across a bug in the SSL code in 
Modules/socketmodule.c. Most of the SSL functions 
support python threads, but the the constructor  
function for the SSL session does not. 

This can hang a multi threaded application if the  
SSL_connect stalls / hangs /  takes a really long time 
etc. 

In my application, for example, this prevented me from 
cancelling an SSL  connection to a badly routed 
destination or a very slow destination, since the GUI 
hanged.

Once I enabled threading support in that function in 
socketmodule.c, the problem was easily fixed.

Is there any reason for the SSL constructor in 
socketmodule.c to be thread unsafe?
msg17166 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-07-21 13:41
Logged In: YES 
user_id=33168

Please attach the patch.
msg17167 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2004-06-05 18:55
Logged In: YES 
user_id=11375

Fixed in the 2.4 HEAD.  Closing.
History
Date User Action Args
2022-04-10 16:10:04adminsetgithub: 38886
2003-07-21 03:46:44zarilcreate