delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/05/05/05:16:25

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 6459GONt783169
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 6459GONt783169
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=o27uVqCX
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13D204B9DB4F
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1777972583;
bh=o3qnWEb8ZGrlvaJQsV2irwXfdVK/ywwJm3bLFTMUSJ4=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=o27uVqCX4u8QmDjl2ktPh6HaPyp9eMtinqz9Vy1qBj/uvseJgeW8/Z8/80jtwB6Am
I177XEjzoghAT/gVmOED9YX0LtwjB0C1VB8CERP3RnYutbgiDyNsGj+zQslrzJ28hh
wunzr0hXQTBCjL9XPGZwNm+b+PpTuG3Uf4RvLiWE=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB3604BA900C
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CB3604BA900C
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777972563; cv=none;
b=v6QXsnLTZXIPgDvajDGXUy3zoygkbgltBOUxOYid7NcX5sndLH8zutzGLAHYmz3DPPMdt80vgylNbzmFshcPgZnceZUKVEcBBTKvTdh6012Tqh0EW6NKj7fkxsM54HrYOm0yAi0lfMXGrBcY+jJS2VJdIiCrFO96F4AvAXmwb1g=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1777972563; c=relaxed/simple;
bh=72qKVULaUx6tNCoSVR1mCCSIrxgY0aEJeuT7MVG2t8k=;
h=Subject:To:From:Message-ID:Date:MIME-Version:DKIM-Signature;
b=hs5KCih3rophpp6kL5fjsYkKKCf5qKwbEuC0nS55mue2++hMV2SSDci2X6a9iOIkffZjifTiodqUdVFBTXpH2+UFFahGf0yUiR0rr8lmmVygzyFKOd/KQ/wSaVEaWsc4rOue8dJIx3+1cOsbNFBa7uuzzCPege+PvF8QDQu3Qmk=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB3604BA900C
Subject: Re: open() creates a new file even if it fails with EMFILE
To: cygwin AT cygwin DOT com
References: <4e8b4746-e4e7-e655-a1b5-05bf5ee54a10 AT t-online DOT de>
<9ea723d3-d3d1-414c-97b5-7c822b796a47 AT maxrnd DOT com>
Message-ID: <5919bc97-d9b8-d83c-0acf-381421992214@t-online.de>
Date: Tue, 5 May 2026 11:15:59 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101
SeaMonkey/2.53.23
MIME-Version: 1.0
In-Reply-To: <9ea723d3-d3d1-414c-97b5-7c822b796a47@maxrnd.com>
X-TOI-EXPURGATEID: 150726::1777972560-92FFA81C-18095536/0/0 CLEAN NORMAL
X-TOI-MSGID: 3e702a06-18f8-46ba-b95c-9918db158af3
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: Christian Franke via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Christian Franke <Christian DOT Franke AT t-online DOT de>
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 6459GONt783169

Mark Geisert via Cygwin wrote:
> Hi Christian,
>
> On 5/4/2026 11:39 AM, Christian Franke via Cygwin wrote:
>> Could be reproduced with 3.6.9 and current HEAD.
>>
>> Testcase:
>>
>> ...
>>
>> Looks like the fd is allocated too late.
>
> Thanks for the report and especially for the STC.  It is during 
> fdtable extension that the limit is checked; by then NtCreateFile() 
> has already been called successfully.  We need to consider a fix that 
> avoids needlessly creating a file that can't be operated on anyway.

You're welcome. I will add an enhanced version of the STC to the 
cygwin-apps/stc repo. Problem was detected by 'stress-ng --open ...' 
with stress-ng 0.21.01-1.

-- 
Regards,
Christian


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