[BUG] OutOfMemory crashes after working on tasks in different terminals

Resolved 💬 5 comments Opened Jun 4, 2025 by dopper Closed Jun 5, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.11
  • Operating System: macOS
  • Terminal: zed terminal, iterm2, vscode

Bug Description

Crashed and produced stack trace:
<--- Last few GCs --->

[96444:0x140008000] 9905323 ms: Mark-Compact 3818.2 (4114.9) -> 3801.7 (4112.9) MB, pooled: 18 MB, 79.96 / 0.00 ms (average mu = 0.228, current mu = 0.211) allocation failure; scavenge might not succeed
[96444:0x140008000] 9905441 ms: Mark-Compact 3818.0 (4113.1) -> 3801.9 (4111.4) MB, pooled: 19 MB, 98.88 / 0.00 ms (average mu = 0.193, current mu = 0.161) 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: 0x100995f0c node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
2: 0x100b41ca4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
3: 0x100cfece8 v8::internal::Heap::CallGCPrologueCallbacks(v8::GCType, v8::GCCallbackFlags, v8::internal::GCTracer::Scope::ScopeId) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
4: 0x100d04780 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1::operator()() const [/opt/homebrew/Cellar/node/23.11.0/bin/node]
5: 0x100cff02c 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/23.11.0/bin/node]
6: 0x1008a8028 PushAllRegistersAndIterateStack [/opt/homebrew/Cellar/node/23.11.0/bin/node]
7: 0x100cfbf14 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
8: 0x100cf5968 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
9: 0x100cf6330 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
10: 0x100ce73dc v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
11: 0x100faa218 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long, v8::internal::Isolate) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
12: 0x1007879f4 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [/opt/homebrew/Cellar/node/23.11.0/bin/node]
13: 0x10076aa78 Builtins_SetConstructor [/opt/homebrew/Cellar/node/23.11.0/bin/node]
14: 0x1006ed838 Builtins_JSBuiltinsConstructStub [/opt/homebrew/Cellar/node/23.11.0/bin/node]
15: 0x1096cafd8
16: 0x10930741c
17: 0x1007b661c Builtins_ArrayMap [/opt/homebrew/Cellar/node/23.11.0/bin/node]
18: 0x1093029b0
19: 0x1093d8c30
20: 0x1095620e8
21: 0x10961c578
22: 0x10961dd44
23: 0x109b96744
24: 0x1096aae24
25: 0x109b30068
26: 0x109290238
27: 0x10072de20 Builtins_AsyncFunctionAwaitResolveClosure [/opt/homebrew/Cellar/node/23.11.0/bin/node]
28: 0x1007fb298 Builtins_PromiseFulfillReactionJob [/opt/homebrew/Cellar/node/23.11.0/bin/node]
29: 0x10071d214 Builtins_RunMicrotasks [/opt/homebrew/Cellar/node/23.11.0/bin/node]
30: 0x1006ee3f0 Builtins_JSRunMicrotasksEntry [/opt/homebrew/Cellar/node/23.11.0/bin/node]
31: 0x100c73be0 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
32: 0x100c7434c v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
33: 0x100c9e900 v8::internal::MicrotaskQueue::PerformCheckpointInternal(v8::Isolate*) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
34: 0x1006f2978 Builtins_CallApiCallbackGeneric [/opt/homebrew/Cellar/node/23.11.0/bin/node]
35: 0x1092bb4fc
36: 0x1006ee50c Builtins_JSEntryTrampoline [/opt/homebrew/Cellar/node/23.11.0/bin/node]
37: 0x1006ee1b0 Builtins_JSEntry [/opt/homebrew/Cellar/node/23.11.0/bin/node]
38: 0x100c73c08 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
39: 0x100c73570 v8::internal::Execution::Call(v8::internal::Isolate, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
40: 0x100b587e4 v8::Function::Call(v8::Isolate, v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
41: 0x1008a96d4 node::InternalCallbackScope::Close() [/opt/homebrew/Cellar/node/23.11.0/bin/node]
42: 0x1008a9b94 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/23.11.0/bin/node]
43: 0x1008c1e08 node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
44: 0x100aafcd8 node::StreamBase::CallJSOnreadMethod(long, v8::Local<v8::ArrayBuffer>, unsigned long, node::StreamBase::StreamBaseJSChecks) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
45: 0x100aaff5c node::EmitToJSStreamListener::OnStreamRead(long, uv_buf_t const&) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
46: 0x100b274e4 node::crypto::TLSWrap::ClearOut() [/opt/homebrew/Cellar/node/23.11.0/bin/node]
47: 0x100b27990 node::crypto::TLSWrap::Cycle() [/opt/homebrew/Cellar/node/23.11.0/bin/node]
48: 0x100b25fc0 node::crypto::TLSWrap::OnStreamRead(long, uv_buf_t const&) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
49: 0x100ab6344 node::LibuvStreamWrap::OnUvRead(long, uv_buf_t const*) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
50: 0x100ab604c node::LibuvStreamWrap::ReadStart()::$_1::__invoke(uv_stream_s, long, uv_buf_t const) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
51: 0x104247af0 uv__stream_io [/opt/homebrew/Cellar/libuv/1.51.0/lib/libuv.1.dylib]
52: 0x10424eca8 uv__io_poll [/opt/homebrew/Cellar/libuv/1.51.0/lib/libuv.1.dylib]
53: 0x10423eb58 uv_run [/opt/homebrew/Cellar/libuv/1.51.0/lib/libuv.1.dylib]
54: 0x1008aa488 node::SpinEventLoopInternal(node::Environment*) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
55: 0x1009dd43c node::NodeMainInstance::Run(node::ExitCode, node::Environment) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
56: 0x1009dd190 node::NodeMainInstance::Run() [/opt/homebrew/Cellar/node/23.11.0/bin/node]
57: 0x100954a58 node::Start(int, char**) [/opt/homebrew/Cellar/node/23.11.0/bin/node]
58: 0x192d16b98 start [/usr/lib/dyld]
zsh: abort claude

Steps to Reproduce

Can't replicated, happened randomly

Expected Behavior

Continue with updates

Actual Behavior

Crash and stack trace

Additional Context

Nothing different in a normal workflow here, was not a heavy task system has plenty of ram/disk available.e

View original on GitHub ↗

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