Re: Recent testsuite/winsup.api/pthread/cancel2 failure
Jakob Bohm via Cygwin <[email protected]>
| Newsgroups | gmane.os.cygwin |
|---|---|
| Organization | WiseMo A/S |
| Message-ID | <[email protected]> |
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 <[email protected]> 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