Skip to content

CLI10: got a few compiler crashes today with "JavaScript heap out of memory" #18034

Closed
@ldex

Description

@ldex

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was Angular 9 with CLI 9.

Description

Small project freshly migrated from ng9 to 10, I sometimes get a compiler crash with "JavaScript heap out of memory" during ng serve.
It never happened to me before ng 10.

Project is available here:
https://github.com/ldex/Angular-Academy-202

🔥 Exception or Error


<--- Last few GCs --->

[1308:00000253CB798AB0] 11379648 ms: Scavenge 2033.1 (2051.3) -> 2032.1 (2051.3) MB, 5.4 / 0.0 ms  (average mu = 0.125, current mu = 0.067) allocation failure
[1308:00000253CB798AB0] 11379665 ms: Scavenge 2033.1 (2051.3) -> 2032.2 (2051.3) MB, 8.2 / 0.1 ms  (average mu = 0.125, current mu = 0.067) allocation failure
[1308:00000253CB798AB0] 11379824 ms: Scavenge 2033.5 (2051.6) -> 2032.6 (2051.6) MB, 5.4 / 0.0 ms  (average mu = 0.125, current mu = 0.067) allocation failure

<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 00007FF6513377DD]
    1: StubFrame [pc: 00007FF6513388D3]
Security context: 0x00c2be6408d1 
    2: formatLocation(aka formatLocation) [00000377970C75D1] [C:\Users\beep\Desktop\DemoApp\node_modules\webpack\lib\formatLocation.js:~41] [pc=000001471AADB4D8](this=0x012e6a0404b1 ,0x002fb6ac6cd1 
SourceLocation map = 00    3: /* anonymous */(aka /* anonymous */) [000003C749112FE1] [C

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF65072470F napi_wrap+113583
 2: 00007FF6506CF7D6 v8::base::CPU::has_sse+66646
 3: 00007FF6506D05D6 v8::base::CPU::has_sse+70230
 4: 00007FF650EE42EE v8::Isolate::ReportExternalAllocationLimitReached+94
 5: 00007FF650ECC3C1 v8::SharedArrayBuffer::Externalize+833
 6: 00007FF650D9890C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436 7: 00007FF650DA3B40 v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312
 8: 00007FF650DA0664 v8::internal::Heap::PageFlagsAreConsistent+3204
 9: 00007FF650D95E63 v8::internal::Heap::CollectGarbage+1283
10: 00007FF650D944D4 v8::internal::Heap::AddRetainedMap+2452
11: 00007FF650DB56DD v8::internal::Factory::NewFillerObject+61
12: 00007FF650B1BF61 v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+1665
13: 00007FF6513377DD v8::internal::SetupIsolateDelegate::SetupHeap+546637
14: 00007FF6513388D3 v8::internal::SetupIsolateDelegate::SetupHeap+550979
15: 000001471AADB4D8

🌍 Your Environment




Angular CLI: 10.0.0
Node: 12.18.0
OS: win32 x64

Angular: 10.0.0
... animations, cli, common, compiler, compiler-cli, core, forms     
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.0
@angular-devkit/build-angular     0.1000.0
@angular-devkit/build-optimizer   0.1000.0
@angular-devkit/build-webpack     0.1000.0
@angular-devkit/core              10.0.0
@angular-devkit/schematics        10.0.0
@ngtools/webpack                  10.0.0
@schematics/angular               10.0.0
@schematics/update                0.1000.0
rxjs                              6.5.5
typescript                        3.9.5
webpack                           4.43.0

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions