X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 24DEC3857026 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1671651200; bh=6cdB5tC/dJSQ0N44aSaBsNac9EvZ0HsWuMQljv4ogrg=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=WWyOxUwdKSsRlp1EOcwymR3Zt0HXgmvPoIyCtGXN5PooYFKFndl83ejfS5x64PJ+e UZ26ZSRO3K7WHfM5H87+N63Cq8wd/AkN9CeWqHA210TLWFbSewtr6LPt/I4Bk2/mJF bzUqFWfrKO/cUiDug1/kSuaqA9hm0NNq7AZGO+rI= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 96E633858425 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Spam-Language: en X-Spam-Relay-Country: X-Spam-DCC: B=; R=smtp1.atof.net 1102; Body=1 Fuz1=1 Fuz2=1 X-Spam-RBL: X-Spam-PYZOR: Reported 0 times. Date: Wed, 21 Dec 2022 14:32:54 -0500 To: Corinna Vinschen via Cygwin Subject: Re: open /dev/null O_NOFOLLOW fails with ELOOP Message-ID: References: Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "gs-cygwin.com--- via Cygwin" Reply-To: gs-cygwin DOT com AT gluelogic DOT com 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 Wed, Dec 21, 2022 at 03:29:42PM +0100, Corinna Vinschen via Cygwin wrote: > Hi Glenn, > > On Dec 21 12:31, Corinna Vinschen via Cygwin wrote: > > On Dec 21 06:15, gs-cygwin.com--- via Cygwin wrote: > > > open /dev/null O_NOFOLLOW fails with ELOOP > > > > > > Windows 10, 64-bit cygwin > > > > > > Failed with my existing install, then I ran setup.exe, updated to > > > latest, and my tests still failed. > > > > > > a.c > > > --- > > > > > > #include > > > #include > > > #include > > > > > > int main (void) > > > { > > > int fd = open("/dev/null", O_RDWR | O_NOFOLLOW, 0); > > > if (fd < 0) > > > perror("open(/dev/null)"); > > > return fd; > > > } > > > > > > > > > $ gcc a.c ; ./a.exe > > > open(/dev/null): Too many levels of symbolic links > > > > > > While troubleshooting this, there were times where it succeeded and then > > > times where it failed, though it failed most of the time. It did not > > > fail (or succeed) randomly, but seemingly in streaks. > > > > > > Trying to start lighttpd seems to run into this bug reliably, > > > $ /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf > > > In the next release of lighttpd, I may end up omitting O_NOFOLLOW > > > if __CYGWIN__ is defined. > > > > Thanks for the report. I think I see what's going on, stay tuned. > > I pushed a patch: > https://cygwin.com/git/?p=newlib-cygwin.git;a=commitdiff;h=09cb4cd2940f > > Please try the latest test release cygwin-3.5.0-0.60.g09cb4cd2940f. > For installation, see https://cygwin.com/faq.html#faq.setup.testrels > > > Thanks, > Corinna cygwin-3.5.0-0.60.g09cb4cd2940f works for my test case and for lighttpd. I was unable to reproduce the problem after (somewhat limited) testing with the test version. When I reverted back to 3.4.3-1, I was immediately able to reproduce the issue with 3.4.3-1. Thank you! Happy Holidays! Cheers, Glenn -- 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