[Bug] Node.js Heap Out of Memory Error During Garbage Collection

Resolved 💬 3 comments Opened Aug 24, 2025 by certmanca Closed Aug 27, 2025

Bug Description
<--- Last few GCs --->

[1120:0x7f77bab0a000] 10849691 ms: Mark-Compact 2043.1 (2052.3) -> 2041.1 (2052.5) MB, pooled: 0 MB, 231.39 / 0.00 ms (average mu = 0.156, current mu = 0.104) allocation failure; scavenge might not succeed
[1120:0x7f77bab0a000] 10849933 ms: Mark-Compact 2043.3 (2052.5) -> 2041.3 (2052.8) MB, pooled: 0 MB, 240.97 / 0.00 ms (average mu = 0.087, current mu = 0.007) allocation failure; scavenge might not succeed

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

1: 0x110df4e89 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/usr/local/Cellar/node/24.2.0/bin/node]
2: 0x10fabd01b v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, v8::OOMDetails const&) [/usr/local/Cellar/node/24.2.0/bin/node]
3: 0x10fabcfdc v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, v8::OOMDetails const&) [/usr/local/Cellar/node/24.2.0/bin/node]
4: 0x10fc9985f v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/Cellar/node/24.2.0/bin/node]
5: 0x10fc9c26c v8::internal::Heap::OldGenerationConsumedBytes() const [/usr/local/Cellar/node/24.2.0/bin/node]
6: 0x10fc9c0f1 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector, v8::base::TimeTicks) [/usr/local/Cellar/node/24.2.0/bin/node]
7: 0x10fcaa7a5 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1::operator()() const [/usr/local/Cellar/node/24.2.0/bin/node]
8: 0x10fcaa435 void heap::base::Stack::SetMarkerAndCallbackImpl<v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1>(heap::base::Stack, void, void const*) [/usr/local/Cellar/node/24.2.0/bin/node]
9: 0x110435352 PushAllRegistersAndIterateStack [/usr/local/Cellar/node/24.2.0/bin/node]
10: 0x10fc97d6d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/Cellar/node/24.2.0/bin/node]
11: 0x10fc8f1c5 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/24.2.0/bin/node]
12: 0x10fc760b1 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/local/Cellar/node/24.2.0/bin/node]
13: 0x110013cac v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long, v8::internal::Isolate) [/usr/local/Cellar/node/24.2.0/bin/node]
14: 0x110502876 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [/usr/local/Cellar/node/24.2.0/bin/node]
zsh: abort /Users/william/.claude/local/claude

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.89
  • Feedback ID: cc722865-66d5-4d44-bbc4-c6d3c0c08bdf

Errors

[{"error":"SyntaxError: Expected ',' or '}' after property value in JSON at position 726 (line 24 column 3)\n    at JSON.parse (<anonymous>)\n    at file:///Users/william/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:712:9932\n    at Q (file:///Users/william/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:671:13339)\n    at M90 (file:///Users/william/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:751:5575)\n    at tG (file:///Users/william/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:751:2938)\n    at file:///Users/william/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:751:32849\n    at Array.flatMap (<anonymous>)\n    at kW4 (file:///Users/william/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:751:32836)\n    at GL (file:///Users/william/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:751:32984)\n    at v2 (file:///Users/william/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:751:32916)","timestamp":"2025-08-24T05:16:12.032Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗