Skip to content

OOM running acorn optimizer after closure in binaryen #24558

Open
@sbc100

Description

@sbc100
0 error(s), 1 warning(s), 49.3% typed

building:WARNING: (rerun with -g1 linker flag for an unminified output)

<--- Last few GCs --->

[2721157:0x420c3000]    18793 ms: Mark-Compact 4051.5 (4139.2) -> 4049.4 (4139.2) MB, pooled: 0 MB, 963.15 / 0.00 ms  (average mu = 0.229, current mu = 0.149) allocation failure; scavenge might not succeed
[2721157:0x420c3000]    20687 ms: Mark-Compact 4069.1 (4143.9) -> 4067.1 (4172.2) MB, pooled: 0 MB, 1745.82 / 0.00 ms  (average mu = 0.149, current mu = 0.078) allocation failure; GC in old space requested


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 0xe13fde node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/usr/local/google/home/sbc/dev/wasm/emsdk/node/22.16.0_64bit/bin/node]
 2: 0x11d5070 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/usr/local/google/home/sbc/dev/wasm/emsdk/node/22.16.0_64bit/bin/node]
 3: 0x11d5347 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/usr/local/google/home/sbc/dev/wasm/emsdk/node/22.16.0_64bit/bin/node]
 4: 0x1402c05  [/usr/local/google/home/sbc/dev/wasm/emsdk/node/22.16.0_64bit/bin/node]
 5: 0x141c499 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/google/home/sbc/dev/wasm/emsdk/node/22.16.0_64bit/bin/node]
 6: 0x13f0b48 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/google/home/sbc/dev/wasm/emsdk/node/22.16.0_64bit/bin/node]
 7: 0x13f1a75 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/google/home/sbc/dev/wasm/emsdk/node/22.16.0_64bit/bin/node]
 8: 0x13ca74e v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/local/google/home/sbc/dev/wasm/emsdk/node/22.16.0_64bit/bin/node]
 9: 0x182bef0 v8::internal::Runtime_AllocateInOldGeneration(int, unsigned long*, v8::internal::Isolate*) [/usr/local/google/home/sbc/dev/wasm/emsdk/node/22.16.0_64bit/bin/node]
10: 0x7f5de3eac476 
em++: error: '/usr/local/google/home/sbc/dev/wasm/emsdk/node/22.16.0_64bit/bin/node --stack-size=8192 /usr/local/google/home/sbc/dev/wasm/emscripten/tools/acorn-optimizer.mjs /tmp/tmpxzv0_h64.cc.js.wasm2js.js.modular.js --minify-whitespace --export-es6 -o /tmp/tmpxzv0_h64.cc.js.wasm2js.js.modular.jso5.js' failed (received SIGABRT (-6))
ninja: build stopped: subcommand failed.

Even if I do export NODE_OPTIONS=--max_old_space_size=8096 I end up hitting another limit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions