DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 44K8hljo1201787 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=xSuHAbSN X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 953313858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1716194625; bh=TUtn4DMzelJfOcWhOSv+CjN2hx0kMWVM2ypIVQTsxHU=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=xSuHAbSNG8E76ct5Mzrk7Yxrr800/4rX++fXnyCnnFrKf8f+RJrF5K8EEIXUCNXyl EF4kq4c4d4HPU2B2EuKfad3+puT8J7FeAs1u34xvPxJ8zM05NZ9A+ow7Qf5kYfPf+b SMWQUiMt1StswJ4JUmjEhVfF77Tsgp0MELLtBO9g= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 858263858D1E ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 858263858D1E ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716194598; cv=none; b=GeketZCJ1rO1GsbnKsssbDETwrS9xMDUyUpPufPi5M5dkqjeBrAlb/HqbRFkqCZMm302MntXTQ6JxsyhEP2wDjA0TKGqS0PGcL1NhmRU86QZrZ+10A3C2AqISJedtrYHCigDaJOoFVjxU6J5nzcTFWWRPBNQxPC57+DLgfdLzDc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716194598; c=relaxed/simple; bh=++QTkKjG0zSCWR8nFFlWWd+zHiWX8avor4q5cQ8JDqk=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=pt2P1cqbb4aqrygles76VaNQBAa6x5GC8/4PQfBTMY5aIDE1obIlWbPEsgddk+V4pgB68NOWaAmqruuaxQkKxATIUWpcJSJ2BPoGf8UTUt69sURKYQWrog0s99OLdGoR72/oqdBwTEGszxFW3ZYTzTzO9AdSm7osH6OS3Pid4mE= ARC-Authentication-Results: i=1; server2.sourceware.org X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716194595; x=1716799395; h=content-transfer-encoding:in-reply-to:from:content-language :references:newsgroups:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VAu6HorYEV8fmZSJ91AnMvsFTzmLn64UMj8MfyyMN3A=; b=cNjccOgb1v1Qv6hO2VG0Fy2cb3xWYKatynILiLRaOQj1hG6A0yXYf8iqatFH1KA7aP h7GP3s09J4302l6K5tu6J+QPpMVC+BpNseHMzG2+9S9irGcr3oCJQb0fTy1h3KgJdDJp YIhEHoZKPy92RhQqFO5++zru5EY9U7Z+4fPL8edXS69WkzdgjkWZiBnE+9z1CgWjTQVS 9KWcngpTN5yKTajzLB30SQslhxVelogSMfJoUP8wJQEnm/2Vhhrq1jiTVsIdmfNhHLdY EGx1WUCe1l3OMuEp/jx5d7mlBzuktZPeLSEjrCYj51lUPiS6L9+ex3qX1rbL+BxzMlAQ /Krg== X-Gm-Message-State: AOJu0Yz/3DTmXYZuPGg4sHbU8equVDwZMH+sX246jks/fXhpZFXNUGjl lKmrY3JPAHX/4fQ9L0DKXIWV+/fnUC5OHLS0q140zYRZMl3pnsmJCqsCDkIV X-Google-Smtp-Source: AGHT+IEUmFL2tpudBkahae0r8dTlZomb7AJZrCHsfiNeUSdWfFo6fcXNrO/lMFV45nOJq6lHdcyI3Q== X-Received: by 2002:a17:902:e743:b0:1f2:ffcc:8a0b with SMTP id d9443c01a7336-1f2ffcc8cccmr23858135ad.24.1716194594633; Mon, 20 May 2024 01:43:14 -0700 (PDT) Message-ID: <2d41c07b-b5e2-4fa9-b583-22df6e27cc33@gmail.com> Date: Mon, 20 May 2024 17:42:42 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Segfault with detached threads and OpenSSL To: cygwin AT cygwin DOT com Newsgroups: gmane.os.cygwin References: Content-Language: en-US In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: jojelino via Cygwin Reply-To: jojelino Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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 AT entry=0x0) at crypto/initthread.c:178 178 if (!CRYPTO_THREAD_write_lock(gtr->lock)) (gdb) bt #0 init_thread_remove_handlers (handsin=handsin AT entry=0x0) at crypto/initthread.c:178 #1 0x00000005e03029c3 in OPENSSL_thread_stop () at crypto/initthread.c:235 #2 0x00000005e03009c3 in DllMain (hinstDLL=, fdwReason=, lpvReserved=) 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 AT entry=0x0) at ../../.././winsup/cygwin/sigproc.cc:544 #7 0x00007ff8e81d470e in pthread::exit (this=0xa00028b90, value_ptr=) 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=) at ../../.././winsup/cygwin/create_posix_thread.cc:79 #10 pthread_wrapper (arg=) 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 ?? () -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple