Skip to content

Causes webpack to run out of heap when building #30

Open
@dllz

Description

@dllz

Hi there.

When I include your plugin in my webpack.config.js file and run build I get a Javascript heap out of memory exception.

When I provide the --max_old_space_size argument and give it 10GB of ram it just builds to what seems infinity.

Stacktrace:
WEBPACK_ENV=build webpack

Warning (worker-plugin): output.globalObject is set to "window". It must be set to "self" to support HMR in Workers.
[BABEL] Note: The code generator has deoptimised the styling of /home/daniel/Documents/Dynex/Canvas/canvas.iron.js/src/components/data/changeFocusHolder.js as it exceeds the max of 500KB.

<--- Last few GCs --->
art of marking 194 ms) (average mu = 0.198, current mu = 0.079) allocation[10962:0x3598210] 290153 ms: Mark-sweep 2045.5 (2052.8) -> 2043.0 (2050.6) MB, 163.7 / 0.0 ms (+ 0.0 ms in 31 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 178 ms) (average mu = 0.144, current mu = 0.079) allocation[10962:0x3598210] 290433 ms: Mark-sweep 2043.0 (2050.6) -> 2043.0 (2050.6) MB, 248.2 / 0.0 ms (average mu = 0.126, current mu = 0.113) allocation failure GC in old space requested

<--- JS stacktrace --->

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

0: ExitFrame [pc: 0x13162b9]
1: StubFrame [pc: 0x13718dc]

Security context: 0x35a54a940911
2: walkExpressions [0x2d890b3a71d1] [/home/daniel/Documents/Dynex/Canvas/canvas.iron.js/node_modules/webpack/lib/Parser.js:1475] [bytecode=0x20b4258b8f81 offset=69](this=0x29546e2436a1 ,0x3fec23d59ed9 <JSArray[1]>)
3: walkCallExpression [0x2d890b3a76a1] [/home/daniel/Documents/Dynex/Canvas/can...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x9aedf0 node::Abort() [node]
2: 0x9aff86 node::OnFatalError(char const*, char const*) [node]
3: 0xb078ce v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xb07c49 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xce4ae5 [node]
6: 0xcf032b v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
7: 0xcf1047 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
8: 0xcf3b78 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
9: 0xcc1b5f v8::internal::Factory::NewByteArray(int, v8::internal::AllocationType) [node]
10: 0xc4419a v8::internal::TranslationBuffer::CreateByteArray(v8::internal::Factory*) [node]
11: 0x191fe07 v8::internal::compiler::CodeGenerator::GenerateDeoptimizationData() [node]
12: 0x1920502 v8::internal::compiler::CodeGenerator::FinalizeCode() [node]
13: 0x1993abd v8::internal::compiler::PipelineImpl::FinalizeCode(bool) [node]
14: 0x1994b60 v8::internal::compiler::PipelineCompilationJob::FinalizeJobImpl(v8::internal::Isolate*) [node]
15: 0xc06ea0 v8::internal::Compiler::FinalizeOptimizedCompilationJob(v8::internal::OptimizedCompilationJob*, v8::internal::Isolate*) [node]
16: 0xc00766 v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions() [node]
17: 0xc8ae5c v8::internal::StackGuard::HandleInterrupts() [node]
18: 0xf93ba7 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [node]
19: 0x13162b9 [node]
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] build: WEBPACK_ENV=build webpack --max_old_space_size=10000
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/daniel/.npm/_logs/2019-07-05T11_46_34_789Z-debug.log

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