[BUG]

Resolved 💬 1 comment Opened Jun 4, 2025 by scttfrdmn Closed Jun 4, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: <!-- v1.0.11 -->
  • Operating System: <!-- e.g. macOS 15.5 -->
  • Terminal: <!-- iTerm2 -->

Bug Description

<!-- Ran out of memory - memory leak?
<--- Last few GCs --->

[40942:0x130008000] 3596933 ms: Mark-Compact 4019.5 (4099.4) -> 4018.6 (4099.4) MB, pooled: 0 MB, 47.88 / 0.00 ms (average mu =
0.109, current mu = 0.010) 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: 0x1000d9630 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
2: 0x100207584 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, v8::OOMDetails const&)
[/opt/homebrew/Cellar/node/24.1.0/bin/node]
3: 0x10020753c v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, v8::OOMDetails const&)
[/opt/homebrew/Cellar/node/24.1.0/bin/node]
4: 0x1003e44fc v8::internal::Heap::stack() [/opt/homebrew/Cellar/node/24.1.0/bin/node]
5: 0x1003e6c3c v8::internal::Heap::OldGenerationConsumedBytes() const [/opt/homebrew/Cellar/node/24.1.0/bin/node]
6: 0x1003e6adc v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector, v8::base::TimeTicks)
[/opt/homebrew/Cellar/node/24.1.0/bin/node]
7: 0x1003f4468 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason,
v8::GCCallbackFlags)::$_1::operator()() const [/opt/homebrew/Cellar/node/24.1.0/bin/node]
8: 0x1003f410c void heap::base::Stack::SetMarkerAndCallbackImpl<v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace,
v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1>(heap::base::Stack, void, void const*)
[/opt/homebrew/Cellar/node/24.1.0/bin/node]
9: 0x100b3c980 PushAllRegistersAndIterateStack [/opt/homebrew/Cellar/node/24.1.0/bin/node]
10: 0x1003e2abc v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason,
v8::GCCallbackFlags) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
11: 0x1003da6c4 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType,
v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
12: 0x1003c2350 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType,
v8::internal::AllocationOrigin) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
13: 0x100734f7c v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long, v8::internal::Isolate)
[/opt/homebrew/Cellar/node/24.1.0/bin/node]
14: 0x100bfdf74 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [/opt/homebrew/Cellar/node/24.1.0/bin/node]
15: 0x100be0710 Builtins_SetConstructor [/opt/homebrew/Cellar/node/24.1.0/bin/node]
16: 0x100b5db8c Builtins_JSBuiltinsConstructStub [/opt/homebrew/Cellar/node/24.1.0/bin/node]
17: 0x15163239c
18: 0x15124de9c
19: 0x100c2da20 Builtins_ArrayMap [/opt/homebrew/Cellar/node/24.1.0/bin/node]
20: 0x1512472dc
21: 0x15138e150
22: 0x15143b598
23: 0x151908174
24: 0x15135afbc
25: 0x151a2ce10
26: 0x151a4620c
27: 0x1514f86a8
28: 0x151842104
29: 0x100b9f648 Builtins_AsyncFunctionAwaitResolveClosure [/opt/homebrew/Cellar/node/24.1.0/bin/node]
30: 0x100c745f8 Builtins_PromiseFulfillReactionJob [/opt/homebrew/Cellar/node/24.1.0/bin/node]
31: 0x100b8ea50 Builtins_RunMicrotasks [/opt/homebrew/Cellar/node/24.1.0/bin/node]
32: 0x100b5e7b0 Builtins_JSRunMicrotasksEntry [/opt/homebrew/Cellar/node/24.1.0/bin/node]
33: 0x10033c758 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams
const&) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
34: 0x10033ce04 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous
namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
35: 0x10033cef4 v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate, v8::internal::MicrotaskQueue)
[/opt/homebrew/Cellar/node/24.1.0/bin/node]
36: 0x100361af0 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
37: 0x10036190c v8::internal::MicrotaskQueue::PerformCheckpointInternal(v8::Isolate*) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
38: 0x100b6294c Builtins_CallApiCallbackOptimizedNoProfiling [/opt/homebrew/Cellar/node/24.1.0/bin/node]
39: 0x15162d37c
40: 0x100b5e8cc Builtins_JSEntryTrampoline [/opt/homebrew/Cellar/node/24.1.0/bin/node]
41: 0x100b5e570 Builtins_JSEntry [/opt/homebrew/Cellar/node/24.1.0/bin/node]
42: 0x10033c788 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams
const&) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
43: 0x10033c178 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::Object>,
v8::internal::DirectHandle<v8::internal::Object>, v8::base::Vector<v8::internal::DirectHandle<v8::internal::Object> const>)
[/opt/homebrew/Cellar/node/24.1.0/bin/node]
44: 0x100218a70 v8::Function::Call(v8::Isolate, v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>)
[/opt/homebrew/Cellar/node/24.1.0/bin/node]
45: 0x10002c970 node::InternalCallbackScope::Close() [/opt/homebrew/Cellar/node/24.1.0/bin/node]
46: 0x10002cbb0 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>,
int, v8::Local<v8::Value>*, node::async_context, v8::Local<v8::Value>) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
47: 0x10003b310 node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*)
[/opt/homebrew/Cellar/node/24.1.0/bin/node]
48: 0x1001903ec node::StreamBase::CallJSOnreadMethod(long, v8::Local<v8::ArrayBuffer>, unsigned long,
node::StreamBase::StreamBaseJSChecks) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
49: 0x10019199c node::EmitToJSStreamListener::OnStreamRead(long, uv_buf_t const&) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
50: 0x1001ecaf8 node::crypto::TLSWrap::ClearOut() [/opt/homebrew/Cellar/node/24.1.0/bin/node]
51: 0x1001ebf90 node::crypto::TLSWrap::Cycle() [/opt/homebrew/Cellar/node/24.1.0/bin/node]
52: 0x1001ee748 node::crypto::TLSWrap::OnStreamRead(long, uv_buf_t const&) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
53: 0x100194160 node::LibuvStreamWrap::OnUvRead(long, uv_buf_t const*) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
54: 0x10019461c node::LibuvStreamWrap::ReadStart()::$_1::__invoke(uv_stream_s, long, uv_buf_t const)
[/opt/homebrew/Cellar/node/24.1.0/bin/node]
55: 0x10553baf0 uv__stream_io [/opt/homebrew/Cellar/libuv/1.51.0/lib/libuv.1.dylib]
56: 0x105542ca8 uv__io_poll [/opt/homebrew/Cellar/libuv/1.51.0/lib/libuv.1.dylib]
57: 0x105532b58 uv_run [/opt/homebrew/Cellar/libuv/1.51.0/lib/libuv.1.dylib]
58: 0x10002d3ec node::SpinEventLoopInternal(node::Environment*) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
59: 0x100102044 node::NodeMainInstance::Run(node::ExitCode, node::Environment) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
60: 0x100101dd8 node::NodeMainInstance::Run() [/opt/homebrew/Cellar/node/24.1.0/bin/node]
61: 0x1000af354 node::Start(int, char**) [/opt/homebrew/Cellar/node/24.1.0/bin/node]
62: 0x18dbceb98 start [/usr/lib/dyld]
[1] 40942 abort claude -->

Steps to Reproduce

  1. <!-- Using for several hours -->
  2. <!-- Second step -->
  3. <!-- And so on... -->

Expected Behavior

<!-- Not crash -->

Actual Behavior

<!-- See above -->

Additional Context

<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗