Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix JavaScript heap out of memory error #154

@acuarica

Description

@acuarica

The contract at 0x23CbB9F0de3258DE03baaD2BCeA4FCCC55233af0 causes sevm's Node process to crash due to JavaScript heap out of memory error.

$ sevm abi 0x23CbB9F0de3258DE03baaD2BCeA4FCCC55233af0

<--- Last few GCs --->

[84170:0x138008000]    10377 ms: Mark-Compact 4042.5 (4129.5) -> 4040.2 (4129.5) MB, 1069.42 / 0.00 ms  (average mu = 0.230, current mu = 0.068) allocation failure; scavenge might not succeed
[84170:0x138008000]    12152 ms: Mark-Compact 4056.0 (4129.5) -> 4052.2 (4155.2) MB, 1769.12 / 0.00 ms  (average mu = 0.092, current mu = 0.003) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

 1: 0x100872f64 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/21.7.3/bin/node]
 2: 0x1009f5cc0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/21.7.3/bin/node]
 3: 0x1009f5c70 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/opt/homebrew/Cellar/node/21.7.3/bin/node]
 4: 0x100b9c348 v8::internal::Heap::CallGCPrologueCallbacks(v8::GCType, v8::GCCallbackFlags, v8::internal::GCTracer::Scope::ScopeId) [/opt/homebrew/Cellar/node/21.7.3/bin/node]
[...]
100: 0x10078596c node::SpinEventLoopInternal(node::Environment*) [/opt/homebrew/Cellar/node/21.7.3/bin/node]
101: 0x1008baba0 node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/opt/homebrew/Cellar/node/21.7.3/bin/node]
102: 0x1008ba8f4 node::NodeMainInstance::Run() [/opt/homebrew/Cellar/node/21.7.3/bin/node]
103: 0x100829444 node::Start(int, char**) [/opt/homebrew/Cellar/node/21.7.3/bin/node]
104: 0x18e99e0e0 start [/usr/lib/dyld]
[1]    84170 abort      sevm abi 0x23CbB9F0de3258DE03baaD2BCeA4FCCC55233af0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions