DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 538JCPbX2227974 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 538JCPbX2227974 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=bGwCI3Vj X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 629F33856096 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1744139543; bh=+2kgartrSQfJi/cckjr1rvg4pgpV1dqdYoTZu4YyWTM=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=bGwCI3VjNozQ63mhFJdhbNfaQ+3OnI+IT/QMUdG/gUekpX/1FTyEOyFe8U0EDHaW3 2q241mgNr2G+FXdasuk+Fz31wLW81FJwuRmN4vjzMxBN4qtuLaX8092f3ThCmHWoRq t/yqdRa0hdrz3zJMcdrZGtOv3vV+Wgi1sc3S+txE= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5482F385AC24 Date: Tue, 8 Apr 2025 21:11:50 +0200 To: cygwin AT cygwin DOT com Subject: Re: ftruncate() may fail with EISDIR if other process calls open() Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: <8006969c-037a-14a5-7a27-9572d48d605c AT t-online DOT de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Apr 8 17:07, Christian Franke via Cygwin wrote: > Corinna Vinschen via Cygwin wrote: > > On Apr 8 13:50, Corinna Vinschen via Cygwin wrote: > > > On Apr 7 09:59, Christian Franke via Cygwin wrote: > > > > Found because 'stress-ng --fcntl 2 --verify' reports "ftruncate failed, > > > > errno=21": > > > Thanks for the testcase. I know what happens. Stay tuned for a patch. > > Nice problem. That's what happens if you try to do what an OS is doing, > > without actually being an OS, just a user space lib. Theoretically we > > should never cache any file information but always call the matching OS > > functions. Only... this adds quite a few context switches every time > > accessing files. Sigh. > > > > I just pushed 2d81f6ebe3dc ("Cygwin: open: always fix up cached DOS file > > attributes after NtCreateFile"). > > > > Try the upcoming cygwin-3.7.0-0.47.g9e6193576f34. > > With a local build of 3.7.0-dev-49-g42df80dad079.x86_64, both the testcase > and stress-ng no longer fail. Thanks for checking! Corinna -- 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