New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure --with-threads on cygwin => crash on thread related tests #48197
Comments
I'm not sure this is python's bug or cygwin's bug, thread enabled python After some investigation, I found following workaround solves this crash. Index: Modules/_ssl.c /* Init OpenSSL */
SSL_load_error_strings();
-#ifdef WITH_THREAD
+#if defined(WITH_THREAD) && !defined(__CYGWIN__)
/* note that this will start threading if not already started */
if (!_setup_ssl_threads()) {
return; So I applied following patch. (after reverted above workaround) Index: Modules/_ssl.c + printf("-------> %d (%u) %s %d: %ul\n", n, mode & CRYPTO_LOCK, And this is result. -------> 20 (1) mem_dbg.c 161: 6684680l Thread 7282896l tries to lock same object twice. I'm not familiar with # Can callback function for CRYPTO_set_locking_callback() be called like I used OpenSSL0.9.8h installed via cygwin setup. |
releast25-maint is fine probably because CRYPTO_set_locking_callback() |
I could create the C code to reproduce crash. (reproduce.zip) I compiled openssl with "config -dCygwin" and "make". (I needed to fix |
So it is a "Vendor OS problem", python is not involved. |
Sorry, I noticed another bit. If main.exe is linked to libssl.dll.a and I'll try to build http://www.openssl.org/source/openssl-0.9.8h.tar.gz
Yes, possibly. Because other platform is not crashing on buildbot. |
I think I have a beginning of an explanation: And the same (win32) thread will call sem_wait()... and maybe access Linking against the static library does not have this problem. |
Thank you for great explanation! Probably you are right... I'll look |
Maybe I can fix this openssl bug with pthread_cleanup_push, but this is I propose to commit workaround in msg73649 for 2.6 release. |
And after openssl will be fixed, change it to #if defined(WITH_THREAD) && !(defined(__CYGWIN__) &&
OPENSSL_VERSION_NUMBER < ???)
|
That workaround leaves unused function warning. This patch is revised patch. |
I'm not sure that reported issue is openssl bug. |
With cygwin, calling sem_wait() in the DLL_THREAD_DETACH section of a DllMain function If this pattern (in dll.c) is not allowed, it's a problem in the openssl code. We should really move this discussion to cygwin. This is no more a python issue. |
OK, I'll close this entry, and I'll post message to cygwin ml about this |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: