Skip to content
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

Loading ZQ1 persistence panics on leader selection #814

Open
mauromedda opened this issue Apr 3, 2024 · 0 comments
Open

Loading ZQ1 persistence panics on leader selection #814

mauromedda opened this issue Apr 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mauromedda
Copy link
Contributor

Loading ZQ1 persistence panics on leader selection because the loaded state does not contain any stake for the ZQ2 nodes, whereas ZQ2 enforces the invariant of validators having non-zero stake.

Error:
thread 'tokio-runtime-worker' panicked at zilliqa/src/consensus.rs:1682:69: called Option::unwrap()on aNonevalue stack backtrace: 0: rust_begin_unwind at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5 1: core::panicking::panic_fmt at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14 2: core::panicking::panic at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:127:5 3: core::option::Option<T>::unwrap at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:931:21 4: zilliqa::consensus::Consensus::leader::{{closure}} at ./project/zilliqa/src/consensus.rs:1682:69 5: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:305:13 6: core::option::Option<T>::map at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:1072:29 7: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::next at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/adapters/map.rs:103:26 8: rand::distributions::weighted_index::WeightedIndex<X>::new at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/rand-0.8.5/src/distributions/weighted_index.rs:103:35 9: zilliqa::consensus::Consensus::leader at ./project/zilliqa/src/consensus.rs:1681:20 10: zilliqa::consensus::Consensus::timeout at ./project/zilliqa/src/consensus.rs:464:22 11: zilliqa::node::Node::handle_timeout at ./project/zilliqa/src/node.rs:235:43 12: zilliqa::node_launcher::NodeLauncher::start_shard_node::{{closure}} at ./project/zilliqa/src/node_launcher.rs:146:21 13: zilliqa::p2p_node::P2pNode::add_shard_node::{{closure}}::{{closure}} at ./project/zilliqa/src/p2p_node.rs:175:57 14: tokio::runtime::task::core::Core<T,S>::poll::{{closure}} at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/core.rs:328:17 15: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/loom/std/unsafe_cell.rs:16:9 16: tokio::runtime::task::core::Core<T,S>::poll at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/core.rs:317:13 17: tokio::runtime::task::harness::poll_future::{{closure}} at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/harness.rs:485:19 18: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9 19: std::panicking::try::do_call at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40 20: std::panicking::try at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19 21: std::panic::catch_unwind at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14 22: tokio::runtime::task::harness::poll_future at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/harness.rs:473:18 23: tokio::runtime::task::harness::Harness<T,S>::poll_inner at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/harness.rs:208:27 24: tokio::runtime::task::harness::Harness<T,S>::poll at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/harness.rs:153:15 25: tokio::runtime::task::raw::RawTask::poll at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/raw.rs:201:18 26: tokio::runtime::task::LocalNotified<S>::run at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/mod.rs:427:9 27: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}} at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/multi_thread/worker.rs:576:18 28: tokio::runtime::coop::with_budget at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/coop.rs:107:5 29: tokio::runtime::coop::budget at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/coop.rs:73:5 30: tokio::runtime::scheduler::multi_thread::worker::Context::run_task at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/multi_thread/worker.rs:575:9 31: tokio::runtime::scheduler::multi_thread::worker::Context::run at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/multi_thread/worker.rs:526:24 32: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}} at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/multi_thread/worker.rs:491:21 33: tokio::runtime::context::scoped::Scoped<T>::set at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/context/scoped.rs:40:9 34: tokio::runtime::context::set_scheduler::{{closure}} at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/context.rs:176:26 35: std::thread::local::LocalKey<T>::try_with at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:270:16 36: std::thread::local::LocalKey<T>::with at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/local.rs:246:9 37: tokio::runtime::context::set_scheduler at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/context.rs:176:17 38: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}} at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/multi_thread/worker.rs:486:9 39: tokio::runtime::context::runtime::enter_runtime at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/context/runtime.rs:65:16 40: tokio::runtime::scheduler::multi_thread::worker::run at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/multi_thread/worker.rs:478:5 41: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}} at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/multi_thread/worker.rs:447:45 42: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/blocking/task.rs:42:21 43: tokio::runtime::task::core::Core<T,S>::poll::{{closure}} at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/core.rs:328:17 44: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/loom/std/unsafe_cell.rs:16:9 45: tokio::runtime::task::core::Core<T,S>::poll at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/core.rs:317:13 46: tokio::runtime::task::harness::poll_future::{{closure}} at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/harness.rs:485:19 47: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panic/unwind_safe.rs:272:9 48: std::panicking::try::do_call at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40 49: std::panicking::try at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19 50: std::panic::catch_unwind at ./rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14 51: tokio::runtime::task::harness::poll_future at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/harness.rs:473:18 52: tokio::runtime::task::harness::Harness<T,S>::poll_inner at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/harness.rs:208:27 53: tokio::runtime::task::harness::Harness<T,S>::poll at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/harness.rs:153:15 54: tokio::runtime::task::raw::poll at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/raw.rs:271:5 55: tokio::runtime::task::raw::RawTask::poll at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/raw.rs:201:18 56: tokio::runtime::task::UnownedTask<S>::run at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/task/mod.rs:464:9 57: tokio::runtime::blocking::pool::Task::run at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/blocking/pool.rs:159:9 58: tokio::runtime::blocking::pool::Inner::run at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/blocking/pool.rs:513:17 59: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}} at ./cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/blocking/pool.rs:471:13 note: Some details are omitted, run withRUST_BACKTRACE=full for a verbose backtrace. {"timestamp":"2024-04-03T10:35:47.242753Z","level":"ERROR","fields":{"e":"task 5 panicked"},"target":"zilliqa::p2p_node","line_number":376}

@mauromedda mauromedda added the bug Something isn't working label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant