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
There are two instances of the wasmVM for cosmwasm running.
Steps to Reproduce
It's pretty un-noticeable in the current version of the chain.
However, upgrading wasmd and wasmVM to the versions that use the 2.0 version makes it clear when running the chain and trying to upload a contract.
The newer version prevents 2 VM instances from running in the same directory(from migration guide, as well as changelog), meaning we are having two instances running, just the older version doesn't prevent us from doing this.
Code snippet to reproduce
Start the chain(after upgrading wasmd and wasmvm).
Try uploading a contract.
Stack trace & error message
panic: Could not lock exclusive.lock. Is a different VM running in the same directory already?
goroutine 1 [running]:
github.com/CosmWasm/wasmd/x/wasm/keeper.NewKeeper({_, _}, {_, _}, {_, _}, {_, _}, {0x43071d0, 0xc0001b7bf8}, ...)
github.com/CosmWasm/[email protected]/x/wasm/keeper/keeper_cgo.go:75 +0xed2
github.com/sedaprotocol/seda-chain/app.NewApp({0x43070b0, 0x62771a0}, {0x431e280, 0xc0012d9320}, {0x0, 0x0}, 0x1, 0xc0013c7a10, {0xc0013a4558, 0x12}, ...)
github.com/sedaprotocol/seda-chain/app/app.go:587 +0x38f4
github.com/sedaprotocol/seda-chain/cmd/sedad/cmd.NewRootCmd()
github.com/sedaprotocol/seda-chain/cmd/sedad/cmd/root.go:71 +0x60f
main.main()
github.com/sedaprotocol/seda-chain/cmd/sedad/main.go:15 +0x17
Expected Behavior
Uploading the contract should not panic cause there should only be one instance of the VM running.
This could be why #385 is not working as well. Maybe wasmer no longer likes/allows 2 instances of a running VM to touch the same place in memory(on specific architectures??). Not sure TBH.
The text was updated successfully, but these errors were encountered:
I think implementing dependency injection should resolve this issue by obviating the need to call NewApp twice in root.go. However, the implementation is currently blocked by the lack of support from x/wasm. It seems they will add the support after the v0.52 release CosmWasm/wasmd#1286.
The work in progress has been pushed to the branch hy/depinj. It includes dependency injection support for all our custom modules and an attempt at app wiring.
🐛 Bug Report
There are two instances of the
wasmVM
forcosmwasm
running.Steps to Reproduce
It's pretty un-noticeable in the current version of the chain.
However, upgrading
wasmd
andwasmVM
to the versions that use the2.0
version makes it clear when running the chain and trying to upload a contract.The newer version prevents 2 VM instances from running in the same directory(from migration guide, as well as changelog), meaning we are having two instances running, just the older version doesn't prevent us from doing this.
Code snippet to reproduce
wasmd
andwasmvm
).Stack trace & error message
Expected Behavior
Uploading the contract should not panic cause there should only be one instance of the VM running.
This could be why #385 is not working as well. Maybe
wasmer
no longer likes/allows 2 instances of a running VM to touch the same place in memory(on specific architectures??). Not sure TBH.The text was updated successfully, but these errors were encountered: