Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Revert is failing for parachains #1383

Closed
crystalin opened this issue Jun 17, 2022 · 5 comments · Fixed by moonbeam-foundation/moonbeam#1612
Closed

Revert is failing for parachains #1383

crystalin opened this issue Jun 17, 2022 · 5 comments · Fixed by moonbeam-foundation/moonbeam#1612
Assignees

Comments

@crystalin
Copy link

Using moonbeam v0.24.0, based on substrate/polkadot 0.9.20:
using command

/var/lib/alphanet-data/moonbeam revert --base-path /var/lib/alphanet-data --chain alphanet 1

I get the following error:

2022-06-17 13:37:46 Essential task `transaction-pool-task-1` failed. Shutting down service.
2022-06-17 13:37:46 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
2022-06-17 13:37:46 Essential task `txpool-background` failed. Shutting down service.
2022-06-17 13:37:46 Essential task `transaction-pool-task-0` failed. Shutting down service.
2022-06-17 13:37:46 Essential task `basic-block-import-worker` failed. Shutting down service.
                                                                                                                                                                                                   ====================

Version: 0.24.0-8369da6dd
                                                                                                                                                                                                      0: sp_panic_handler::set::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/panicking.rs:702:17
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/panicking.rs:586:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/sys_common/backtrace.rs:138:18
   4: rust_begin_unwind
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/panicking.rs:584:5
   5: core::panicking::panic_fmt
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/core/src/panicking.rs:143:14
   6: core::panicking::panic
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/core/src/panicking.rs:48:5
   7: sc_finality_grandpa::revert
   8: core::ops::function::FnOnce::call_once{{vtable.shim}}
   9: sc_cli::runner::main::{{closure}}::{{closure}}::{{closure}}
  10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  11: sc_cli::runner::Runner<C>::async_run
  12: moonbeam_cli::command::run
  13: moonbeam::main
  14: std::sys_common::backtrace::__rust_begin_short_backtrace
  15: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/core/src/ops/function.rs:259:13
      std::panicking::try::do_call
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/panicking.rs:492:40
      std::panicking::try
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/panicking.rs:456:19
      std::panic::catch_unwind
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/panic.rs:137:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/rt.rs:128:48
      std::panicking::try::do_call
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/panicking.rs:492:40
      std::panicking::try
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/panicking.rs:456:19
      std::panic::catch_unwind
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/panic.rs:137:14
      std::rt::lang_start_internal
             at /rustc/3b348d932aa5c9884310d025cf7c516023fd0d9a/library/std/src/rt.rs:128:20
  16: main
  17: __libc_start_main
  18: _start


Thread 'main' panicked at 'internal error: entered unreachable code', /home/gh-actions/.cargo/git/checkouts/substrate-7e08433d4c370a21/563f482/client/finality-grandpa/src/lib.rs:1189

This is a bug. Please report it at:

        https:/PureStake/moonbeam/issues/new

Segmentation fault
@bkchr
Copy link
Member

bkchr commented Jun 17, 2022

@davxy please take a look. I assume that I probably also fails with statemine/statemint

@davxy davxy self-assigned this Jun 17, 2022
@davxy
Copy link
Member

davxy commented Jun 18, 2022

@crystalin I've investigated the problem and looks like it stems from Moonbean usage of grandpa revert procedure while not using grandpa subsystem

In particular the issue has been introduced in Moonbeam here moonbeam-foundation/moonbeam#1438

I've opened a PR on Moonbeam to fix it moonbeam-foundation/moonbeam#1612

Nevertheless this issue highlights the fact that we should make our implementation more resilient to misuse, i.e. gently handle cases like this.

I'll come with a follow up PR on Substrate to address this last consideration.

@davxy
Copy link
Member

davxy commented Jun 18, 2022

@davxy please take a look. I assume that I probably also fails with statemine/statemint

@bkchr - Not affected, we're not reverting grandpa there

Ok(cmd.run(components.client, components.backend, None))

@bkchr
Copy link
Member

bkchr commented Jun 18, 2022

Ahh nice. Yeah I thought that they maybe had triggered some special code path in the embedded relay chain node. Did not had expected that there was a grandpa revert in the node.

@crystalin
Copy link
Author

Thank you @davxy / @bkchr
I didn't think it could have been introduced on our side neither, I'll check why.
Sorry about that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants