parallel-finance / parallel

A decentralized lending & staking protocol built on top of the Polkadot ecosystem.
https://parallel.fi
GNU General Public License v3.0
120 stars 35 forks source link

Panics after loss on Internet connection #884

Closed nazar-pc closed 2 years ago

nazar-pc commented 2 years ago

Description

I was running an archival node that was syncing and rebooted by router. After this I saw a bunch of panics printed even though node seems to continue to work.

I don't have much interest in this, but I though I'd share it.

Steps to Reproduce

  1. Run archival node
  2. While the node is syncing drop Internet connection and re-establish it after 10 seconds
  3. See panics printed in node's output

Environment

# docker-compose.yml
version: '2'

services:
  parallel-heiko:
    image: parallelfinance/parallel
    volumes:
      - ./parallel-heiko:/data
    network_mode: host
    command: [
      "--base-path", "/data",
      "--chain", "heiko",
      "--pruning", "archive",
      "--ws-external",
      "--rpc-external",
      "--rpc-cors", "all",
      "--bootnodes", "/dns/heiko-bootnode-0.parallel.fi/tcp/30333/p2p/12D3KooWLUTzbrJJDowUKMPfEZrDY6eH8HXvm8hrG6YrdUmdrKPz",
      "--rpc-port", "19952",
    ]

Node version 1.7.0-26e51f9-x86_64-linux-gnu

Logs, Errors or Screenshots

``` parallel-heiko_1 | 2021-11-14 11:07:47 [Relaychain] ⚙️ Syncing 16.3 bps, target=#10089699 (50 peers), best: #8725173 (0x53b6…e84f), finalized #8724992 (0xabe7…0102), ⬇ 28.5kiB/s ⬆ 11.0kiB/s parallel-heiko_1 | 2021-11-14 11:07:51 [Parachain] 💤 Idle (10 peers), best: #213234 (0x51ff…e01d), finalized #0 (0x64a1…053b), ⬇ 50 B/s ⬆ 34 B/s parallel-heiko_1 | 2021-11-14 11:07:52 [Relaychain] ⚙️ Syncing 20.3 bps, target=#10089699 (38 peers), best: #8725275 (0x06fc…3281), finalized #8724992 (0xabe7…0102), ⬇ 14.0kiB/s ⬆ 6.1kiB/s parallel-heiko_1 | 2021-11-14 11:07:56 [Parachain] 💤 Idle (6 peers), best: #213234 (0x51ff…e01d), finalized #0 (0x64a1…053b), ⬇ 0.2kiB/s ⬆ 0.3kiB/s parallel-heiko_1 | 2021-11-14 11:07:57 [Relaychain] ⚙️ Syncing 24.1 bps, target=#10089707 (19 peers), best: #8725396 (0x3582…e907), finalized #8724992 (0xabe7…0102), ⬇ 24.3kiB/s ⬆ 9.0kiB/s parallel-heiko_1 | 2021-11-14 11:08:01 [Parachain] ⚙️ Syncing 0.0 bps, target=#213505 (3 peers), best: #213234 (0x51ff…e01d), finalized #0 (0x64a1…053b), ⬇ 61.0kiB/s ⬆ 1.5kiB/s parallel-heiko_1 | Hash: given=edf9366d348e06f435a51a15757d33e6e7721ed23a9f4e5b0134b9ab4dd23cce, expected=6b20c670fc96a8d37c9350f84d8a933abbea7f75e3b01f480ab1f159108cb6eb parallel-heiko_1 | parallel-heiko_1 | ==================== parallel-heiko_1 | parallel-heiko_1 | Version: 1.7.0-26e51f9-x86_64-linux-gnu parallel-heiko_1 | parallel-heiko_1 | 0: sp_panic_handler::set::{{closure}} parallel-heiko_1 | 1: std::panicking::rust_panic_with_hook parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:626:17 parallel-heiko_1 | 2: std::panicking::begin_panic::{{closure}} parallel-heiko_1 | 3: std::sys_common::backtrace::__rust_end_short_backtrace parallel-heiko_1 | 4: std::panicking::begin_panic parallel-heiko_1 | 5: frame_executive::Executive::final_checks parallel-heiko_1 | 6: tracing::span::Span::in_scope parallel-heiko_1 | 7: frame_executive::Executive::execute_block parallel-heiko_1 | 8: ,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,()>,heiko_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion,frame_system::extensions::check_tx_version::CheckTxVersion,frame_system::extensions::check_genesis::CheckGenesis,frame_system::extensions::check_mortality::CheckMortality,frame_system::extensions::check_nonce::CheckNonce,frame_system::extensions::check_weight::CheckWeight,pallet_transaction_payment::ChargeTransactionPayment)>>>>::execute_block parallel-heiko_1 | 9: std::panicking::try parallel-heiko_1 | 10: std::thread::local::LocalKey::with parallel-heiko_1 | 11: sc_executor::native_executor::WasmExecutor::with_instance::{{closure}} parallel-heiko_1 | 12: sc_executor::wasm_runtime::RuntimeCache::with_instance parallel-heiko_1 | 13: as sp_core::traits::CodeExecutor>::call parallel-heiko_1 | 14: sp_state_machine::execution::StateMachine::execute_aux parallel-heiko_1 | 15: sp_state_machine::execution::StateMachine::execute_using_consensus_failure_handler parallel-heiko_1 | 16: as sc_client_api::call_executor::CallExecutor>::contextual_call parallel-heiko_1 | 17: sp_api::runtime_decl_for_Core::execute_block_call_api_at parallel-heiko_1 | 18: as sp_api::Core<__SR_API_BLOCK__>>::Core_execute_block_runtime_api_impl parallel-heiko_1 | 19: sp_api::Core::execute_block_with_context parallel-heiko_1 | 20: sc_service::client::client::Client::prepare_block_storage_changes parallel-heiko_1 | 21: as core::future::future::Future>::poll parallel-heiko_1 | 22: as core::future::future::Future>::poll parallel-heiko_1 | 23: as core::future::future::Future>::poll parallel-heiko_1 | 24: as core::future::future::Future>::poll parallel-heiko_1 | 25: as core::future::future::Future>::poll parallel-heiko_1 | 26: as core::future::future::Future>::poll parallel-heiko_1 | 27: as core::future::future::Future>::poll parallel-heiko_1 | 28: as core::future::future::Future>::poll parallel-heiko_1 | 29: as core::future::future::Future>::poll parallel-heiko_1 | 30: as core::future::future::Future>::poll parallel-heiko_1 | 31: tokio::park::thread::CachedParkThread::block_on parallel-heiko_1 | 32: tokio::runtime::handle::Handle::block_on parallel-heiko_1 | 33: tokio::loom::std::unsafe_cell::UnsafeCell::with_mut parallel-heiko_1 | 34: tokio::runtime::task::harness::Harness::poll parallel-heiko_1 | 35: tokio::runtime::blocking::pool::Inner::run parallel-heiko_1 | 36: std::sys_common::backtrace::__rust_begin_short_backtrace parallel-heiko_1 | 37: core::ops::function::FnOnce::call_once{{vtable.shim}} parallel-heiko_1 | 38: as core::ops::function::FnOnce>::call_once parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/boxed.rs:1572:9 parallel-heiko_1 | as core::ops::function::FnOnce>::call_once parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/boxed.rs:1572:9 parallel-heiko_1 | std::sys::unix::thread::Thread::new::thread_start parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys/unix/thread.rs:74:17 parallel-heiko_1 | 39: start_thread parallel-heiko_1 | 40: clone parallel-heiko_1 | parallel-heiko_1 | parallel-heiko_1 | Thread 'tokio-runtime-worker' panicked at 'Storage root must match that calculated.', /usr/local/cargo/git/checkouts/substrate-7e08433d4c370a21/57346f6/frame/executive/src/lib.rs:503 parallel-heiko_1 | parallel-heiko_1 | This is a bug. Please report it at: parallel-heiko_1 | parallel-heiko_1 | https://github.com/parallel-finance/parallel/issues parallel-heiko_1 | parallel-heiko_1 | 2021-11-14 11:08:02 [Parachain] ✨ Imported #213235 (0x5a65…fce8) parallel-heiko_1 | Hash: given=266036d72251e26dab764d0c06a56b31534ea55ea6b64e87cf41545139ef12fd, expected=65731fc26b8b1d09b25f4ebe0b5c28b34d09475d9ef6f35a525c38528a627f03 parallel-heiko_1 | parallel-heiko_1 | ==================== parallel-heiko_1 | parallel-heiko_1 | Version: 1.7.0-26e51f9-x86_64-linux-gnu parallel-heiko_1 | parallel-heiko_1 | 0: sp_panic_handler::set::{{closure}} parallel-heiko_1 | 1: std::panicking::rust_panic_with_hook parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:626:17 parallel-heiko_1 | 2: std::panicking::begin_panic::{{closure}} parallel-heiko_1 | 3: std::sys_common::backtrace::__rust_end_short_backtrace parallel-heiko_1 | 4: std::panicking::begin_panic parallel-heiko_1 | 5: frame_executive::Executive::final_checks parallel-heiko_1 | 6: tracing::span::Span::in_scope parallel-heiko_1 | 7: frame_executive::Executive::execute_block parallel-heiko_1 | 8: ,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,()>,heiko_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion,frame_system::extensions::check_tx_version::CheckTxVersion,frame_system::extensions::check_genesis::CheckGenesis,frame_system::extensions::check_mortality::CheckMortality,frame_system::extensions::check_nonce::CheckNonce,frame_system::extensions::check_weight::CheckWeight,pallet_transaction_payment::ChargeTransactionPayment)>>>>::execute_block parallel-heiko_1 | 9: std::panicking::try parallel-heiko_1 | 10: std::thread::local::LocalKey::with parallel-heiko_1 | 11: sc_executor::native_executor::WasmExecutor::with_instance::{{closure}} parallel-heiko_1 | 12: sc_executor::wasm_runtime::RuntimeCache::with_instance parallel-heiko_1 | 13: as sp_core::traits::CodeExecutor>::call parallel-heiko_1 | 14: sp_state_machine::execution::StateMachine::execute_aux parallel-heiko_1 | 15: sp_state_machine::execution::StateMachine::execute_using_consensus_failure_handler parallel-heiko_1 | 16: as sc_client_api::call_executor::CallExecutor>::contextual_call parallel-heiko_1 | 17: sp_api::runtime_decl_for_Core::execute_block_call_api_at parallel-heiko_1 | 18: as sp_api::Core<__SR_API_BLOCK__>>::Core_execute_block_runtime_api_impl parallel-heiko_1 | 19: sp_api::Core::execute_block_with_context parallel-heiko_1 | 20: sc_service::client::client::Client::prepare_block_storage_changes parallel-heiko_1 | 21: as core::future::future::Future>::poll parallel-heiko_1 | 22: as core::future::future::Future>::poll parallel-heiko_1 | 23: as core::future::future::Future>::poll parallel-heiko_1 | 24: as core::future::future::Future>::poll parallel-heiko_1 | 25: as core::future::future::Future>::poll parallel-heiko_1 | 26: as core::future::future::Future>::poll parallel-heiko_1 | 27: as core::future::future::Future>::poll parallel-heiko_1 | 28: as core::future::future::Future>::poll parallel-heiko_1 | 29: as core::future::future::Future>::poll parallel-heiko_1 | 30: as core::future::future::Future>::poll parallel-heiko_1 | 31: tokio::park::thread::CachedParkThread::block_on parallel-heiko_1 | 32: tokio::runtime::handle::Handle::block_on parallel-heiko_1 | 33: tokio::loom::std::unsafe_cell::UnsafeCell::with_mut parallel-heiko_1 | 34: tokio::runtime::task::harness::Harness::poll parallel-heiko_1 | 35: tokio::runtime::blocking::pool::Inner::run parallel-heiko_1 | 36: std::sys_common::backtrace::__rust_begin_short_backtrace parallel-heiko_1 | 37: core::ops::function::FnOnce::call_once{{vtable.shim}} parallel-heiko_1 | 38: as core::ops::function::FnOnce>::call_once parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/boxed.rs:1572:9 parallel-heiko_1 | as core::ops::function::FnOnce>::call_once parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/boxed.rs:1572:9 parallel-heiko_1 | std::sys::unix::thread::Thread::new::thread_start parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys/unix/thread.rs:74:17 parallel-heiko_1 | 39: start_thread parallel-heiko_1 | 40: clone parallel-heiko_1 | parallel-heiko_1 | parallel-heiko_1 | Thread 'tokio-runtime-worker' panicked at 'Storage root must match that calculated.', /usr/local/cargo/git/checkouts/substrate-7e08433d4c370a21/57346f6/frame/executive/src/lib.rs:503 parallel-heiko_1 | parallel-heiko_1 | This is a bug. Please report it at: parallel-heiko_1 | parallel-heiko_1 | https://github.com/parallel-finance/parallel/issues parallel-heiko_1 | parallel-heiko_1 | Hash: given=7f400482dacc47fe1e54c80bbc83c5058086d3195713d64d9041e09655c4d98a, expected=aa5453c0bff506c96d9d63f353d542666efbcc37089bfd5440920c429bf49f3f parallel-heiko_1 | parallel-heiko_1 | ==================== parallel-heiko_1 | parallel-heiko_1 | Version: 1.7.0-26e51f9-x86_64-linux-gnu parallel-heiko_1 | parallel-heiko_1 | 0: sp_panic_handler::set::{{closure}} parallel-heiko_1 | 1: std::panicking::rust_panic_with_hook parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:626:17 parallel-heiko_1 | 2: std::panicking::begin_panic::{{closure}} parallel-heiko_1 | 3: std::sys_common::backtrace::__rust_end_short_backtrace parallel-heiko_1 | 4: std::panicking::begin_panic parallel-heiko_1 | 5: frame_executive::Executive::final_checks parallel-heiko_1 | 6: tracing::span::Span::in_scope parallel-heiko_1 | 7: frame_executive::Executive::execute_block parallel-heiko_1 | 8: ,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic::Signer as sp_runtime::traits::IdentifyAccount>::AccountId,()>,heiko_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_spec_version::CheckSpecVersion,frame_system::extensions::check_tx_version::CheckTxVersion,frame_system::extensions::check_genesis::CheckGenesis,frame_system::extensions::check_mortality::CheckMortality,frame_system::extensions::check_nonce::CheckNonce,frame_system::extensions::check_weight::CheckWeight,pallet_transaction_payment::ChargeTransactionPayment)>>>>::execute_block parallel-heiko_1 | 9: std::panicking::try parallel-heiko_1 | 10: std::thread::local::LocalKey::with parallel-heiko_1 | 11: sc_executor::native_executor::WasmExecutor::with_instance::{{closure}} parallel-heiko_1 | 12: sc_executor::wasm_runtime::RuntimeCache::with_instance parallel-heiko_1 | 13: as sp_core::traits::CodeExecutor>::call parallel-heiko_1 | 14: sp_state_machine::execution::StateMachine::execute_aux parallel-heiko_1 | 15: sp_state_machine::execution::StateMachine::execute_using_consensus_failure_handler parallel-heiko_1 | 16: as sc_client_api::call_executor::CallExecutor>::contextual_call parallel-heiko_1 | 17: sp_api::runtime_decl_for_Core::execute_block_call_api_at parallel-heiko_1 | 18: as sp_api::Core<__SR_API_BLOCK__>>::Core_execute_block_runtime_api_impl parallel-heiko_1 | 19: sp_api::Core::execute_block_with_context parallel-heiko_1 | 20: sc_service::client::client::Client::prepare_block_storage_changes parallel-heiko_1 | 21: as core::future::future::Future>::poll parallel-heiko_1 | 22: as core::future::future::Future>::poll parallel-heiko_1 | 23: as core::future::future::Future>::poll parallel-heiko_1 | 24: as core::future::future::Future>::poll parallel-heiko_1 | 25: as core::future::future::Future>::poll parallel-heiko_1 | 26: as core::future::future::Future>::poll parallel-heiko_1 | 27: as core::future::future::Future>::poll parallel-heiko_1 | 28: as core::future::future::Future>::poll parallel-heiko_1 | 29: as core::future::future::Future>::poll parallel-heiko_1 | 30: as core::future::future::Future>::poll parallel-heiko_1 | 31: tokio::park::thread::CachedParkThread::block_on parallel-heiko_1 | 32: tokio::runtime::handle::Handle::block_on parallel-heiko_1 | 33: tokio::loom::std::unsafe_cell::UnsafeCell::with_mut parallel-heiko_1 | 34: tokio::runtime::task::harness::Harness::poll parallel-heiko_1 | 35: tokio::runtime::blocking::pool::Inner::run parallel-heiko_1 | 36: std::sys_common::backtrace::__rust_begin_short_backtrace parallel-heiko_1 | 37: core::ops::function::FnOnce::call_once{{vtable.shim}} parallel-heiko_1 | 38: as core::ops::function::FnOnce>::call_once parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/boxed.rs:1572:9 parallel-heiko_1 | as core::ops::function::FnOnce>::call_once parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/alloc/src/boxed.rs:1572:9 parallel-heiko_1 | std::sys::unix::thread::Thread::new::thread_start parallel-heiko_1 | at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/sys/unix/thread.rs:74:17 parallel-heiko_1 | 39: start_thread parallel-heiko_1 | 40: clone parallel-heiko_1 | parallel-heiko_1 | parallel-heiko_1 | Thread 'tokio-runtime-worker' panicked at 'Storage root must match that calculated.', /usr/local/cargo/git/checkouts/substrate-7e08433d4c370a21/57346f6/frame/executive/src/lib.rs:503 parallel-heiko_1 | parallel-heiko_1 | This is a bug. Please report it at: parallel-heiko_1 | parallel-heiko_1 | https://github.com/parallel-finance/parallel/issues ```

Additional Information

None

GopherJ commented 2 years ago

@nazar-pc it should be polkadot's issue, you can add some flags to use wasm. Let me know if:

...
    --wasm-execution=compiled \
    --execution=wasm \
...

solved your issue

nazar-pc commented 2 years ago

From a quick test seems to help