Closed sangee2004 closed 6 days ago
cc @thedadams ...not sure if this is one in the same with the issue you are looking at that also seems to be causing an OOM now
I encountered OOM error today when testing the following use case:
I uploaded the following large file to workspace directory and asked to read the contents of the file.
-rw-r--r-- 1 sangeethahariharan staff 2480380 Sep 4 11:36 test1.json
I was presented with this message:
The contents of test1.json are too long to display all at once. How about I extract specific information for you? Let me know what you're looking for, and I'll get it for you!
But when I asked it to try reading the contents again , LLM decided to present the data in batches (i dont remember the exact text that was presented) and UI crashed.
Following errors were seen:
<--- Last few GCs --->
[41065:0x11c00540000] 1726277 ms: Mark-Compact (reduce) 3842.4 (3863.5) -> 3808.1 (3815.4) MB, pooled: 0 MB, 6.12 / 0.00 ms (average mu = 0.992, current mu = 0.982) last resort; GC in old space requested
[41065:0x11c00540000] 1726282 ms: Mark-Compact (reduce) 3808.1 (3815.4) -> 3808.1 (3813.4) MB, pooled: 0 MB, 5.08 / 0.00 ms (average mu = 0.984, current mu = 0.000) last resort; GC in old space requested
<--- JS stacktrace --->
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0x1107770f0 node::OnFatalError(char const*, char const*) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
2: 0x10ac11c20 _$LT$font_types..tag..Tag$u20$as$u20$core..cmp..PartialEq$LT$$u5b$u8$u3b$$u20$4$u5d$$GT$$GT$::eq::hd4676fde7a82a4e1 [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
3: 0x10ac11bb4 _$LT$font_types..tag..Tag$u20$as$u20$core..cmp..PartialEq$LT$$u5b$u8$u3b$$u20$4$u5d$$GT$$GT$::eq::hd4676fde7a82a4e1 [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
4: 0x10adcf950 v8::CppHeap::wrapper_descriptor() const [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
5: 0x10adaf578 v8::CppHeap::wrapper_descriptor() const [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
6: 0x1099a8098 uv_tcp_simultaneous_accepts [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
7: 0x10adb19b8 v8::CppHeap::wrapper_descriptor() const [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
8: 0x10af1b708 v8::Platform::SystemClockTimeMillis() [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
9: 0x10ac87278 v8::SourceLocation::ToString() const [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
10: 0x157ea9b74
11: 0x150520444
12: 0x1505278ac
13: 0x15045ff94
14: 0x1500a9224
15: 0x1500a72e4
16: 0x150528c30
17: 0x1502b8808
18: 0x1502a3560
19: 0x157e0b848
20: 0x157e0b494
21: 0x10ad2f98c v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
22: 0x10ac2a608 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
23: 0x1106c6bc8 node::CallbackScope::~CallbackScope() [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
24: 0x1106d204c node::EmitAsyncDestroy(node::Environment*, node::async_context) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
25: 0x110795a50 node::OnFatalError(char const*, char const*) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
26: 0x110991ce0 ares_inet_ntop [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
27: 0x110992c60 ares_inet_ntop [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
28: 0x110992114 ares_inet_ntop [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
29: 0x1107948dc node::OnFatalError(char const*, char const*) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
30: 0x110792894 node::OnFatalError(char const*, char const*) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
31: 0x157e10794
32: 0x150529d68
33: 0x150528c30
34: 0x15052e5d0
35: 0x1502a3560
36: 0x157e0b848
37: 0x157e0b494
38: 0x10ad2f98c v8::Unwinder::PCIsInV8(unsigned long, v8::MemoryRange const*, void*) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
39: 0x10ac2a608 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
40: 0x1106c6bc8 node::CallbackScope::~CallbackScope() [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
41: 0x1106d204c node::EmitAsyncDestroy(node::Environment*, node::async_context) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
42: 0x1108690a0 node::PromiseRejectCallback(v8::PromiseRejectMessage) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
43: 0x11086ae1c node::PromiseRejectCallback(v8::PromiseRejectMessage) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
44: 0x11086f470 node::PromiseRejectCallback(v8::PromiseRejectMessage) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
45: 0x11086fb7c node::PromiseRejectCallback(v8::PromiseRejectMessage) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
46: 0x1099f5d20 uv_signal_stop [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
47: 0x1099fcffc uv_free_interface_addresses [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
48: 0x1099ec974 uv_run [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
49: 0x109b94128 node::FreeArrayBufferAllocator(node::ArrayBufferAllocator*) [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
50: 0x10cd49398 std::sys::pal::unix::os::errno::h9b4b6e1b7af28e15 [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
51: 0x10cd694e8 std::sys::pal::unix::os::errno::h9b4b6e1b7af28e15 [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
52: 0x10cdb112c std::process::id::hb9fbed0f3f7b0c03 [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
53: 0x1099638b8 [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
54: 0x10cdb01c8 std::process::id::hb9fbed0f3f7b0c03 [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
55: 0x1833d79dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation]
56: 0x1833d7970 __CFRunLoopDoSource0 [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation]
57: 0x1833d76e0 __CFRunLoopDoSources0 [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation]
58: 0x1833d62d0 __CFRunLoopRun [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation]
59: 0x1833d593c CFRunLoopRunSpecific [/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation]
60: 0x18d99e448 RunCurrentEventLoopInMode [/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox]
61: 0x18d99e284 ReceiveNextEventCommon [/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox]
62: 0x18d99dfdc _BlockUntilNextEventMatchingListInModeWithFilter [/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox]
63: 0x186bb4ed0 _DPSNextEvent [/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit]
64: 0x18739feec -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] [/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit]
65: 0x186ba837c -[NSApplication run] [/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit]
66: 0x10cdb1a20 std::process::id::hb9fbed0f3f7b0c03 [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
67: 0x10cdafb88 std::process::id::hb9fbed0f3f7b0c03 [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
68: 0x10cd69dd4 std::sys::pal::unix::os::errno::h9b4b6e1b7af28e15 [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
69: 0x10cd307c4 std::sys::pal::unix::os::errno::h9b4b6e1b7af28e15 [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
70: 0x10bf05928 v8::internal::compiler::CompilationDependencies::FieldTypeDependencyOffTheRecord(v8::internal::compiler::MapRef, v8::internal::compiler::MapRef, v8::internal::InternalIndex, v8::internal::compiler::ObjectRef) const [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
71: 0x10bf06fcc v8::internal::compiler::CompilationDependencies::FieldTypeDependencyOffTheRecord(v8::internal::compiler::MapRef, v8::internal::compiler::MapRef, v8::internal::InternalIndex, v8::internal::compiler::ObjectRef) const [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
72: 0x10bf0386c v8::internal::compiler::CompilationDependencies::FieldTypeDependencyOffTheRecord(v8::internal::compiler::MapRef, v8::internal::compiler::MapRef, v8::internal::InternalIndex, v8::internal::compiler::ObjectRef) const [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
73: 0x109d33894 v8::CodeEvent::GetScriptLine() [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
74: 0x109d34b98 v8::CodeEvent::GetScriptLine() [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
75: 0x109d3474c v8::CodeEvent::GetScriptLine() [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
76: 0x109d3309c v8::CodeEvent::GetScriptLine() [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
77: 0x109d33300 v8::CodeEvent::GetScriptLine() [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
78: 0x1099fd6cc ElectronMain [/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
79: 0x182f790e0 start [/usr/lib/dyld]
zsh: abort ./electron-dist/mac-arm64/Acorn.app/Contents/MacOS/Acorn
I think @njhale and @thedadams's OOM fixes addressed this
Tested with latest build from - a66cd29e
OMM is not encountered when testing the workflows mentioned in this issue
gptscript version v0.0.0-dev-498381d1-dirty
Steps to reproduce the problem:
ui
Following errors are seen in the UI console: