From: jojelino <jojelino@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Segfault with detached threads and OpenSSL
Date: Mon, 20 May 2024 17:42:42 +0900 [thread overview]
Message-ID: <2d41c07b-b5e2-4fa9-b583-22df6e27cc33@gmail.com> (raw)
In-Reply-To: <ZkpvJpruE486MnRp@hop.home>
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 ?? ()
prev parent reply other threads:[~2024-05-20 8:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-19 21:29 Rodrigo Arias
2024-05-20 8:42 ` jojelino [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2d41c07b-b5e2-4fa9-b583-22df6e27cc33@gmail.com \
--to=jojelino@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).