Segfault with detached threads and OpenSSL
jojelino
jojelino@gmail.com
Mon May 20 08:42:42 GMT 2024
Deter using detached attribute in cygwin. for details [1].
You might find static-linking as useful workaround for this issue which
requires build openssl from source code.
Thread 7 "a" hit Breakpoint 9, init_thread_remove_handlers (
handsin=handsin@entry=0x0) at crypto/initthread.c:178
178 if (!CRYPTO_THREAD_write_lock(gtr->lock))
(gdb) bt
#0 init_thread_remove_handlers (handsin=handsin@entry=0x0)
at crypto/initthread.c:178
#1 0x00000005e03029c3 in OPENSSL_thread_stop () at crypto/initthread.c:235
#2 0x00000005e03009c3 in DllMain (hinstDLL=<optimized out>,
fdwReason=<optimized out>, lpvReserved=<optimized out>)
at crypto/dllmain.c:38
#3 0x00007ff976c49a1d in ntdll!RtlActivateActivationContextUnsafeFast ()
from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
#4 0x00007ff976c475b6 in ntdll!LdrShutdownThread ()
from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
#5 0x00007ff976c8468e in ntdll!RtlExitUserThread ()
from /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll
#6 0x00007ff8e81ec987 in exit_thread (res=res@entry=0x0)
at ../../.././winsup/cygwin/sigproc.cc:544
#7 0x00007ff8e81d470e in pthread::exit (this=0xa00028b90,
value_ptr=<optimized out>) at ../../.././winsup/cygwin/thread.cc:584
#8 0x00007ff8e81d4549 in pthread::thread_init_wrapper (arg=0xa00028b90)
at ../../.././winsup/cygwin/thread.cc:2016
#9 0x00007ff8e8174681 in pthread_wrapper (arg=<optimized out>)
at ../../.././winsup/cygwin/create_posix_thread.cc:79
#10 pthread_wrapper (arg=<optimized out>)
at ../../.././winsup/cygwin/create_posix_thread.cc:39
[1]
(gdb) li ../../.././winsup/cygwin/thread.cc:558
553 pthread_key::run_all_destructors ();
554
555 mutex.lock ();
556 // cleanup if thread is in detached state and not joined
557 if (equal (joiner, thread))
558 delete this;
559 else
560 {
561 valid = false;
562 return_ptr = value_ptr;
On 5/20/2024 6:29 AM, Rodrigo Arias via Cygwin wrote:
> Thread 6 "p" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 7332.0x21dc]
> 0x0000000000000000 in ?? ()
More information about the Cygwin
mailing list