Node.js Heap Out of Memory: Ineffective Mark-Compacts Near Heap Limit

Resolved 💬 3 comments Opened Jun 27, 2025 by Maslol7 Closed Jul 27, 2025

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

[98482:0x7fd548008000] 241880805 ms: Scavenge (interleaved) 3919.9 (4112.4) -> 3904.0 (4112.4) MB, pooled: 1 MB, 4.24 / 0.00 ms (average mu = 0.130, current mu = 0.068) allocation failure;
[98482:0x7fd548008000] 241882166 ms: Mark-Compact 3921.1 (4113.6) -> 3905.2 (4106.6) MB, pooled: 8 MB, 1345.30 / 0.00 ms (average mu = 0.114, current mu = 0.096) allocation failure; scavenge might not succeed

<--- JS stacktrace --->

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

1: 0x10437a4f5 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/usr/local/Cellar/node/23.6.1/bin/node]
2: 0x104533bcb v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, v8::OOMDetails const&) [/usr/local/Cellar/node/23.6.1/bin/node]
3: 0x1046f2e27 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/Cellar/node/23.6.1/bin/node]
4: 0x1046f9dc8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_10::operator()() const [/usr/local/Cellar/node/23.6.1/bin/node]
5: 0x1046f3169 void heap::base::Stack::SetMarkerAndCallbackImpl<v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_10>(heap::base::Stack, void, void const*) [/usr/local/Cellar/node/23.6.1/bin/node]
6: 0x10428839b PushAllRegistersAndIterateStack [/usr/local/Cellar/node/23.6.1/bin/node]
7: 0x1046efe8d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/Cellar/node/23.6.1/bin/node]
8: 0x1046e9647 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/23.6.1/bin/node]
9: 0x1046ea04c v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/23.6.1/bin/node]
10: 0x1046db9f9 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/local/Cellar/node/23.6.1/bin/node]
11: 0x1049bb3e6 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long, v8::internal::Isolate) [/usr/local/Cellar/node/23.6.1/bin/node]
12: 0x104152df6 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [/usr/local/Cellar/node/23.6.1/bin/node]
13: 0x1193ae67d
zsh: abort /Users/omristein/.claude/local/claude

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.35
  • Feedback ID: 56bf5482-5750-44f4-a4c3-bbac9b7f2d7f

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:882:11)\n    at execSync (node:child_process:954:15)\n    at TZ (file:///Users/omristein/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:700:3921)\n    at file:///Users/omristein/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:622:9014\n    at Q (file:///Users/omristein/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:17199)\n    at VX (file:///Users/omristein/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:622:8160)\n    at nS (file:///Users/omristein/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:622:7241)\n    at f9 (file:///Users/omristein/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:622:11408)","timestamp":"2025-06-27T04:22:44.842Z"}]

View original on GitHub ↗

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