Build problem... 'couldn't reserve space for cygwin's heap'

Topics for the Eclipse Environment
jaypdx
Posts: 29
Joined: Wed Oct 15, 2014 6:06 pm

Build problem... 'couldn't reserve space for cygwin's heap'

Post by jaypdx »

Suddenly I'm getting the following build error from NBIDE:

-------------------------------------------------------------------------------------------------
14:42:03 **** Auto Build of configuration Release for project burnin ****
make -j12 all
0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x71110000, RegionSize 0x4B0000, State 0x10000
C:\nburn\gcc\msys\1.0\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
make: *** [src/subdir.mk:27: src/main.o] Error 1
"make -j12 all" terminated with exit code 2. Build might be incomplete.
-------------------------------------------------------------------------------------------------

This had all been working fine, but recently I installed some software - Python 3.8 and the MSVC++ redistributable seem likely culprits - and now I'm getting this error. I've seen posts with similar problems in the forums but nothing that's helped me fix it.

I tried re-installing NNDK (I did not delete or uninstall anything first). Now my nburn paths are all first, but I still get the error.

I tried building from the command line... I opened a command prompt and set the path to c:\nburn and then ran setenv.bat but still failure:

-------------------------------------------------------------------------------------------------
C:\Users\jayk\work\projectx\netburner\burnin\Release>setenv.bat
C:\Users\jayk\work\projectx\netburner\burnin\Release>path=C:/nburn/gcc/bin;C:/nburn/pcbin;C:/nburn/gcc/msys/1.0/bin;c:\nburn
C:\Users\jayk\work\projectx\netburner\burnin\Release>set NNDK_ROOT=C:/nburn
C:\Users\jayk\work\projectx\netburner\burnin\Release>set DEFPLATFORM=MOD5441X
C:\Users\jayk\work\projectx\netburner\burnin\Release>set PLATFORM=MOD5441X
C:\Users\jayk\work\projectx\netburner\burnin\Release>path
PATH=C:/nburn/gcc/bin;C:/nburn/pcbin;C:/nburn/gcc/msys/1.0/bin;c:\nburn
C:\Users\jayk\work\projectx\netburner\burnin\Release>make
0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x71110000, RegionSize 0x4B0000, State 0x10000
C:\nburn\gcc\msys\1.0\bin\mkdir.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
make: *** [C:/nburn/make/boilerplate.mk:294: nblibs/release/nbrtos/source/release_tagdata.o] Error 1
-------------------------------------------------------------------------------------------------

Anything else to try? I need to get this working again.
jaypdx
Posts: 29
Joined: Wed Oct 15, 2014 6:06 pm

Re: Build problem... 'couldn't reserve space for cygwin's heap'

Post by jaypdx »

I'm running NNDK-3.3.0 on Win10 Pro version 2004, in case that's relevant.
jaypdx
Posts: 29
Joined: Wed Oct 15, 2014 6:06 pm

Re: Build problem... 'couldn't reserve space for cygwin's heap'

Post by jaypdx »

Ahhhh.. rebooted and working now! Not sure why, but I'll take it.
Anguel
Posts: 30
Joined: Fri Aug 23, 2019 12:39 am

Re: Build problem... 'couldn't reserve space for cygwin's heap'

Post by Anguel »

Hi,

I also had this issue multiple times, I think rebooting helped last time but in the past I used this to fix the problem as it did not want to go away:
http://lygstate.github.io/tornado/gcc/m ... win10.html

Best regards,

Anguel
Anguel
Posts: 30
Joined: Fri Aug 23, 2019 12:39 am

Re: Build problem... 'couldn't reserve space for cygwin's heap'

Post by Anguel »

This problem is still driving me crazy. Now I installed NNDK 3.3.2 and tried to compile an existing project:

Code: Select all

11:19:52 **** Incremental Build of configuration Release for project MYPROJECT ****
make -j8 all 
rm -rf nblibs/libnetburner.a
"C:/nburn/gcc/bin/arm-unknown-eabi-ar" cr nblibs/libnetburner.a nblibs/release/nbrtos/source/vjhc.o nblibs/release/nbrtos/source/netDevice.o 
[ ... ]
/spinloop.o nblibs/release/arch/cortex-m7/cpu/SAME70/source/mon_inject.o nblibs/release/arch/cortex-m7/source/nbrtos_cm7as.o nblibs/release/arch/cortex-m7/source/ldr.o
      0 [main] sh 25864 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
    604 [main] sh 25864 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
make: *** [../makefile.targets:12: nblibs/libnetburner.a] Error 101120
"make -j8 all" terminated with exit code 2. Build might be incomplete.

11:19:54 Build Failed. 1 errors, 0 warnings. (took 1s.253ms)
sh.exe.stackdump looks like this:

Code: Select all

MSYS-1.0.11 Build:2007-01-12 12:05
Exception: STATUS_ACCESS_VIOLATION at eip=2F736269
eax=00000000 ebx=6873732F ecx=FFFFFFFF edx=5009BB5C esi=756F732F edi=2F656372
ebp=6C626E20 esp=00657E08 program=C:\nburn\gcc\msys\1.0\bin\sh.exe
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame     Function  Args
  12074 [main] sh 25864 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
  13692 [main] sh 25864 handle_exceptions: Error while dumping state (probably corrupted stack)
This seems to be some nasty incompatibility or something and I don't know how to make it work. Nothing of the above helps.

I read everywhere that Msys 1.0 is extremely old and not written for Win10 at all. Isn't there any possibility to replace this with something newer???
Anguel
Posts: 30
Joined: Fri Aug 23, 2019 12:39 am

Re: Build problem... 'couldn't reserve space for cygwin's heap'

Post by Anguel »

UPDATE:
The problem described above appears only when I open older projects, e.g. from NNDK 3.1 in NNDK 3.3.2. If a new project is created from scratch in NNDK 3.3.2 the error does not appear.

I also tested importing an older project on another computer and this error also appears there.
Doing a "Clean NetBurner System Library" and cleaning the project does not help.

It needs to be fixed somehow to be able to use older projects on NNDK 3.3.2.
User avatar
TomNB
Posts: 569
Joined: Tue May 10, 2016 8:22 am

Re: Build problem... 'couldn't reserve space for cygwin's heap'

Post by TomNB »

Cygwin has an inherent issue with fixed memory locations. This issue can happen when you have multiple cygwin installations, such as those with gcc. If you reboot your pc, is the problem repeatable? A reboot causes dll memory locations to change.
Anguel
Posts: 30
Joined: Fri Aug 23, 2019 12:39 am

Re: Build problem... 'couldn't reserve space for cygwin's heap'

Post by Anguel »

Hi Tom,

As I wrote above,this last problem I reported:

Code: Select all

MSYS-1.0.11 Build:2007-01-12 12:05
Exception: STATUS_ACCESS_VIOLATION
seems to apply only to projects created with previous versions of NNDK, e.g. 3.1.
But it is repeatable on different PCs.
User avatar
TomNB
Posts: 569
Joined: Tue May 10, 2016 8:22 am

Re: Build problem... 'couldn't reserve space for cygwin's heap'

Post by TomNB »

Hello,

We have been unable to reproduce this. However, since you stated that is does not occur for new projects, is there any possibility you can create a new project and import just the source files of your old project?
Anguel
Posts: 30
Joined: Fri Aug 23, 2019 12:39 am

Re: Build problem... 'couldn't reserve space for cygwin's heap'

Post by Anguel »

Thanks Tom, I opened a ticket with Id 37327 and uploaded a small project that fails so you can take a look if you can reproduce the problem.

Best regards,
Anguel
Post Reply