www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/12/16/10:48:38

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5BGFmbaf4093328
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 5BGFmbaf4093328
X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 65B844BA2E2D
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 65B844BA2E2D
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1765900098; cv=none;
b=SjP36UgJ0xGi9XvyufcAJzQ1giog7cvVsyeKHIoh8+PkuYIyWVCPsh4wkqx65AvG7aAVO3AxhpztzgRmSN9jUJ14RfTLp7Lq6ZFMbLsz4NlGdYJyMPGFL48Qu1MwH3nPw94qTcz5fynNV32jhrUWof7y3kcMtlvHe7V/oxFUmdo=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1765900098; c=relaxed/simple;
bh=IKnEZZtzTQQ1GE3PqYNRfx2JuCgvraP1nRF2jq4cRiM=;
h=DKIM-Signature:Subject:To:From:Message-ID:Date:MIME-Version;
b=JCjj2/rcP6Ulj62OboIvoJl5GFNF8OwfLOKXaZUxXSiQrgTCP2YDTQi6euzY0q05yr6opPzugw6WO+UK7kItVlJ+taJpCtOn4NjW9rv5uqZH61L++P1frIY97lLcH3O3LjMda5z80jgIE0Ef28Oi1sPC7dmsMr3a/0PPrwZgM4o=
ARC-Authentication-Results: i=1; server2.sourceware.org
Subject: Re: Recent testsuite/winsup.api/pthread/cancel2 failure
To: cygwin AT cygwin DOT com
References: <20251214162637 DOT 1ee05b084788ba073fe94670 AT nifty DOT ne DOT jp>
<20251214163936 DOT 6841fc62145d8f54cfa31fe7 AT nifty DOT ne DOT jp>
<9d058204-fb3f-43b4-9e32-6adc7af12ff4 AT dronecode DOT org DOT uk>
Organization: WiseMo A/S
Message-ID: <77acb030-e983-6841-b475-f360ad90be48@wisemo.com>
Date: Tue, 16 Dec 2025 16:48:09 +0100
X-Mailer: Epyrus/2.1.3
MIME-Version: 1.0
In-Reply-To: <9d058204-fb3f-43b4-9e32-6adc7af12ff4@dronecode.org.uk>
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-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
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: Jakob Bohm via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Jakob Bohm <jb-cygwin AT wisemo DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 5BGFmbaf4093328


On 16/12/2025 14:11, Jon Turney via Cygwin wrote:
> On 14/12/2025 07:39, Takashi Yano via Cygwin wrote:
>> On Sun, 14 Dec 2025 16:26:37 +0900
>> Takashi Yano via Cygwin <cygwin AT cygwin DOT com> wrote:
>>
>>> Recently, I have concerned that testsuite winsup.api/pthread/cancel2 
>>> fails
>>> consistently.
>>>
>>> https://github.com/cygwin/cygwin/actions/runs/19926408142/job/57127200619 
>>>
>
> Thanks very much for looking into this!
>
> I have the vague idea that this problem started showing up (more?) 
> when the CI VM was upgraded from Windows Server 2022 to Windows Server 
> 2025, but I guess that's maybe just timings...
>
>>>
>>> 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.
>
> I think this is just the difference between the two calls: CloseHandle 
> generates an exception whereas NtClose returns an error code if the 
> handle is invalid.
>
Historically, CloseHandle() would simply return FALSE (0) for bad 
handles.  If this changed, it is a regression in Windows itself. 
Debug/Checked builds of Windows might report the bad handle to the 
debugger, but the Release/Free builds would not throw an exception, BSOD 
or other kind of assert().

> Doesn't really explain whats wrong with the handle, though.
>
Enjoy

Jakob
-- 
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded


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