This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bash, find | xargs grep

Hash: SHA1

According to bob knob on 3/14/2006 3:28 PM:
> I've been doing "find | xargs grep" types of things
> for a long time with no problem, but I just started
> working at a new job with a new computer onto which
> I've downloaded the latest Cygwin. 

Most likely the new computer is running some invasive third-party program
that is sucking Windows dry of resources.  Searching the list archives
points out some common culprits, such as McAfee antivirus, or a Logitech
camera device, where their .dlls have a detrimental effect on cygwin's
ability to emulate POSIX fork semantics.

>       5 [main] bash 4800
> C:\Programs\Cygwin\bin\bash.exe: *** fatal error -
> fork: can't reserve memory for stack 0x23E890 - 0 
> x240000, Win32 error 487 
>    2520 [main] bash 4880 child_copy: stack write copy
> failed, 
> 0x23E890..0x240000, done 0, windows pid 2353092, Win32
> error 5 
> /c/MyCode/mygrep: fork: No error 

I wish that fork would fail with errno set, so that bash's error message
is not so confusing; but that is besides the point.  Running out of memory
during forks is not a bug in bash, find, or xargs, but a limitation of
Windows.  If anyone has ideas on how to reduce the frequency of fork
failures, patches are more than welcome, but the main developers have
pretty much tried everything imaginable.  The solutions (workarounds?) on
this list have generally been to disable the third-party .dll that is
causing the interference.

- --
Life is short - so eat dessert first!

Eric Blake   
volunteer cygwin findutils maintainer
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]