Shell script loop runs out of memory

Eric Blake eblake@redhat.com
Fri Jun 1 13:03:00 GMT 2012


On 05/31/2012 11:42 AM, Jordan wrote:
> Hi folks,
> 
> I've written a shell script running under CygWin, the purpose of which is to 
> monitor a file for changes. If the MD5 hash fails to match the previous hash, it 
> will execute a command to process the file. I used a 1-second delay between 
> checks of the hash. This works great for several hours, but then gives an "out 
> of memory" error and actually brings Windows 7 to its knees.

Have you ascertained whether the leak is in bash, cygwin1.dll, or in
Windows itself?  If it is BLODA (and the leak is in windows itself),
then there is nothing we can do.  If it is in cygwin1.dll, then the leak
would be present even if you used a different shell, and fixing it would
benefit all cygwin programs.  I will also note that cygwin is currently
on bash 4.1, but upstream is at bash 4.2, so there may be a memory leak
patch for bash that we would get if I ever had time to upgrade to the
latest upstream bash.

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120601/8bbafeba/attachment.sig>


More information about the Cygwin mailing list