Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Thread 'Verifier #2' panicked at 'attempted to leave type linked_hash_map::Node<H256, Arc<Vec<u8>>> uninitialized, which is invalid' #157

Closed
jvff opened this issue Dec 9, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@jvff
Copy link

jvff commented Dec 9, 2020

  • OpenEthereum version (>=3.1.0): 3.1.0 (OpenEthereum/v3.1.0-unstable-94a784bfe-20201106/x86_64-linux-gnu/rustc1.48.0)
  • Operating system: Linux (Debian 10)
  • Installation: built from source
  • Fully synchronized: no
  • Network: ethereum
  • Restarted: yes

I started to run it for the first time and left it syncing overnight. First it failed with the following panic:

2020-12-09 07:32:06 UTC Syncing snapshot 6251/6252        #0   26/50 peers   1 KiB chain 0 bytes queue  RPC:  0 conn,    0 req/s,    0 µs
2020-12-09 07:32:08 UTC Migrated 0 ancient blocks
2020-12-09 07:32:11 UTC Syncing #11365000 0x44f2…6bc0     0.00 blk/s    0.0 tx/s    0.0 Mgas/s      0+    0 Qed  #11365000   24/25 peers   110 KiB chain 0 bytes queue  RPC:  0 conn,    0 req/s,    0 µs
2020-12-09 07:32:16 UTC Panic occured, see stderr for details


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

stack backtrace:
   0: panic_hook::set_with::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at library/std/src/panicking.rs:581
   2: std::panicking::begin_panic_handler::{{closure}}
             at library/std/src/panicking.rs:484
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at library/std/src/sys_common/backtrace.rs:153
   4: rust_begin_unwind
             at library/std/src/panicking.rs:483
   5: core::panicking::panic_fmt
             at library/core/src/panicking.rs:85
   6: core::panicking::panic
             at library/core/src/panicking.rs:50
   7: linked_hash_map::LinkedHashMap<K,V,S>::insert
   8: lru_cache::LruCache<K,V,S>::insert
   9: memory_cache::MemoryLruCache<K,V>::insert
  10: <ethcore::state_db::StateDB as ethcore::state::backend::Backend>::cache_code
  11: ethcore::state::State<B>::update_account_cache
  12: ethcore::state::State<B>::code
  13: ethcore::executive::Executive<B>::transact
  14: ethcore::block::OpenBlock::push_transaction
  15: ethcore::client::client::Importer::import_verified_blocks
  16: <ethcore_service::service::ClientIoHandler as ethcore_io::IoHandler<ethcore::client::io_message::ClientIoMessage>>::message
  17: ethcore_io::service_mio::IoChannel<Message>::send_sync
  18: std::sys_common::backtrace::__rust_begin_short_backtrace
  19: core::ops::function::FnOnce::call_once{{vtable.shim}}
  20: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs:1042
      <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs:1042
      std::sys::unix::thread::Thread::new::thread_start
             at library/std/src/sys/unix/thread.rs:87
  21: start_thread
  22: clone


Thread 'Verifier #2' panicked at 'attempted to leave type `linked_hash_map::Node<ethereum_types::H256, std::sync::Arc<std::vec::Vec<u8>>>` uninitialized, which is invalid', /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/mem/mod.rs:658

This is a bug. Please report it at:

    https://github.com/openethereum/openethereum/issues/new


2020-12-09 07:32:16 UTC Finishing work, please wait...
2020-12-09 07:32:16 UTC Block import failed for #11365002 (0x1188…9773): Parent not found (0xf868…88a3) 
2020-12-09 07:32:17 UTC 
Bad block detected: Error(Msg("Parent not found"), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })

It then printed a lot of information (started with RLP:), and I think it panicked again while stopping:

2020-12-09 07:32:17 UTC Panic occured, see stderr for details


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

stack backtrace:
   0: panic_hook::set_with::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at library/std/src/panicking.rs:581
   2: std::panicking::begin_panic_handler::{{closure}}
             at library/std/src/panicking.rs:484
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at library/std/src/sys_common/backtrace.rs:153
   4: rust_begin_unwind
             at library/std/src/panicking.rs:483
   5: core::panicking::panic_fmt
             at library/core/src/panicking.rs:85
   6: core::panicking::panic
             at library/core/src/panicking.rs:50
   7: linked_hash_map::LinkedHashMap<K,V,S>::insert
   8: lru_cache::LruCache<K,V,S>::insert
   9: memory_cache::MemoryLruCache<K,V>::insert
  10: ethcore::client::bad_blocks::BadBlocks::report
  11: ethcore::client::client::Importer::import_verified_blocks
  12: <ethcore_service::service::ClientIoHandler as ethcore_io::IoHandler<ethcore::client::io_message::ClientIoMessage>>::message
  13: ethcore_io::service_mio::IoChannel<Message>::send_sync
  14: std::sys_common::backtrace::__rust_begin_short_backtrace
  15: core::ops::function::FnOnce::call_once{{vtable.shim}}
  16: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs:1042
      <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs:1042
      std::sys::unix::thread::Thread::new::thread_start
             at library/std/src/sys/unix/thread.rs:87
  17: start_thread
  18: clone


Thread 'Verifier #7' panicked at 'attempted to leave type `linked_hash_map::Node<ethereum_types::H256, (verification::queue::kind::blocks::Unverified, std::string::String)>` uninitialized, which is invalid', /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/mem/mod.rs:658

This is a bug. Please report it at:

    https://github.com/openethereum/openethereum/issues/new


2020-12-09 07:32:17 UTC Panic occured, see stderr for details


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

stack backtrace:
   0: panic_hook::set_with::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at library/std/src/panicking.rs:581
   2: std::panicking::begin_panic_handler::{{closure}}
             at library/std/src/panicking.rs:484
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at library/std/src/sys_common/backtrace.rs:153
   4: rust_begin_unwind
             at library/std/src/panicking.rs:483
   5: core::panicking::panic_fmt
             at library/core/src/panicking.rs:85
   6: core::option::expect_none_failed
             at library/core/src/option.rs:1234
   7: <ethcore::verification::queue::VerificationQueue<K> as core::ops::drop::Drop>::drop
   8: core::ptr::drop_in_place
   9: core::ptr::drop_in_place
  10: alloc::sync::Arc<T>::drop_slow
  11: alloc::sync::Arc<T>::drop_slow
  12: alloc::sync::Arc<T>::drop_slow
  13: alloc::sync::Arc<T>::drop_slow
  14: <hashbrown::raw::RawTable<T> as core::ops::drop::Drop>::drop
  15: alloc::sync::Arc<T>::drop_slow
  16: core::ptr::drop_in_place
  17: <futures::future::lazy::Lazy<F,R> as futures::future::Future>::poll
  18: tokio_threadpool::worker::Worker::run_task
  19: tokio_threadpool::worker::Worker::run
  20: tokio_reactor::with_default
  21: tokio::runtime::threadpool::builder::Builder::build::{{closure}}
  22: std::sys_common::backtrace::__rust_begin_short_backtrace
  23: core::ops::function::FnOnce::call_once{{vtable.shim}}
  24: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs:1042
      <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/alloc/src/boxed.rs:1042
      std::sys::unix::thread::Thread::new::thread_start
             at library/std/src/sys/unix/thread.rs:87
  25: start_thread
  26: clone


Thread 'event.loop0' panicked at 'Propagating verifier thread panic on shutdown: Any', /opt/openethereum/ethcore/src/verification/queue/mod.rs:853

This is a bug. Please report it at:

    https://github.com/openethereum/openethereum/issues/new
@rakita rakita added the duplicate This issue or pull request already exists label Dec 9, 2020
@rakita
Copy link
Contributor

rakita commented Dec 9, 2020

It is because of rust 1.48, it is fixed in dev branch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants