hughsk / flat

:steam_locomotive: Flatten/unflatten nested Javascript objects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

heap out of memory

ash0080 opened this issue · comments

<--- Last few GCs --->

[4742:0x110000000] 13658 ms: Mark-sweep 1388.1 (1425.4) -> 1387.6 (1425.4) MB, 94.9 / 0.0 ms (average mu = 0.144, current mu = 0.047) allocation failure GC in old space requested
[4742:0x110000000] 13907 ms: Mark-sweep 1387.6 (1425.4) -> 1387.6 (1425.9) MB, 233.0 / 0.0 ms (average mu = 0.095, current mu = 0.062) allocation failure GC in old space requested

<--- JS stacktrace --->

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

0: ExitFrame [pc: 0x1fd429adbe3d]

Security context: 0x350268d1e6e9
1: step [0x350214a022c9] [/Volumes/Root/Users/Elvis/Desktop/buybuybuy/project/packages/LoginService/node_modules/flat/index.js:~14] [pc=0x1fd42a19fcef](this=0x35020a88d461 ,object=0x350214a18891 <JSArray[15]>,prev=0x3502c1782229 <Very long string[3614]>,currentDepth=400)
2: step [0x350214a022c9] [/Volumes/Root/Users/Elvis/Desktop/buy...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x10003cf99 node::Abort() [/usr/local/bin/node]
2: 0x10003d1a3 node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
3: 0x1001b7835 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
4: 0x100585682 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node]
5: 0x100588155 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/usr/local/bin/node]
6: 0x100583fff v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
7: 0x1005821d4 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
8: 0x10058ea6c v8::internal::Heap::AllocateRawWithLigthRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/local/bin/node]
9: 0x10058eaef v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/local/bin/node]
10: 0x100573d8e v8::internal::Handlev8::internal::String v8::internal::Factory::AllocateInternalizedStringImpl<true, v8::internal::Handlev8::internal::String >(v8::internal::Handlev8::internal::String, int, unsigned int) [/usr/local/bin/node]
11: 0x1006d7ae5 v8::internal::InternalizedStringKey::AsHandle(v8::internal::Isolate*) [/usr/local/bin/node]
12: 0x1006c0a90 v8::internal::StringTable::AddKeyNoResize(v8::internal::Isolate*, v8::internal::StringTableKey*) [/usr/local/bin/node]
13: 0x1006c0430 v8::internal::StringTable::LookupString(v8::internal::Isolate*, v8::internal::Handlev8::internal::String) [/usr/local/bin/node]
14: 0x100240d50 v8::internal::LookupIterator::LookupIterator(v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Name, v8::internal::LookupIterator::Configuration) [/usr/local/bin/node]
15: 0x100675ce5 v8::internal::LookupIterator::PropertyOrElement(v8::internal::Isolate*, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, bool*, v8::internal::LookupIterator::Configuration) [/usr/local/bin/node]
16: 0x100803fd3 v8::internal::Runtime::SetObjectProperty(v8::internal::Isolate*, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, v8::internal::LanguageMode) [/usr/local/bin/node]
17: 0x100807863 v8::internal::Runtime_SetProperty(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
18: 0x1fd429adbe3d
19: 0x1fd42a19fcef

The same thing just happened to me as well. I am using winston-logsene library which has flat as a dependency. It mostly happens on app regular error where I am dumping a whole object. It certainly shouldn't be causing such wild crash, but I will surely limit on what I am going to be passing in there.

image

Does anyone have steps to reproduce this issue? Without a reproducible test case there is very little we can do to fix this problem.