From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29495 invoked by alias); 30 May 2011 09:02:38 -0000 Received: (qmail 29481 invoked by uid 22791); 30 May 2011 09:02:36 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_20,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_GJ,TW_YG,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qw0-f43.google.com (HELO mail-qw0-f43.google.com) (209.85.216.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 30 May 2011 09:02:21 +0000 Received: by qwf6 with SMTP id 6so2112347qwf.2 for ; Mon, 30 May 2011 02:02:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.62.194 with SMTP id y2mr3410867qch.4.1306746140775; Mon, 30 May 2011 02:02:20 -0700 (PDT) Received: by 10.229.183.17 with HTTP; Mon, 30 May 2011 02:02:20 -0700 (PDT) In-Reply-To: <31714033.post@talk.nabble.com> References: <31714033.post@talk.nabble.com> Date: Mon, 30 May 2011 09:02:00 -0000 Message-ID: Subject: Re: Error when Perl calling shell scipt using Cygwin >>> c:\cygwin\bin\sh.exe: *** fatal error - couldn't allocate heap, Win32 error 487 From: Reini Urban To: cygwin@cygwin.com Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-05/txt/msg00441.txt.bz2 2011/5/27 Gaurav Chhabra: > > http://old.nabble.com/file/p31714033/cygcheck.out cygcheck.out > > 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 messa= ge > while running the Perl script: Please try perlrebase > -------------------------------------------------------------------------= ------- > 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 > =A0 =A0 =A0 =A0 =A0 =A0[main] sh 6232 fork: child -1 - died waiting for l= ongjmp before > initialization, retry 0, exit code 0x100, errno 11 > =A0 =A0 =A0 =A0 =A0 =A05 [main] sh 3784 c:\cygwin\bin\sh.exe: *** fatal e= rror - > couldn't allocate heap, Win32 error 487, base 0x8F0000, top 0x940000, > reserve_size 323584, allocsize 327680, page_const 40963016351 > =A0 =A0 =A0 =A0 =A0 =A0[main] sh 6232 fork: child -1 - died waiting for l= ongjmp before > initialization, retry 0, exit code 0x100, errno 11 > =A0 =A0 =A0 =A0 =A0 =A05 [main] sh 6156 c:\cygwin\bin\sh.exe: *** fatal e= rror - > couldn't allocate heap, Win32 error 487, base 0x8F0000, top 0x940000, > reserve_size 323584, allocsize 327680, page_const 40966916676 > =A0 =A0 =A0 =A0 =A0 =A0[main] sh 6232 fork: child -1 - died waiting for l= ongjmp before > initialization, retry 0, exit code 0x100, errno 11 > =A0 =A0 =A0 =A0 =A0 =A05 [main] sh 7668 c:\cygwin\bin\sh.exe: *** fatal e= rror - > couldn't allocate heap, Win32 error 487, base 0x8F0000, top 0x940000, > reserve_size 323584, allocsize 327680, page_const 409612806997 > =A0 =A0 =A0 =A0 =A0 =A0[main] sh 6232 fork: child -1 - died waiting for l= ongjmp before > initialization, retry 0, exit code 0x100, errno 11 > =A0 =A0 =A0 =A0 =A0 =A06 [main] sh 3132 c:\cygwin\bin\sh.exe: *** fatal e= rror - > couldn't allocate heap, Win32 error 487, base 0x8F0000, top 0x940000, > reserve_size 323584, allocsize 327680, page_const 409622683401 > =A0 =A0 =A0 =A0 =A0 =A0[main] sh 6232 fork: child -1 - died waiting for l= ongjmp 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. =A0 =A0 =A0Disabled SEP (Symantec Endpoint Protection) > 2. =A0 =A0 =A0Turned off DEP (Data Execution Prevention) for Cygwin=92s s= h.exe > 3. =A0 =A0 =A0Modified numbers (xxxx,yyyy,zzzz) present in Windows key va= lue at the > following path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Sessi= on > Manager\SubSystems\ > 4. =A0 =A0 =A0Ran rebaseall in ash.exe > -------------------------------------------------- > > The strange thing is that if I directly call the shell script using Cygwi= n, > it works fine. > c:\cygwin\bin\sh.exe c:\myscript.sh > > cygcheck =A0-V gave the following output: > -------------------------------------------------- > $ cygcheck =A0-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 se= ems > to be some issue either with > ---------------------------------- > 1. Perl itself > 2. compatibility between Perl & Cygwin versions > ---------------------------------- > > I have also attached the output of =91cygcheck -s -v =96r=92. 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-calli= ng-shell-scipt-using-Cygwin-%3E%3E%3E-c%3A%5Ccygwin%5Cbin%5Csh.exe%3A-***-f= atal-error---couldn%27t-allocate-heap%2C-Win32-error-487-tp31714033p3171403= 3.html > Sent from the Cygwin list mailing list archive at Nabble.com. > > > -- > Problem reports: =A0 =A0 =A0 http://cygwin.com/problems.html > FAQ: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://cygwin.com/faq/ > Documentation: =A0 =A0 =A0 =A0 http://cygwin.com/docs.html > Unsubscribe info: =A0 =A0 =A0http://cygwin.com/ml/#unsubscribe-simple > > --=20 Reini Urban http://phpwiki.org/=A0 =A0 =A0 =A0 =A0=A0 http://murbreak.at/ -- 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