Cygwin bash for loops : repeated errors : [main] bash 1972 fork: child -1 - CreateProcessW failed for errno 9 bash: fork: Bad file descriptor

2015-09-23 Thread litter
Hi all, On a Windows XP 32 bit machine with latest Cygwin installed (CYGWIN_NT-5.1 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 / cygwin process spawning (?) performance very slow

2015-09-23 Thread litter
Hi all, I noticed that doing simple loops in Bash takes unexpectedly long under Cygwin on a Windows XP 32 bit machine (CYGWIN_NT-5.1 2.2.1(0.289/5/3) 2015-08-20 11:40 i686 Cygwin) I already followed the FAQ advice in trying to determine general causes, and made a 'shadow' copy of /etc/passwd

Re: Unable to retain installation configuration on Windows 10

2015-09-23 Thread litter
On 2015-09-23 14:46, Brian Inglis wrote: > On 2015-09-23 03:15, Andrey Repin wrote: >> Greetings, Brian Inglis! >> >>> $ echo $( < /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Cygwin/setup/rootdir >>> ) >>> and the package directory using: >> >> Err, why not just >> cat /proc/registry/HKEY_LOCAL_MAC

Re: Cygwin bash for loops : repeated errors : [main] bash 1972 fork: child -1 - CreateProcessW failed for errno 9 bash: fork: Bad file descriptor

2015-09-23 Thread litter
> 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 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/

Re: Bash / cygwin process spawning (?) performance very slow

2015-09-23 Thread litter
>> for a file of 167 lines. Process Explorer showed a CPU load of 20% on >> bash.exe, which was almost completely Kernel time. >> Is such high Kernel load normal? > > may be. forks are time consuming and your command is spending all the > time in fork So why is it spending all its time in fork?

Re: Bash / cygwin process spawning (?) performance very slow

2015-09-23 Thread litter
> lit...@null.net: > Wed, 23 Sep 2015 10:52:26 +0200 > --- >> Hi all, >> >> I noticed that doing simple loops in Bash takes unexpectedly long under >> Cygwin on a Windows XP 32 bit machine >> (CYGWIN_NT-5.1 2.2.1(0.289/5/3) 2015-08-20 11:40 i686 C

Re: Cygwin bash for loops : repeated errors : [main] bash 1972 fork: child -1 - CreateProcessW failed for errno 9 bash: fork: Bad file descriptor

2015-09-24 Thread litter
.> On 23/09/2015 17:03, lit...@null.net wrote: >>> 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 > c

Re: Bash / cygwin process spawning (?) performance very slow

2015-09-24 Thread litter
> On 23/09/2015 17:17, lit...@null.net wrote: for a file of 167 lines. Process Explorer showed a CPU load of 20% on bash.exe, which was almost completely Kernel time. Is such high Kernel load normal? >>> >>> may be. forks are time consuming and your command is spending all the >>> t

Re: Bash / cygwin process spawning (?) performance very slow

2015-09-24 Thread litter
> On 24/09/2015 11:57, lit...@null.net wrote: >> Obviously something is. The FAQ entry does not mention performance, but real >> failures. >> How to further diagnose this? I took the plunge and spent almost a full day trying to find the cause. 1. Booting into Safe Mode gave a huge performance bo

Re: Bash / cygwin process spawning (?) performance very slow

2015-09-24 Thread litter
> Maybe: > > strace bash -c 'time cat some-file | while read i;do echo > $i;/bin/true;done' > > Haven't tested it. > > Simplify the command: > > for((i=0;i<150;i++));do /bin/true;done > > to rule out a pipe-problem. Thanks for the tips! Used a variant on the for loop to simplify the problem.

Re: Bash / cygwin process spawning (?) performance very slow

2015-09-24 Thread litter
> If you use http://www.dependencywalker.com/ on bash.exe with view/full > paths enabled, does the Comodo Firewall dll stand out or is it just > another .dll loaded from windows\system32? > > Regards, > Lee I use Process Explorer to view in-process .dlls: C:\WINDOWS\system32\guard32.dll Regards

Solved Re: Bash / cygwin process spawning (?) performance very slow

2015-09-24 Thread litter
> turns out that Comodo Firewall (Free version) loads a DLL in each process > that is the cause of the delay. > Although I only use the Firewall, and do not use any "AntiVirus" features, > still it causes delay during startup of a process. > > However, after disabling it -- which did speed up pr

Re: Cygwin bash for loops : repeated errors : [main] bash 1972 fork: child -1 - CreateProcessW failed for errno 9 bash: fork: Bad file descriptor

2015-09-30 Thread litter
> 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 wi