Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
When running rococo-local using image parity/polkadot:v0.9.23 (same for parity/polkadot:v0.9.24), after a session change, ~20-30 blocks, both validators alice and bob fail with the following errors:
2022-06-17 23:34:36.095 WARN tokio-runtime-worker sc_service::client::client: Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: out of bounds memory access
WASM backtrace:
0: 0x1c729e - <unknown>!<ahash::random_state::RandomState as core::default::Default>::default::h922cce98276ba0ef
1: 0x1ecffb - <unknown>!pallet_session::historical::ProvingTrie<T>::generate_for::hca60d5b29bd7ea83
2: 0x1e5368 - <unknown>!pallet_session::<impl pallet_session::pallet::Pallet<T>>::rotate_session::he420142a51c0b3a4
3: 0x2ce30 - <unknown>!frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade>::initialize_block_impl::h12b224f847a42c83
4: 0x26ff3 - <unknown>!frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade>::initialize_block::hde77e842c81f8322
5: 0x2c273b - <unknown>!Core_execute_block
and
2022-06-17 23:51:54.045 WARN tokio-runtime-worker babe: Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: uninitialized element
WASM backtrace:
0: 0x1c72a1 - <unknown>!<ahash::random_state::RandomState as core::default::Default>::default::h922cce98276ba0ef
1: 0x1ecffb - <unknown>!pallet_session::historical::ProvingTrie<T>::generate_for::hca60d5b29bd7ea83
2: 0x1e5368 - <unknown>!pallet_session::<impl pallet_session::pallet::Pallet<T>>::rotate_session::he420142a51c0b3a4
3: 0x2ce30 - <unknown>!frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade>::initialize_block_impl::h12b224f847a42c83
4: 0x26ff3 - <unknown>!frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade>::initialize_block::hde77e842c81f8322
5: 0x2c3c95 - <unknown>!Core_initialize_block
At this point the chain stop producing blocks.
Digging a bit deeper, I notice this change on v0.9.23: #11232 and it mentions that if not on linux the performance would degrade, but in this case, adding one extra level of virtualization when running docker on a M1 seems to break block production.
In addition, I notice that if I run the validators with flag --wasmtime-instantiation-strategy=legacy-instance-reuse, then the error doesn't happen, but since it seems that the flag is deprecated and will be dropped in next releases, I think we should understand why is not compatible when running in this setup, since most of our development is in mac m1s.
Steps to reproduce
- Have a Mac with M1
- Run this docker compose file (
docker-compose -f ./yourcomposefile.yml up -d)
# Node Key Alice: `subkey inspect //Alice`
# Node Key Bob: `subkey inspect //Bob`
version: '3'
services:
node_alice:
container_name: alice
image: "parity/polkadot:v0.9.23"
ports:
- "30333:30333"
- "9933:9933"
- "9944:9944"
command: >
--chain=rococo-local
--node-key=e5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a
--wasm-execution=compiled
--execution=wasm
--base-path=/data
--port 30333
--rpc-port 9933
--ws-port 9944
--rpc-external
--rpc-cors all
--ws-external
--rpc-methods=Unsafe
--alice
--log="main,info,xcm=trace,xcm-executor=trace"
node_bob:
container_name: bob
image: "parity/polkadot:v0.9.23"
ports:
- "30344:30333"
- "9935:9933"
- "9945:9944"
command: >
--chain=rococo-local
--node-key=398f0c28f98885e046333d4a41c19cee4c37368a9832c6502f6cfd182e2aef89
--base-path=/data
--wasm-execution=compiled
--execution=wasm
--port 30333
--rpc-port 9933
--ws-port 9944
--rpc-external
--ws-external
--rpc-cors all
--rpc-methods=Unsafe
--bob
--log="main,info,xcm=trace,xcm-executor=trace"
- Wait for 20-30 blocks until the errors start happening.
- Bring all down:
docker-compose -f ./yourcomposefile.yml down
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
When running
rococo-localusing imageparity/polkadot:v0.9.23(same forparity/polkadot:v0.9.24), after a session change, ~20-30 blocks, both validatorsaliceandbobfail with the following errors:and
At this point the chain stop producing blocks.
Digging a bit deeper, I notice this change on
v0.9.23: #11232 and it mentions that if not on linux the performance would degrade, but in this case, adding one extra level of virtualization when running docker on a M1 seems to break block production.In addition, I notice that if I run the validators with flag
--wasmtime-instantiation-strategy=legacy-instance-reuse, then the error doesn't happen, but since it seems that the flag is deprecated and will be dropped in next releases, I think we should understand why is not compatible when running in this setup, since most of our development is in mac m1s.Steps to reproduce
docker-compose -f ./yourcomposefile.yml up -d)docker-compose -f ./yourcomposefile.yml down