3Dpass / 3DP

The Implementation of The Ledger of Things Node. Layer 1 decentralized blockchain platform for the tokenization of objects. Proof of Scan protocol. Useful smart-contracts and dApps.
https://3dpass.org/
GNU General Public License v3.0
23 stars 17 forks source link

Node crash right after dev started miner #36

Closed benrod3k closed 2 years ago

benrod3k commented 2 years ago

This happens during the mainnet launch.

Reproduce

At block 0, node start smoothly.

At block about 3, node crashed. During the mainnet launch, dev started to run miner, and a fresh node just crashed. After empty db, tried to start the node again, same error message will appear. More than one miners posted the same error message. This could be an issue.

Rejoin the chain at around block 20.

It seems to be some edge cases.

Error message for the record

====================

Version: 3.0.0-bd18d6a-x86_64-linux-gnu

   0: sp_panic_handler::set::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:702:17
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:588:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys_common/backtrace.rs:138:18
   4: rust_begin_unwind
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/panicking.rs:584:5
   5: core::panicking::panic_fmt
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:142:14
   6: core::panicking::panic_display
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:72:5
   7: core::panicking::panic_str
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/panicking.rs:56:5
   8: core::option::expect_failed
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/core/src/option.rs:1874:5
   9: p3d::polyline::GenPolyLines::select_top
  10: p3d::algo_grid::find_top_std
  11: p3d::p3d_process
  12: poscan_grid2d::get_obj_hashes
  13: <poscan_grid2d::PoscanAlgorithm<C> as sc_consensus_poscan::PowAlgorithm<B>>::verify
  14: <sc_consensus_poscan::PowBlockImport<B,I,C,S,Algorithm,CAW,CIDP> as sc_consensus::block_import::BlockImport<B>>::import_block::{{closure}}
  15: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  16: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  17: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  18: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  19: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
  20: <sc_service::task_manager::prometheus_future::PrometheusFuture<T> as core::future::future::Future>::poll
  21: <futures_util::future::select::Select<A,B> as core::future::future::Future>::poll
  22: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  23: std::thread::local::LocalKey<T>::with
  24: tokio::park::thread::CachedParkThread::block_on
  25: tokio::runtime::handle::Handle::block_on
  26: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
  27: tokio::runtime::task::harness::Harness<T,S>::poll
  28: tokio::runtime::blocking::pool::Inner::run
  29: std::sys_common::backtrace::__rust_begin_short_backtrace
  30: core::ops::function::FnOnce::call_once{{vtable.shim}}
  31: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/alloc/src/boxed.rs:1951:9
      std::sys::unix::thread::Thread::new::thread_start
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library/std/src/sys/unix/thread.rs:108:17
  32: start_thread
             at /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477:8
  33: clone
             at /build/glibc-SzIz7B/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 'tokio-runtime-worker' panicked at 'Out of bounds access', /home/ben/.cargo/git/checkouts/p3d-675c372166b26a37/ac87950/src/polyline.rs:186

This is a bug. Please report it at:

        https://github.com/substrate-developer-hub/recipes/issues
PaulSff commented 2 years ago

fixed: https://github.com/3Dpass/3DP/commit/eb9e2ec24399b9b4cdf65ed8f9ae24705a3302ed