You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
In long-running sessions, a crash occurs after exactly 3,670,015 iterations with one of the following errors:
Recursive use of an object detected which would lead to unsafe aliasing in Rust
RuntimeError: unreachable
This issue has been present for a while. Thanks to @hugocaillard’s work in #1617, included in clarinet-sdk version v2.12.0, the issue was mitigated, and performance was significantly improved, allowing roughly twice as many iterations. However, the crash still occurs. Discussions with Hugo suggest this issue is strongly related to memory usage, specifically the Node.js process running the clarinet-sdk session reaching 4 GB of memory at the crash point.
This issue is being opened to facilitate further investigation and in response to reports by users of Rendezvous, which highlights the same crash.
To Reproduce
Steps to reproduce the issue:
Initialize a new Clarinet project:
clarinet new demo
Create a new file named index.js in the root of the project and add the following code:
Observe the crash after exactly 3,670,015 iterations. At this point, Node.js reports 4 GB of memory usage:
Iteration 3670015
wasm://wasm/01dccebe:1
RuntimeError: unreachable
at wasm://wasm/01dccebe:wasm-function[5048]:0x4f80f0
at wasm://wasm/01dccebe:wasm-function[4373]:0x47ad83
at wasm://wasm/01dccebe:wasm-function[437]:0x2046aa
at wasm://wasm/01dccebe:wasm-function[1460]:0x351032
at wasm://wasm/01dccebe:wasm-function[191]:0x142fd4
at wasm://wasm/01dccebe:wasm-function[838]:0x2a1337
at wasm://wasm/01dccebe:wasm-function[4394]:0x47afd4
at wasm://wasm/01dccebe:wasm-function[3033]:0x42db2d
at Proxy.mineEmptyBlock (/Users/demo/node_modules/@hirosystems/clarinet-sdk-wasm/clarinet_sdk.js:687:26)
at longRunningSimnetSession (file:///Users/demo/index.js:7:12)
Node.js v22.11.0
Additional Context
The issue consistently occurs after the same number of Simnet iterations (3,670,015) in any app, producing one of the mentioned error messages. See the related issue in Rendezvous. Thanks to @fariedt and @hassan-truscova for highlighting this in Rendezvous.
The text was updated successfully, but these errors were encountered:
Describe the Bug
In long-running sessions, a crash occurs after exactly
3,670,015
iterations with one of the following errors:This issue has been present for a while. Thanks to @hugocaillard’s work in #1617, included in
clarinet-sdk
versionv2.12.0
, the issue was mitigated, and performance was significantly improved, allowing roughly twice as many iterations. However, the crash still occurs. Discussions with Hugo suggest this issue is strongly related to memory usage, specifically the Node.js process running theclarinet-sdk
session reaching 4 GB of memory at the crash point.This issue is being opened to facilitate further investigation and in response to reports by users of Rendezvous, which highlights the same crash.
To Reproduce
Steps to reproduce the issue:
Initialize a new Clarinet project:
Create a new file named
index.js
in the root of the project and add the following code:Install the required dependencies:
Run the long-running session:
Observe the crash after exactly
3,670,015
iterations. At this point, Node.js reports 4 GB of memory usage:Additional Context
The issue consistently occurs after the same number of Simnet iterations (
3,670,015
) in any app, producing one of the mentioned error messages. See the related issue in Rendezvous. Thanks to @fariedt and @hassan-truscova for highlighting this in Rendezvous.The text was updated successfully, but these errors were encountered: