public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Cygwin bash for loops : repeated errors : [main] bash 1972 fork: child -1 - CreateProcessW failed for <bash.exe> errno 9 bash: fork: Bad file descriptor
@ 2015-10-01  7:03 Vermessung AVT - Wolfgang Rieger
  0 siblings, 0 replies; 8+ messages in thread
From: Vermessung AVT - Wolfgang Rieger @ 2015-10-01  7:03 UTC (permalink / raw)
  To: cygwin

Hi Paul,

I also get Bad File Descriptor errors, though in a quite different situation, see my recent topic "gawk: Bad File Descriptor error with concurrent readonly access to a network file" on Sep 25. There seems to be some issue in some file opening process that occurs with parallel processes and eventually concurrent file access (as in my case). May be the basic problem behind is similar to yours?

Kind regards,
Wolfgang


> 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


^ permalink raw reply	[flat|nested] 8+ messages in thread
* Cygwin bash for loops : repeated errors : [main] bash 1972 fork: child -1 - CreateProcessW failed for <bash.exe> errno 9 bash: fork: Bad file descriptor
@ 2015-09-23  7:52 litter
  2015-09-23  9:15 ` Marco Atzeri
  0 siblings, 1 reply; 8+ messages in thread
From: litter @ 2015-09-23  7:52 UTC (permalink / raw)
  To: cygwin

Hi all,

On a Windows XP 32 bit machine with latest Cygwin installed
(CYGWIN_NT-5.1 <machine> 2.2.1(0.289/5/3) 2015-08-20 11:40 i686 Cygwin)
I frequently encounter errors which break bash while loops, making it practically unusable

e.g.
cat some-file | while read i;do grep text $i;done

results in
2 [main] bash 1972 fork: child -1 - CreateProcessW failed for '<cygwin install path>\bin\bash.exe', errno 9
bash: fork: Bad file descriptor

The error is unpredictable, in a next run everything can run fine again.

I already checked for some common errors, but could not find anything.

Any help is appreciated.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-10-01  7:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01  7:03 Cygwin bash for loops : repeated errors : [main] bash 1972 fork: child -1 - CreateProcessW failed for <bash.exe> errno 9 bash: fork: Bad file descriptor Vermessung AVT - Wolfgang Rieger
  -- strict thread matches above, loose matches on Subject: below --
2015-09-23  7:52 litter
2015-09-23  9:15 ` Marco Atzeri
2015-09-23 15:03   ` litter
2015-09-23 15:56     ` Marco Atzeri
2015-09-24  9:51       ` litter
2015-09-24 10:10         ` Marco Atzeri
2015-09-30 11:16           ` litter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).