Skip to content

Instantly share code, notes, and snippets.

@jhuckaby
Created October 6, 2019 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhuckaby/cb0ac839cd704ec28b122555fe8c8bf8 to your computer and use it in GitHub Desktop.
Save jhuckaby/cb0ac839cd704ec28b122555fe8c8bf8 to your computer and use it in GitHub Desktop.
Node.js ES6 Map crash after 15 million keys
<--- Last few GCs --->
[4433:0x3dc6880] 104473 ms: Scavenge 2019.9 (2024.9) -> 2019.2 (2030.1) MB, 29.9 / 0.0 ms (average mu = 0.297, current mu = 0.284) allocation failure
[4433:0x3dc6880] 104641 ms: Scavenge 2022.8 (2030.1) -> 2021.0 (2031.1) MB, 25.6 / 0.0 ms (average mu = 0.297, current mu = 0.284) allocation failure
[4433:0x3dc6880] 104766 ms: Scavenge 2023.7 (2031.1) -> 2022.3 (2032.9) MB, 40.8 / 0.0 ms (average mu = 0.297, current mu = 0.284) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x136d539]
Security context: 0x2ea3b30808a1 <JSObject>
1: set [0x2ea3b30864c1](this=0x209a093e9129 <Map map = 0xe84f1140ed1>,0x1cd6de945a59 <String[8]: 14586380>,0x1b9680b6b981 <Uint8Array map = 0xe84f1165191>)
2: /* anonymous */ [0x3c605a883439] [/home/jhuckaby/megahash/bench-es6map-reads.js:~1] [pc=0x2d1e8010fcc6](this=0x3c605a8834d1 <Object map = 0xe84f1140431>,0x3c605a8834d1 <Object map = 0xe84f1140431>,0...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x9d33e0 node::Abort() [node]
2: 0x9d4596 node::OnFatalError(char const*, char const*) [node]
3: 0xb32dbe v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xb33139 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xcde455 [node]
6: 0xcdeae6 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
7: 0xcea97a v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
8: 0xceb885 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
9: 0xcecf2f v8::internal::Heap::HandleGCRequest() [node]
10: 0xc9bf14 v8::internal::StackGuard::HandleInterrupts() [node]
11: 0xfea7e7 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x136d539 [node]
Aborted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment