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

Compiled 3.1.0 binary crashes with rustc 1.48, works with rustc 1.46. #120

Closed
palkeo opened this issue Nov 23, 2020 · 7 comments
Closed
Labels
bug Something isn't working

Comments

@palkeo
Copy link

palkeo commented Nov 23, 2020

  • OpenEthereum version (>=3.1.0): 3.1.0
  • Operating system: Ubuntu 18.04
  • Installation: built from source

Building openethereum 3.1.0 from source, compilation succeeds regardless of compiler version.

If built with rustc 1.46, it runs normally.
If built with rust 1.48, openethereum will systematically panic after a few seconds.

Thread 'Verifier #1' panicked at 'attempted to leave type `linked_hash_map::Node<ethereum_types::H160, std::option::Option<state::account::Account>>` uninitialized, which is invalid', /rustc/21dea46d8347c8b4117c5567949703f0fbb51649/library/core/src/mem/mod.rs:659

The panic is trivial to reproduce: start openethereum --no-warp and it will panic when trying to sync the first blocks of mainnet, after a few seconds.

Thanks @roninkaizen for helping narrow down the problem to compiler version.

@roninkaizen
Copy link

roninkaizen commented Nov 23, 2020

can confirm!
grafik

@roninkaizen
Copy link

roninkaizen commented Nov 23, 2020

i can confirm after 2 hours of comparison and updates it became clear,
that builds created with rust 1.4.6 behave completely normal, (like shown within this post)
after updating rust to 1.4.8, i only created non functional versions like shown above
grafik
using picture proof for comparison and confirmation

@adria0
Copy link
Contributor

adria0 commented Nov 24, 2020

Confirmed.

main branch, rustc 1.48, db from scratch

2020-11-24 09:33:41 UTC Starting OpenEthereum/v3.1.0-rc1-stable-ee2b16dfe-20201112/x86_64-linux-gnu/rustc1.48.0
2020-11-24 09:33:41 UTC Keys path /home/adria/.local/share/openethereum/keys/ethereum
2020-11-24 09:33:41 UTC DB path /home/adria/.local/share/openethereum/chains/ethereum/db/906a34e69aec8c0d
2020-11-24 09:33:41 UTC State DB configuration: fast
2020-11-24 09:33:41 UTC Operating mode: active
2020-11-24 09:33:41 UTC Configured for Ethereum using Ethash engine
2020-11-24 09:33:41 UTC Listening for new connections on 127.0.0.1:8546.
2020-11-24 09:33:42 UTC Updated conversion rate to Ξ1 = US$611.64 (7785469.5 wei/gas)
2020-11-24 09:33:43 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: ethcore::state_db::StateDB::sync_cache
  10: ethcore::client::client::Importer::import_verified_blocks
  11: <ethcore_service::service::ClientIoHandler as ethcore_io::IoHandler<ethcore::client::io_message::ClientIoMessage>>::message
  12: ethcore_io::service_mio::IoChannel<Message>::send_sync
  13: std::sys_common::backtrace::__rust_begin_short_backtrace
  14: core::ops::function::FnOnce::call_once{{vtable.shim}}
  15: <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
  16: start_thread
  17: __clone


Thread 'Verifier #1' panicked at 'attempted to leave type `linked_hash_map::Node<ethereum_types::H160, std::option::Option<state::account::Account>>` uninitialized, which is invalid', /home/adria/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:658

This is a bug. Please report it at:

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


2020-11-24 09:33:43 UTC Finishing work, please wait...
2020-11-24 09:33:43 UTC Block import failed for #2 (0xb495…98c9): Parent not found (0x88e9…6cb6)
2020-11-24 09:33:43 UTC
Bad block detected: Error(Msg("Parent not found"), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })
RLP: f9021df90218a088e96d4537bea4d9c05d12549907b32561d3bf31f45aae734cdc119f13406cb6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794dd2f1e6e498202e86d8f5442af596580a4f03c2ca04943d941637411107494da9ec8bc04359d731bfd08b72b4d0edcbd4cd2ecb341a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b90100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008503ff00100002821388808455ba4241a0476574682f76312e302e302d30636463373634372f6c696e75782f676f312e34a02f0790c5aa31ab94195e1f6443d645af5b75c46c04fbf9911711198a0ce8fdda88b853fa261a86aa9ec0c0
Header: Header { parent_hash: 0x88e96d4537bea4d9c05d12549907b32561d3bf31f45aae734cdc119f13406cb6, timestamp: 1438270017, number: 2, author: 0xdd2f1e6e498202e86d8f5442af596580a4f03c2c, transactions_root: 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421, uncles_hash: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347, extra_data: [71, 101, 116, 104, 47, 118, 49, 46, 48, 46, 48, 45, 48, 99, 100, 99, 55, 54, 52, 55, 47, 108, 105, 110, 117, 120, 47, 103, 111, 49, 46, 52], state_root: 0x4943d941637411107494da9ec8bc04359d731bfd08b72b4d0edcbd4cd2ecb341, receipts_root: 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421, log_bloom: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, gas_used: 0, gas_limit: 5000, difficulty: 17163096064, seal: [[160, 47, 7, 144, 197, 170, 49, 171, 148, 25, 94, 31, 100, 67, 214, 69, 175, 91, 117, 196, 108, 4, 251, 249, 145, 23, 17, 25, 138, 12, 232, 253, 218], [136, 184, 83, 250, 38, 26, 134, 170, 158]], hash: Some(0xb495a1d7e6663152ae92708da4843337b958146015a2802f4193a410044698c9) }
Uncles:
Transactions:

2020-11-24 09:33:43 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 #3' 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', /home/adria/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:658

This is a bug. Please report it at:

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


2020-11-24 09:33:46 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: <hashbrown::raw::RawTable<T> as core::ops::drop::Drop>::drop
  14: alloc::sync::Arc<T>::drop_slow
  15: core::ptr::drop_in_place
  16: <futures::future::lazy::Lazy<F,R> as futures::future::Future>::poll
  17: tokio_threadpool::worker::Worker::run_task
  18: tokio_threadpool::worker::Worker::run
  19: tokio_reactor::with_default
  20: tokio::runtime::threadpool::builder::Builder::build::{{closure}}
  21: std::sys_common::backtrace::__rust_begin_short_backtrace
  22: core::ops::function::FnOnce::call_once{{vtable.shim}}
  23: <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
  24: start_thread
  25: __clone


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

This is a bug. Please report it at:

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


Error: 1

@adria0 adria0 added the bug Something isn't working label Nov 24, 2020
@c0deright
Copy link

offtopic: @roninkaizen please don't post screenshots when you easily can copy & paste your terminals content as text. This is better for a) search engines and b) blind people using a braille display. Thanks.

@marek-obuchowicz
Copy link

Same problems observed with rustc version 1.49.0-beta.1

@roninkaizen
Copy link

roninkaizen commented Nov 28, 2020

being fixed with the "dev" branch :)

grafik

@rakita
Copy link
Contributor

rakita commented Dec 1, 2020

fix is in dev branch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants