-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS WasmVM is "broken": Link Error: "function types incompatible: expected func of type (i64) -> ()
, found func of type (i32) -> ()
#12062
Comments
Sandbox has not been updated as it's broken on Mac OS. See near/nearcore#12062
The same issue happens on the 2.2.0 release: |
I have made some initial investigation and tried to determine the failure point. I have adjusted to compile the nearcore sandbox (as some versions are not available on s3) and run tests: This commit fails on the CI |
The issue is reproducible on any OS using: |
Weird, but it's only reproducible if you remove engine from WasmtimeVM and recreate it each time. Otherwise, test passes :( |
If the engine is new, it won't work. Potentially the issue is within: precompile and then prepare and run on another engine. To reproduce the issue just use a new engine before the linker.instantiate() Though, it doesn't
|
Resolves: #12062 This PR resolves the issue with the wasmtime function type incompatibility. To understand the issue, I highly recommend my investigation comments on the issue itself: #12062 To be honest, I'm not sure it's a proper fix as I guess the root cause of the issue is somewhere outside of the file that leads to running under different engines/settings, leading to instantiating failures. It's a bit weird that the WasmtimeVM instance and Module instance could be different somehow as wasmtime::Engine is an arc wrapper. And module seems to clone it inside which should be still the same instance. I could reproduce the issue only by tweaking the code manually by recreating an engine before the linking. It means that something more complex happens and we need a test on that But this fix resolves an issue reported by #12062: https://github.com/near/near-workspaces-rs/actions/runs/10835958697/job/30200440749 CC @race-of-sloths
Describe the bug
nearcore 2.1.1+ built for macOS cannot deploy/execute any contract:
https://github.com/near/near-workspaces-rs/actions/runs/10741891187/job/29793334139
This issue blocks all the tooling upgrades (near-sandbox-js, near-sandbox-rs, near-workspaces-*, ...).
It was reported before: #11782 (comment)
To Reproduce
Pull this commit: near/near-workspaces-rs@9186ff1, and run tests (
cargo test
)Expected behavior
Tests should pass.
Version (please complete the following information):
The text was updated successfully, but these errors were encountered: