Open Bug 1667331 Opened 4 years ago Updated 4 years ago

Windows build fails with error: Couldn't reserve space for cygwin's heap

Categories

(NSPR :: NSPR, defect)

defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: abuyan78, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36

Steps to reproduce:

I tried to build the NSS Tools as described here:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Building
I have VS 2019 Enterprise edition. I have installed Windows Prerequisites including MozillaBuild. I downloaded nss-3.57-with-nspr-4.29.tar.gz from here (https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_57_RTM/src/) and unpacked them to the folder c:\build\nss-3.57.
After that, I started C:\mozilla-build\start-shell.bat, moved to c:\build\nss-3.57 and try to execute nss/build.sh command.

I tried on different machines (Win 10 x64, Win 7) and got the same result everywhere.

Actual results:

$ nss/build.sh -v
NSPR [1/5] configure ...
../configure --prefix=/c/build/nss-3.57/dist/Debug --enable-64bit
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for cl... cl
configure: WARNING: Unknown version of the Microsoft (R) Manifest Tool.
configure: creating ./config.status
m.AllocationBase 0x0, m.BaseAddress 0x607A0000, m.RegionSize 0x150000, m.State 0x10000
C:\mozilla-build\msys\bin\sh.exe: *** Couldn't reserve space for cygwin's heap (0x607A0000 <0xBD0000>) in child, Win32 error 0
0 [main] sh 21836 sync_with_child: child 25456(0x2C4) died before initialization with status code 0x1
152 [main] sh 21836 sync_with_child: *** child state waiting for longjmp
../configure: fork: Resource temporarily unavailable
m.AllocationBase 0x0, m.BaseAddress 0x607A0000, m.RegionSize 0x340000, m.State 0x10000
C:\mozilla-build\msys\bin\sh.exe: *** Couldn't reserve space for cygwin's heap (0x607A0000 <0xC70000>) in child, Win32 error 0
0 [main] sh 12756 sync_with_child: child 17760(0x21C) died before initialization with status code 0x1
183 [main] sh 12756 sync_with_child: *** child state waiting for longjmp
../configure: fork: Resource temporarily unavailable

Expected results:

Build completed successfully

Hi, it really seems like a memory exhaustion to me. Any chance that you are running this in a VM? If yes, could you share the config?

Flags: needinfo?(abuyan78)

Yeah, looks that way to me, too. I can't make this reproduce, and this is a supported setup -- our CI for Windows does this exact thing with msys for one of the build types.

FWIW, it's also failing in NSPR, not NSS, but I really do think this isn't the build system but rather something weird happening in the config. I know, you tried different machines, but uh, I don't know? Maybe if not the machine config and if not NSPR, it's mozilla-build?

Assignee: nobody → nobody
Component: Build → NSPR
Product: NSS → NSPR
QA Contact: jjones
Version: 3.57 → other

(In reply to Benjamin Beurdouche [:beurdouche] from comment #1)

Hi, it really seems like a memory exhaustion to me. Any chance that you are running this in a VM? If yes, could you share the config?

No, I'm trying to install on a physical machine. But I also tried on VM too and receive the same error.

Flags: needinfo?(abuyan78)

(In reply to J.C. Jones [:jcj] (he/him) [increased latency due to COVID-19] from comment #2)

Yeah, looks that way to me, too. I can't make this reproduce, and this is a supported setup -- our CI for Windows does this exact thing with msys for one of the build types.

FWIW, it's also failing in NSPR, not NSS, but I really do think this isn't the build system but rather something weird happening in the config. I know, you tried different machines, but uh, I don't know? Maybe if not the machine config and if not NSPR, it's mozilla-build?

I'm sorry for the delay with the answer. I looked for the config.log of nspr build and found that it contains the following error:

configure:2541: checking for cl
configure:2557: found /c/Program Files (x86)/Microsoft Visual Studio 2019/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl
configure:2568: result: cl
configure:5850: cl -c   conftest.c >&5
conftest.c
conftest.c(14): error C2065: '__thumb2__': undeclared identifier
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29111 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

configure:5850: $? = 2
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define DEBUG 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| return sizeof(__thumb2__);
|   ;
|   return 0;
| }

It seems that the issue is related to my computer configuration (when I wrote that I tried on the different machines I meant that I tried to run the build on VM machines which are hosted on my computer). Yesterday I tried on another physical machine under Win10 and the build was successful.

You need to log in before you can comment on or make changes to this bug.