Error when Perl calling shell scipt using Cygwin >>> c:\cygwin\bin\sh.exe: *** fatal error - couldn't allocate heap, Win32 error 487

Gaurav Chhabra messagegc@gmail.com
Fri May 27 06:24:00 GMT 2011


http://old.nabble.com/file/p31714033/cygcheck.out cygcheck.out 

Hi,


I have a Windows machine and I have Cygwin installed. I have a Perl script
which calls a shell script using Cygwin. I am getting the following message
while running the Perl script:
--------------------------------------------------------------------------------
5 [main] sh 6632 c:\cygwin\bin\sh.exe: *** fatal error - couldn't allocate
heap, Win32 error 487, base 0x8F0000, top 0x940000, reserve_size 323584,
allocsize 327680, page_const 40966 
            [main] sh 6232 fork: child -1 - died waiting for longjmp before
initialization, retry 0, exit code 0x100, errno 11      
            5 [main] sh 3784 c:\cygwin\bin\sh.exe: *** fatal error -
couldn't allocate heap, Win32 error 487, base 0x8F0000, top 0x940000,
reserve_size 323584, allocsize 327680, page_const 40963016351 
            [main] sh 6232 fork: child -1 - died waiting for longjmp before
initialization, retry 0, exit code 0x100, errno 11      
            5 [main] sh 6156 c:\cygwin\bin\sh.exe: *** fatal error -
couldn't allocate heap, Win32 error 487, base 0x8F0000, top 0x940000,
reserve_size 323584, allocsize 327680, page_const 40966916676 
            [main] sh 6232 fork: child -1 - died waiting for longjmp before
initialization, retry 0, exit code 0x100, errno 11      
            5 [main] sh 7668 c:\cygwin\bin\sh.exe: *** fatal error -
couldn't allocate heap, Win32 error 487, base 0x8F0000, top 0x940000,
reserve_size 323584, allocsize 327680, page_const 409612806997 
            [main] sh 6232 fork: child -1 - died waiting for longjmp before
initialization, retry 0, exit code 0x100, errno 11      
            6 [main] sh 3132 c:\cygwin\bin\sh.exe: *** fatal error -
couldn't allocate heap, Win32 error 487, base 0x8F0000, top 0x940000,
reserve_size 323584, allocsize 327680, page_const 409622683401 
            [main] sh 6232 fork: child -1 - died waiting for longjmp before
initialization, retry 0, exit code 0x100, errno 11
c:\myscript.sh: fork: Resource temporarily unavailable
--------------------------------------------------------------------------------

I searched various links, and tried out different suggestions that worked
for others but to no avail. Few things that I tried was:
--------------------------------------------------
1.	Disabled SEP (Symantec Endpoint Protection)
2.	Turned off DEP (Data Execution Prevention) for Cygwin’s sh.exe
3.	Modified numbers (xxxx,yyyy,zzzz) present in Windows key value at the
following path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\SubSystems\
4.	Ran rebaseall in ash.exe
--------------------------------------------------

The strange thing is that if I directly call the shell script using Cygwin,
it works fine.
c:\cygwin\bin\sh.exe c:\myscript.sh

cygcheck  -V gave the following output:
--------------------------------------------------
$ cygcheck  -V
cygcheck version 1.123
System Checker for Cygwin
Copyright (C) 1998 - 2008 Red Hat, Inc.
Compiled on Apr 12 2010
--------------------------------------------------

I think this version of Cygwin is quite old so I am planning to install a
separate instance (latest) but what concerns me is that since the shell
script works fine without using Perl, and fails when using Perl, there seems
to be some issue either with
----------------------------------
1. Perl itself
2. compatibility between Perl & Cygwin versions
----------------------------------

I have also attached the output of ‘cygcheck -s -v –r’. However, I have
modified/removed few sensitive info.

Can anyone provide some help to get this thing working?


Thanks,
Gaurav
-- 
View this message in context: http://old.nabble.com/Error-when-Perl-calling-shell-scipt-using-Cygwin-%3E%3E%3E-c%3A%5Ccygwin%5Cbin%5Csh.exe%3A-***-fatal-error---couldn%27t-allocate-heap%2C-Win32-error-487-tp31714033p31714033.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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



More information about the Cygwin mailing list