Building aio predocs produces JavaScript heap out of memory
See original GitHub issueDocs or angular.io Bug Report
Description
When doing aio build specifically in the predocs
part in the generate-stackblitz
step after a long time the build fails with
FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
Minimal Reproduction
Just try to build aio
What’s the affected URL?**
https://github.com/angular/angular/tree/master/aio
Reproduction Steps**
Try to build aio or just run npm run predocs
or npm run generate-stackblitz
Expected vs Actual Behavior**
the expected behavior is and actual behavior is
Screenshot
Exception or Error
$ node ./tools/stackblitz-builder/generateStackblitz
<--- Last few GCs --->
[22369:0x1048f3000] 7381236 ms: Mark-sweep (reduce) 8161.4 (8214.7) -> 8160.6 (8214.7) MB, 33663.6 / 0.0 ms (average mu = 0.096, current mu = 0.000) allocation failure scavenge might not succeed
[22369:0x1048f3000] 7400495 ms: Mark-sweep (reduce) 8161.6 (8211.7) -> 8161.3 (8213.4) MB, 19249.3 / 0.0 ms (average mu = 0.061, current mu = 0.001) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x10130d6e5 node::Abort() (.cold.1) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
2: 0x1000b1c49 node::Abort() [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
3: 0x1000b1daf node::OnFatalError(char const*, char const*) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
4: 0x1001f60f7 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
5: 0x1001f6093 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
6: 0x1003a54f5 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
7: 0x1003a6fba v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
8: 0x1003a2689 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
9: 0x10039ff21 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
10: 0x1003ae7da v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
11: 0x1003ae861 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
12: 0x10037bf12 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
13: 0x1006fc158 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
14: 0x100a893d9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/antoniocardenas/.nvm/versions/node/v14.17.0/bin/node]
error Command failed with signal "SIGABRT".
Your Environment
Angular CLI: 12.0.4 Node: 14.17.0 Package Manager: yarn 1.22.10 OS: Darwin x64
Browser info
Anything else relevant?
I tried to fix it using node --max_old_space_size=X
in node ./tools/stackblitz-builder/generateStackblitz But it does not work .
I used as a reference this commit https://github.com/angular/angular/commit/1e740581ee3da305014b5dd2fec3fce79fb2d025
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top GitHub Comments
Same is true for Super Productivity: https://github.com/johannesjo/super-productivity/runs/2990167244?check_suite_focus=true
Looks like this issue is related: https://github.com/angular/angular-cli/issues/21041?_pjax=%23js-repo-pjax-container
And this possibly too: https://github.com/angular/angular-cli/issues/20801
As a sidenote, the docs in
aio/aio-builds-setup/docs/
are related to a different thing (the preview server) and should not be needed for building AIO locally. (Of course, the instructions for setting up docker are similar if that’s what you want to do, but the bulk of docs in that directory are specific to the preview server, which is completely independent of the rest of AIO.)If you are looking for a
Dockerfile
for working with the Angular repo in docker, you would be better off using .devcontainer/recommended-Dockerfile.