This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Understand why Webpack is running out of Memory #683
Closed
Description
Currently, CI fails with:
Test Browser
<--- Last few GCs --->
332336 ms: Mark-sweep 1341.7 (1418.5) -> 1335.0 (1416.2) MB, 403.5 / 0.0 ms [allocation failure] [GC in old space requested].
332750 ms: Mark-sweep 1335.0 (1416.2) -> 1335.0 (1416.2) MB, 414.8 / 0.0 ms [allocation failure] [GC in old space requested].
333142 ms: Mark-sweep 1335.0 (1416.2) -> 1335.0 (1401.2) MB, 391.3 / 0.0 ms [last resort gc].
333522 ms: Mark-sweep 1335.0 (1401.2) -> 1335.0 (1401.2) MB, 380.5 / 0.0 ms [last resort gc].
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x25fbd6fcf781 <JS Object>
1: toString [buffer.js:490] [pc=0x83681c5517c] (this=0x3368e86806a9 <an Uint8Array with map 0x580e41ffe69>)
2: /* anonymous */(aka /* anonymous */) [/home/travis/build/ipfs/js-ipfs-api/node_modules/karma-webpack/lib/karma-webpack.js:255] [pc=0x83681e0f89f] (this=0x25fbd6f04381 <undefined>,err=0x25fbd6f04381 <undefined>,content=0x3368e86806a9 <an Uint8Array with map 0x580e41ffe69>)
3...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x10a03cc [node]
3: v8::Utils::ReportApiFailure(char const*, char const*) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]
6: v8::internal::Factory::NewStringFromUtf8(v8::internal::Vector<char const>, v8::internal::PretenureFlag) [node]
7: v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::String::NewStringType, int) [node]
8: node::StringBytes::Encode(v8::Isolate*, char const*, unsigned long, node::encoding) [node]
9: void node::Buffer::StringSlice<(node::encoding)1>(v8::FunctionCallbackInfo<v8::Value> const&) [node]
10: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node]
11: 0x9ee7fe [node]
12: 0x9ef09e [node]
13: 0x8367fb092a7
Aborted (core dumped)
This issue was created with the upgrade to the new ipfsd-ctl. The cause is that WebPack is trying to bundle multiple versions of the ipfs-api into the client that spawns nodes in the browser, making it run out of memory.
@dryajov wanna take the lead on fixing this given your work on ipfsd-ctl?