Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Unit tests fail with JavaScript heap out of memory #562

Closed
slaweet opened this issue Aug 7, 2017 · 0 comments
Closed

Unit tests fail with JavaScript heap out of memory #562

slaweet opened this issue Aug 7, 2017 · 0 comments
Assignees

Comments

@slaweet
Copy link
Contributor

slaweet commented Aug 7, 2017

Lately, I've seen the following error a lot. Especially on npm run test-live.
It must have been by something merged in past week or so. It might be worth to use git bisect to find the commit at fault.
https://stackoverflow.com/questions/4713088/how-to-use-git-bisect

<--- Last few GCs --->

[17500:0x103801600]    59700 ms: Mark-sweep 1392.5 (1562.7) -> 1392.5 (1554.7) MB, 204.3 / 0.0 ms  allocation failure GC in old space requested
[17500:0x103801600]    59931 ms: Mark-sweep 1392.5 (1554.7) -> 1392.5 (1499.2) MB, 231.1 / 0.0 ms  last resort
[17500:0x103801600]    60154 ms: Mark-sweep 1392.5 (1499.2) -> 1392.4 (1481.2) MB, 222.7 / 0.0 ms  last resort


<--- JS stacktrace --->

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

Security context: 0x8b0efba6729 <JS Object>
    1: toString [buffer.js:~496] [pc=0x9d2c8cf40aa](this=0x2c2cbaf67569 <an Uint8Array with map 0x1e575176bbe1>)
    2: /* anonymous */(aka /* anonymous */) [/Users/slaweet/git/lisk-nano/node_modules/karma-webpack/lib/karma-webpack.js:254] [pc=0x9d2caae378f](this=0x90b51302311 <undefined>,err=0x90b51302311 <undefined>,content=0x2c2cbaf67569 <an Uint8Array with map 0x1e575176bbe1>)
    3: /* anon...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/usr/local/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [/usr/local/bin/node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/usr/local/bin/node]
 6: v8::internal::Factory::NewStringFromUtf8(v8::internal::Vector<char const>, v8::internal::PretenureFlag) [/usr/local/bin/node]
 7: v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::String::NewStringType, int) [/usr/local/bin/node]
 8: node::StringBytes::Encode(v8::Isolate*, char const*, unsigned long, node::encoding) [/usr/local/bin/node]
 9: void node::Buffer::StringSlice<(node::encoding)1>(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
10: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/local/bin/node]
11: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
12: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
13: 0x9d2c68843a7
14: 0x9d2c8cf40aa
15: 0x9d2caae378f
Abort trap: 6
@slaweet slaweet self-assigned this Aug 7, 2017
slaweet added a commit that referenced this issue Aug 8, 2017
Fix unit tests JavaScript heap out of memory error - Closes #562
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant