Re: [PATCH] Cygwin: Implement 'reserved' marker in fdtable entries
Jon Turney <[email protected]> Mon, 8 Jun 2026 14:30:31 +0100
| Newsgroups | gmane.os.cygwin.patches |
|---|---|
| Message-ID | <[email protected]> |
On 08/06/2026 13:10, Christian Franke wrote: > On Sat, 30 May 2026 12:33, Jon Turney wrote: >> On 22/05/2026 15:21, Christian Franke wrote: >>> Jon Turney wrote: >>>> On 22/05/2026 08:28, Mark Geisert wrote: >>>>> ... >>>>> >>>>> The notion is that an fdtable entry provided by cygheap_fdnew is >>>>> marked >>>>> so that another thread can't obtain it. Care is taken to reset the >>>>> marker when the entry is no longer needed. Actually, in the usual >>>>> case >>>>> the marker is overwritten with a pointer to an fhandler_base >>>>> structure, >>>>> by the reserving thread, as the syscall completes. >>>>> >>>>> Reported-by: Christian Franke <[email protected]> >>>>> Addresses: https://cygwin.com/pipermail/cygwin/2026-May/259664.html >>>>> Signed-off-by: Mark Geisert <[email protected]> >>>>> Fixes: e859706578ba (* autoload.cc (NtCreateFile): Add.) >>>> >>>> Thanks! >>>> >>>> This all seems fine and reasonable, but I have a couple of small >>>> comments. >>> >>> A test with an enhanced version of the STC was successful. >>> I could push this version (attached) to cygwin-apps/stc if desired. >> >> Yes, that would be great. Please do so. > > Done. > > >> >> (I guess ideally after the fix is committed so it stays green, but >> it's red at the moment and I severely lack the time to investigate >> why...) > > Some STC (e.g. trace-sigsegv) ocasionally fail when run as part of the > Cygwin CI workflow. Timing issues? > > Could not reproduce this neither locally nor at GH. That one seems to sporadically fail, but only on aarch64 runner. > I would suggest to add this to stc.yml to allow manual tests independent > from push: > https://github.com/chrfranke/cygwin-stc/commit/5c157ff6 Yes, that seems like a good idea. Oh lol, it seems like I meant to have this run the x86_64 tests on an aarch64 runner as well as an x86_64 runner, but got distracted halfway through... I've tweaked your change slightly so we just run on both always. Thanks very much!