Skip to content

After migrating from ng 9 to 10 I get an error "JavaScript heap out of memory" during compilation!! #18026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kasarda opened this issue Jun 25, 2020 · 3 comments
Labels
needs: more info Reporter must clarify the issue

Comments

@kasarda
Copy link

kasarda commented Jun 25, 2020

🐞 bug report

Description

After migrating from ng 9 to 10 I sometimes get an error "JavaScript heap out of memory". I've never had this problem before ng 10. Also, the compilation takes more time than usual.

🔥 Exception or Error


<--- Last few GCs --->

[2747:0x1045db000]  3591806 ms: Mark-sweep 2025.9 (2081.7) -> 2013.2 (2083.5) MB, 2870.8 / 0.0 ms  (average mu = 0.101, current mu = 0.012) allocation failure scavenge might not succeed
[2747:0x1045db000]  3594247 ms: Mark-sweep 2028.9 (2083.5) -> 2016.9 (2084.0) MB, 2284.6 / 0.0 ms  (average mu = 0.083, current mu = 0.064) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x101231485 node::Abort() (.cold.1) [/usr/local/bin/node]
 2: 0x10009e059 node::Abort() [/usr/local/bin/node]
 3: 0x10009e1bf node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
 4: 0x1001da207 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
 5: 0x1001da1a7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
 6: 0x10036aed5 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node]
 7: 0x10036c74a v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/usr/local/bin/node]
 8: 0x100368717 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
 9: 0x100366117 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
10: 0x1003733ba v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]
11: 0x100373441 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]
12: 0x10033cd41 v8::internal::FactoryBase::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Map, v8::internal::AllocationAlignment) [/usr/local/bin/node]
13: 0x10033f839 v8::internal::Factory::NewByteArray(int, v8::internal::AllocationType) [/usr/local/bin/node]
14: 0x1002edd31 v8::internal::TranslationBuffer::CreateByteArray(v8::internal::Factory*) [/usr/local/bin/node]
15: 0x100f8cb2d v8::internal::compiler::CodeGenerator::GenerateDeoptimizationData() [/usr/local/bin/node]
16: 0x100f8c977 v8::internal::compiler::CodeGenerator::FinalizeCode() [/usr/local/bin/node]
17: 0x101172155 void v8::internal::compiler::PipelineImpl::Run() [/usr/local/bin/node]
18: 0x101166dac v8::internal::compiler::PipelineImpl::FinalizeCode(bool) [/usr/local/bin/node]
19: 0x101166c6b v8::internal::compiler::PipelineCompilationJob::FinalizeJobImpl(v8::internal::Isolate*) [/usr/local/bin/node]
20: 0x1002a4431 v8::internal::Compiler::FinalizeOptimizedCompilationJob(v8::internal::OptimizedCompilationJob*, v8::internal::Isolate*) [/usr/local/bin/node]
21: 0x1002c1e9b v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions() [/usr/local/bin/node]
22: 0x1003252e4 v8::internal::StackGuard::HandleInterrupts() [/usr/local/bin/node]
23: 0x1006a5e97 v8::internal::Runtime_StackGuardWithGap(int, unsigned long*, v8::internal::Isolate*) [/usr/local/bin/node]
24: 0x1009eb8d9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/usr/local/bin/node]
25: 0x27b14751af72 
26: 0x1009844b8 Builtins_InterpreterEntryTrampoline [/usr/local/bin/node]
27: 0x27b147bab484 
28: 0x1009844b8 Builtins_InterpreterEntryTrampoline [/usr/local/bin/node]
zsh: abort      npm start

🌍 Your Environment

Angular Version:


Angular CLI: 9.0.1
Node: 14.3.0
OS: darwin x64

Angular: 
... 
Ivy Workspace: 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.900.1
@angular-devkit/core         9.0.1
@angular-devkit/schematics   9.0.1
@schematics/angular          9.0.1
@schematics/update           0.900.1
rxjs                         6.5.3
@petebacondarwin petebacondarwin transferred this issue from angular/angular Jun 25, 2020
@alan-agius4
Copy link
Collaborator

@kasarda, can you provide the output of ng version after the update? As it seems that you provided the output before the update.

Also, is there a way to share the project even privately?, as without a reproduction it's hard to tell what's the culprit.

In addition you mentioned that the compilation is taking more time than before, can you please provide some timings?

Thanks.

@alan-agius4 alan-agius4 added the needs: more info Reporter must clarify the issue label Jun 25, 2020
@alan-agius4
Copy link
Collaborator

Let’s continue tracking this #18034 since there is a reproduction.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: more info Reporter must clarify the issue
Projects
None yet
Development

No branches or pull requests

2 participants