[Bug] JavaScript heap out of memory - excessive memory allocation
Bug Description
I just hit Ctrl-o then Ctrl-e to go back in my history and Claude Code crashed with the following:
<--- Last few GCs --->
[87991:0x7fe928008000] 169675124 ms: Scavenge (interleaved) 3920.5 (4112.8) -> 3904.6 (4112.8) MB, pooled: 10 MB, 2.97 / 0.00 ms (average mu = 0.176, current mu = 0.126) allocation failure;
[87991:0x7fe928008000] 169675894 ms: Mark-Compact 3922.1 (4114.3) -> 3906.1 (4104.5) MB, pooled: 18 MB, 756.88 / 0.00 ms (average mu = 0.153, current mu = 0.130) 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: 0x10b053b39 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/usr/local/Cellar/node/23.7.0/bin/node]
2: 0x10b1fa353 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, v8::OOMDetails const&) [/usr/local/Cellar/node/23.7.0/bin/node]
3: 0x10b3b90b9 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/Cellar/node/23.7.0/bin/node]
4: 0x10b3c008e v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1::operator()() const [/usr/local/Cellar/node/23.7.0/bin/node]
5: 0x10b3b93fb 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/23.7.0/bin/node]
6: 0x10af60edb PushAllRegistersAndIterateStack [/usr/local/Cellar/node/23.7.0/bin/node]
7: 0x10b3b6139 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/Cellar/node/23.7.0/bin/node]
8: 0x10b3af8a1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/23.7.0/bin/node]
9: 0x10b3b02a4 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/23.7.0/bin/node]
10: 0x10b3a1bfe v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/local/Cellar/node/23.7.0/bin/node]
11: 0x10b67f9c2 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long, v8::internal::Isolate) [/usr/local/Cellar/node/23.7.0/bin/node]
12: 0x10ae2b936 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [/usr/local/Cellar/node/23.7.0/bin/node]
13: 0x10ae0b8f9 Builtins_SetConstructor [/usr/local/Cellar/node/23.7.0/bin/node]
14: 0x10ad86568 Builtins_JSBuiltinsConstructStub [/usr/local/Cellar/node/23.7.0/bin/node]
zsh: abort /Users/jeff_walter/.claude/local/claude --permission-mode bypassPermissions
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.0.27
- Feedback ID: 4ae73597-3e20-4f8c-847a-984f3305419c
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗