www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/12/14/02:27:06

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5BE7R4TR1044522
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 5BE7R4TR1044522
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=Ayo1SGiN
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B60124BA2E23
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1765697223;
bh=VyQziGn/lu+q5x1BpYKSJdh0driKaPGDqjevIiEDPR0=;
h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=Ayo1SGiNGujWOLs4nTnsn6kdGH3o5oVQsvg+B3XMUxm/tjC/pv7p92xVy+CNayq2q
1kFIpQDzIbTRhuw72bf/SIbHU55mwqcC0zAeccHqQhr7/bLHoUoRU2qA1IgmAyqxz1
BEejV6csBm2NZcCUKAQRxE0re+TxGIykgzWCogSM=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 486604BA2E05
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 486604BA2E05
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1765697202; cv=none;
b=lo1YPEv+MS2CCBUfQ7ycNcK48S6JQeUBB8Qr+0pQEF69LtWZ6VefJSGnu6SR/IK68tFsVdBckPQfVYAMi4lQ39DUxDqjLcpPc97oaK4UcXuobrA4H96hmsb2Jzahk4SB/p72Of4OTpA/QMr/MipjM3bl+a+5hXFDSmEaSuQW/UU=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1765697202; c=relaxed/simple;
bh=+sl6MMGv/5yoNcsFiFYS+So49sd/EMoSHUkr9fWw9zk=;
h=Date:From:To:Subject:Message-Id:Mime-Version:DKIM-Signature;
b=fDdgx+cO6VLlPO+NACWEr/ToNKH5WrYjZYx3O2PFzKwx2xb6hjlSjzbRNpRxFlXUvzR0MIRXyiTX/t3Y7ISp7tuyrNqwKSs19UpdTdeoNY9Qe31/rbTaf8XYrAp86wr6cRzcasnSnOKrmKbYBqsW0IQXaC2z2crH2yp6EYLAmyk=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 486604BA2E05
Date: Sun, 14 Dec 2025 16:26:37 +0900
To: cygwin AT cygwin DOT com
Subject: Recent testsuite/winsup.api/pthread/cancel2 failure
Message-Id: <20251214162637.1ee05b084788ba073fe94670@nifty.ne.jp>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

Recently, I have concerned that testsuite winsup.api/pthread/cancel2 fails
consistently.

https://github.com/cygwin/cygwin/actions/runs/19926408142/job/57127200619

I'm not sure why this happens, but it also falis in my local environment.
I looked into this issue a bit, and found that access violation happnes
in CloseHandle() in _cygtls::remove().

And I am also not sure why at all, cancel2 works if CloseHandle()'s are
replaced with NtClose() as follows.

diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index 13d133f47..249c8cb18 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -118,7 +118,7 @@ _cygtls::remove (DWORD wait)
     {
       HANDLE h = signal_arrived;
       signal_arrived = NULL;
-      CloseHandle (h);
+      NtClose (h);
     }
 
   if (locals.drivemappings)
@@ -148,7 +148,7 @@ _cygtls::remove (DWORD wait)
   if (mutex)
     {
       ReleaseMutex (mutex);
-      CloseHandle (mutex);
+      NtClose (mutex);
     }
 }
 

Any idea?

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019