X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:in-reply-to:from:subject:message-id:date :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=kHMZh5XCCW/A93HDU6spiYPubTxcvYtadm0DY763FCr1CxB6Fllz9 uRvXvojO1sKnn/4C0xeut8wGP872jnG+EjVql0n1DstAV9zxWKcuIDhaSAS4FTlk fngB34fLABzuPkaThb0M1/oz2MnzDiy37aTsIRWXMMQ1gd0CM57j8Q= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:in-reply-to:from:subject:message-id:date :mime-version:content-type:content-transfer-encoding; s=default; bh=C7OcBQWeIML9GczGTZW5QwTA2+E=; b=cWoiyqENOjBn9+Ag+vL3yPnDWe0X 50KDoLQ0k1bgaLwu8/uj1uJUhZsG6/nZbq7K2aImxSs9hx6x7x6nf2HsEFVr6dY0 JYwmhQ3CtsAOvrzr0uEkCCNHs40Bqb3qJaxcM/txvJ7LG024nyf9LmlWbwGeC2PK phLCbc/aenByChI= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mout.gmx.com To: cygwin AT cygwin DOT com In-Reply-To: <5603CC23.2010202@gmail.com> From: litter AT null DOT net Subject: Re: Cygwin bash for loops : repeated errors : [main] bash 1972 fork: child -1 - CreateProcessW failed for errno 9 bash: fork: Bad file descriptor X-Enigmail-Draft-Status: N1110 Message-ID: <560BC46C.7050308@null.net> Date: Wed, 30 Sep 2015 13:15:56 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-UI-Out-Filterresults: notjunk:1;V01:K0:gSyjJX3yxoQ=:FV/S9d3yYRyHqQfJnjRLM5 M7hL4Bhl0aT/r7yUvy3IFzF07eBpqUfIuc4dIVE8q2bgcYCrK87k4axlt/DbVfYyERenOJiz/ LmWDJQwe1JlSaVyViZ4aWXYIVFy0F/Bp9aXBEoBQRmEiZRBqnp2ldB4iH/wq0ndpgTfA1A1He xQmcJ6Q9sRcoRJxauRrSchzoQx37jfWfiZN7DlKHJLY1tnvaCr2WS1ZtdMn4ZTyBwgv6js7B5 MDx2XQHe5s4wXqwhIQZlndTJWXex/c52zdfEeuliBlds69QRZkWfPn8NGUinZIdOG/ReSmRnF BAvGJQWc/HgNu5Vf/I15iqlshaukhVufpqrse92rGuP3SvHi2HmbigkDjkVyeROowbZk1p2nC 4Tz65UmkVxiJi+SIDS/k8jBdqCXViCp/7vCUV1FZA20vaAjoNO4EVVf3sG/Ncx8zrwWMBV1Jv RNIS8m8Yi0OsyOoGqjjk+Fekj9Es1ENF7PfGGhoLRlnozqg3axyQvm4m/yYaQ/yX4H8bD13LT K4gPbfvofc2z5VCt5pLiODbyma4au5dTo8uN1kxGWwEKBpo3CKHXaobAEXxXXsi0LNoQb9db+ GWQDLUYkbMAYFsSv+FSsOuKTw1DbbgjVAoPsR6MoJr+BCmhumvaZOobVGgNWtgCyRayK9bn9n AqZ9nI4uqed1dn2VjPBqoUuV7n7grLWfduhLokXVwrz7/FXvmW5wbu8snFkF8OafBOlsfh2wb lXv15vxvCovUOvpDinU4pGrSrSgnxNYm276WOg== >>>>> It seems a race problem, due to the repetitive fork of grep >>>>> for every line of some-file >>>> >>>> So why does it fail? Seems like a bug to me! >>>> >>>> Regards, >>>> Paul >>> >>> As does not fail on my computer, I suspect is a race between your AV and >>> cygwin and sometimes cygwin wins. >>> >>> >>> Regards >>> Marco. >> >> Good for you. I don't have AV SW as I mentioned. And even so, that still makes it a bug. > > Your system timing performance as so poor that something > is likely interfering. > Don't assume that is a cygwin bug. > >> Anyhow, a suspicion is speculative. I thought this mailing list was meant to report issues, and I think this is an issue. > > Yes, this is the right place. > >> How can I further diagnose this? Is there a known way to further determine what's causing this? > > start with > > Problem reports: http://cygwin.com/problems.html > > "Run cygcheck -s -v -r > cygcheck.out and include that file as an > attachment in your report. Please do not compress or otherwise encode > the output. Just attach it as a straight text file so that it can be > easily viewed. " > > so we can look at your system configuration. > >> Regards, >> Paul > > Marco After observing for a week on the system with the fix applied, I did not see this issue reoccur. I do however still suspect that it is a bug in cygwin, indeed a race condition of some sorts, which probably becomes apparent when starting up a process takes (much) longer than expected. As said, the guard32.dll is probably scanning the new CreateProcess candidate. I suspect that there's an timing assumption in the Cygwin fork code. But as I cannot be sure, I leave it at that. Regards, Paul -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple