From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6121 invoked by alias); 30 Sep 2015 11:16:05 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 6112 invoked by uid 89); 30 Sep 2015 11:16:04 -0000 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 Received: from mout.gmx.com (HELO mout.gmx.com) (74.208.4.201) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 30 Sep 2015 11:16:03 +0000 Received: from [192.168.200.195] ([192.26.168.132]) by mail.gmx.com (mrgmxus001) with ESMTPSA (Nemesis) id 0Ln8Cx-1aJM4Q1oSL-00hMeI; Wed, 30 Sep 2015 13:15:59 +0200 To: cygwin@cygwin.com In-Reply-To: <5603CC23.2010202@gmail.com> From: litter@null.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 11:16:00 -0000 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== X-SW-Source: 2015-09/txt/msg00516.txt.bz2 >>>>> 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