Ticket #38356

MSYS make fails to compile project(couldn't commit memory for cygwin heap)

Open Date: 2018-06-26 17:13 Last Update: 2019-12-24 03:13

Reporter:
Owner:
Type:
Status:
Open [Owner assigned]
Component:
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
1
Vote
Score: 1
100.0% (1/1)
0.0% (0/1)

Details

Hello, When i try to compile a project(big one) make always fails at some point with the following error:

C:\MinGW\msys\1.0\bin\make.exe: *** couldn't commit memory for cygwin heap, Win32 error 0

after starting a build again it continues and finishes the build. However in some situations i can not "work around" this.

This is the version of MSYS: C:\windows\system32>uname -a MINGW32_NT-6.1 BGHCZC5281GJ4 1.0.19(0.48/3/2) 2016-07-13 17:45 i686 Msys

Version of MINGW: MINGW32_VERSION 5000002L

I have tried several suggestions to correct the issue: 1.tried rebasing the msys-1.0.dll 2.tried rebaseall from rebase package 3.tried reinstalling mingw 4.tried setting max heap(peflags --cygwin-heap=2048 make.exe) from rebase package. 5.increased the vritual paging file to 20gb. 6.checked in PATH variable that only one MINGW path is listed. 7.upgraded mingw to latest libraries

None of these made any difference.

Please help.

Ticket History (3/10 Histories)

2018-06-26 17:13 Updated by: kmilev
  • New Ticket "MSYS make fails to compile project(couldn't commit memory for cygwin heap)" created
2018-06-27 00:26 Updated by: earnie
Comment

What is your virus protection software doing during this? If you can, eliminate the virus protection for your MinGW software and development directories to determine if it helps. There are other software that might cause this type of failure most of which are listed at https://cygwin.com/faq/faq.html#faq.using.bloda.

2018-06-27 15:08 Updated by: kmilev
Comment

Reply To earnie

What is your virus protection software doing during this? If you can, eliminate the virus protection for your MinGW software and development directories to determine if it helps. There are other software that might cause this type of failure most of which are listed at https://cygwin.com/faq/faq.html#faq.using.bloda.

I have forgotten to mention this, i have also tried this with no avail. (none of this software works on the machine)

2018-06-27 23:38 Updated by: earnie
  • Owner Update from (None) to cstrauss
2018-06-27 23:39 Updated by: earnie
Comment

I've assigned to Cesar to see if he has any comments.

2019-01-01 14:11 Updated by: dinkc64
Comment

Hi, I also get this from time to time while (re)building a project - FBAlpha, https://github.com/barry65536/FBAlpha If anyone feels like trying to reproduce it, this should be all the info needed:

There are a couple of prereq's to get this to compile: nasm, from https://www.nasm.us/ (put exe in mingw/bin) DirectX 9 headers from the Windows DX DDK @ https://www.microsoft.com/en-us/download/details.aspx?id=6812 DDK doesn't need to be installed - just open the exe w/WinRAR (or other unpacker tool) and unpack the Includes directory into mingw/includes

now all that needs to be done is a "make mingw510" from the MingW shell. (if there is some other error, let me know - I might have forgotten something.) The "couldn't commit memory for cygwin heap" message happens in: 1: the older MingW w/gcc 4.8.1 from http://www.mingw.org/ 2: current MingW w/gcc 6.3.0 from https://osdn.net/projects/mingw/ (using the current mingw installer) 3: the above 6.3.0 version upgraded manually by downloading the gcc 8.2.0, binutils and a bunch of other files on https://osdn.net/projects/mingw/

Info about my computers: P4 3.0ghz, WinXP, 2gig ram w/AVG antivirus and Zonealarm. i7 2600 3.4ghz, Win7 8gig ram, Mcafee Virusscan Enterprise

2019-12-11 17:46 Updated by: darksectordds
Comment

I have same issue when i tryed to compile gcc 8.2.0 through msys.

AMD-FX(tm)-8300 3.70GHz 12 gigabyte Windows 10(x64) 1809 17763.864.

Part of the log

Checking multilib configuration for libgcc... mkdir -p -- psp/libgcc Configuring in psp/libgcc configure: creating cache ./config.cache ...<I deleted the extra data>... config.status: creating Makefile config.status: creating auto-target.h config.status: executing default commands Adding multilib support to Makefile in ../../../../gcc-8.2.0/libgcc multidirs= with_multisubdir= Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 Mode = sf\|df Suffix = si\|2\|3 D:\MyTest2\MinGW\_base_\msys\1.0\bin\make.exe: *** couldn't commit memory for cygwin heap, Win32 error 0 make1: *** all-target-libgcc Error 1 make: *** all Error 2

(Edited, 2019-12-11 17:55 Updated by: darksectordds)
2019-12-12 01:08 Updated by: darksectordds
Comment

Launched via debug flag -d

D:\MyTest2\MinGW\_base_\msys\1.0\bin\make.exe: *** couldn't commit memory for cygwin heap, Win32 error 0 Reaping losing child 0x0a090d10 PID 7316 make1: *** all-target-libgcc Error 1 Removing child 0x0a090d10 PID 7316 from chain. make1: Leaving directory /d/PSP/pspsdk_custom/minpsp-master/psp/build/gcc-8.2.0' Reaping losing child 0x0a03da10 PID 3316 make: *** all Error 2 Removing child 0x0a03da10 PID 3316 from chain.

It looks like there is a memory leak or checked some limitation.

2019-12-24 03:13 Updated by: cstrauss
Comment

Thank you for your feedback.

This error "couldn't commit memory for cygwin heap" usually happens when the emulated "fork" system call can't recreate the exact memory layout for a child process.

Besides rebasing the msys-1.0.dll and running rebaseall, I can only suggest removing any anti-virus software, since they are known to inject code into running DLLs, causing interference with the MSYS fork mechanism.

The original implementation of "fork" in MSYS comes from the Cygwin project. Meanwhile, Cygwin has evolved and is likely to have fewer problems regarding this error. I would be interested to know if MSYS2 (msys2.org), which closely tracks modern Cygwin, solves your issues. Note that MSYS2, like Cygwin, doesn't run in Windows 95 and XP.

Regards,

Cesar

Attachment File List

Edit

Please login to add comment to this ticket » Login