Skip to content
This repository was archived by the owner on Jan 14, 2020. It is now read-only.
This repository was archived by the owner on Jan 14, 2020. It is now read-only.

Memory leak / JavaScript heap out of memory #92

@IlyaSemenov

Description

@IlyaSemenov

I get this (or similar) every few hours of running ream dev:

<--- Last few GCs --->

[11102:0x105000000] 22881587 ms: Mark-sweep 1379.7 (1426.5) -> 1379.6 (1429.0) MB, 520.9 / 0.0 ms  allocation failure GC in old space requested
[11102:0x105000000] 22882282 ms: Mark-sweep 1379.6 (1429.0) -> 1379.6 (1411.0) MB, 694.6 / 0.0 ms  last resort GC in old space requested
[11102:0x105000000] 22882916 ms: Mark-sweep 1379.6 (1411.0) -> 1379.6 (1411.0) MB, 634.6 / 0.0 ms  last resort GC in old space requested


<--- JS stacktrace --->

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

    0: ExitFrame [pc: 0x38888d80427d]
Security context: 0x168246620769 <JSObject>
    1: fromString(aka fromString) [buffer.js:349] [bytecode=0x1682cccd5a81 offset=148](this=0x1682db2822e1 <undefined>,string=0x1682f8ec0671 <Very long string[2015095]>,encoding=0x168246632879 <String[4]: utf8>)
    2: from [buffer.js:201] [bytecode=0x1682cccd5601 offset=11](this=0x168279046b39 <JSFunction Buffer (sfi = 0x168206f0a441)>,value=0x1682f8ec0671 ...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/usr/local/Cellar/node/10.3.0/bin/node]
 2: node::OnFatalError(char const*, char const*) [/usr/local/Cellar/node/10.3.0/bin/node]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [/usr/local/Cellar/node/10.3.0/bin/node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/Cellar/node/10.3.0/bin/node]
 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/usr/local/Cellar/node/10.3.0/bin/node]
 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [/usr/local/Cellar/node/10.3.0/bin/node]
 7: v8::String::WriteUtf8(char*, int, int*, int) const [/usr/local/Cellar/node/10.3.0/bin/node]
 8: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Local<v8::Value>, node::encoding, int*) [/usr/local/Cellar/node/10.3.0/bin/node]
 9: node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) [/usr/local/Cellar/node/10.3.0/bin/node]
10: node::Buffer::(anonymous namespace)::CreateFromString(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/Cellar/node/10.3.0/bin/node]
11: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/Cellar/node/10.3.0/bin/node]
12: 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/Cellar/node/10.3.0/bin/node]
13: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/Cellar/node/10.3.0/bin/node]
14: 0x38888d80427d
15: 0x38888d8144f7
16: 0x38888d8144f7
17: 0x38888d80cac3
18: 0x38888d8144f7
19: 0x38888d80cac3
20: 0x38888d8144f7
21: 0x38888d8144f7
error Command failed with signal "SIGABRT".

I have never seen anything similar on any other Node.js project (including vue-cli or nuxt). I tried upgrading from Node 10.0 to Node 10.3 and it made no difference.

I understand that unless you can repeat this, there's not much use of this report. I wanted to leave it there just in case if other people start getting this too, we could at least boldly confirm the issue, or even coordinate somehow.

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