Closed Bug 1309541 Opened 9 years ago Closed 9 years ago

unable to start cygwin from mozillabuild: Couldn't reserve space for cygwin's heap, Win32 error 0

Categories

(Firefox Build System :: MozillaBuild, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: jmaher, Unassigned)

Details

this worked great for me yesterday, I woke up this morning and the OS had done a restart after installing updates. I had rebooted about 2 days ago for another system change I had made, so most likely this is related to the windows update changes. I try to start the shell and see this: C:\mozilla-build>start-shell-msvc2015-x64.bat 0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487 AllocationBase 0xD80000, BaseAddress 0xDC0000, RegionSize 0x1BD000, State 0x2000 C:\mozilla-build\msys\bin\bash.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0 on doing this again, I see this: C:\mozilla-build>start-shell-msvc2015-x64.bat MozillaBuild Install Directory: C:\mozilla-build\ Visual C++ 2015 Directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ Windows SDK Directory: C:\Program Files (x86)\Windows Kits\8.1\ Using the MSVC 2015 64-bit toolchain. 0 [main] bash -11552 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION 455 [main] bash -11552 open_stackdumpfile: Dumping stack trace to bash.exe.stackdump 0 [main] bash 7072 sync_with_child: child 11552(0x260) died before initialization with status code 0xFF 2792 [main] bash 7072 sync_with_child: *** child state waiting for longjmp bash: fork: Resource temporarily unavailable bash-3.1$ I would expect our toolchains to be more up to date. This is the latest mozilla-build.exe package (installed about 4 weeks ago on a brand new machine). the updates I installed were: Security Update for Adobe Flash Player for Windows 10 Version 1607 (for x64-based Systems) (KB3194343) Cumulative Update for Windows 10 Version 1607 for x64-based Systems (KB3194798) Windows Malicious Software Removal Tool for Windows 8, 8.1, 10 and Windows Server 2012, 2012 R2 x64 Edition - October 2016 (KB890830) I would expect all developers on windows 10 would experience this same problem.
uninstalling KB3194798 resolved my problem- I am not sure of the correct solution going forward, maybe regenerating the cygwin or bash binaries on an updated operating system?
Component: Build Config → MozillaBuild
Product: Firefox → mozilla.org
Version: unspecified → other
interesting, I imagine that might do the trick. I couldn't find rebase- and looking online it is hard to determine where to get that.
We normally do the rebase during MSYS packaging. http://hg.mozilla.org/mozilla-build/file/tip/packageit.sh#l68
sorry, should have pointed at line 55
I'm on the Windows 10 Insider update channel, and I got updated to an insider preview build that's causing this same error. :-/
I was able to fix it by rebasing, I had msys2 installed and I ran: cd /c/mozilla-build/msys/bin/ rebase --32 -b 0x70100000 msys-1.0.dll
I don't think there's really much that can be done here, especially since MozillaBuild is basically EOL at this point.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
I hit this just now. Apparently msys-1.0.dll is trying to allocate its "cygwin's heap" space directly after the msys-1.0.dll image in memory (why??). On this particular boot, ASLR happened to put my wow64*.dll's at that address, so the allocation failed. On my next boot I had a different memory layout and things were fine. I think this is just luck of the draw. Rebasing may fix the problem within a particular boot if you really don't want to restart your machine, but you'll still be equally prone to collision next time. Ideally msys wouldn't depend on such a specific memory organization. Or if we had a 64-bit bash.exe then that would at least take the wow64 DLL's out of the picture. But yeah, it seems more likely that we'd replace MozillaBuild altogether before either of those things happens.
Product: mozilla.org → Firefox Build System
You need to log in before you can comment on or make changes to this bug.