Skip to content

Can't compile massa_consensus #93223

Description

@vdmklchv

Compiling massa_consensus v0.1.0 (/root/nodes/massa/massa-consensus) warning: an associated function with this name may be added to the standard library in the future --> massa-consensus/src/pos.rs:523:37 | 523 | let bits_u8_len = n_entries.div_ceil(&u8::BITS) as usize; | ^^^^^^^^ | = note: #[warn(unstable_name_collisions)]on by default = warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in behavior! = note: for more information, see issue #48919 <https://github.com/rust-lang/rust/issues/48919> = help: call with fully qualified syntaxnum::Integer::div_ceil(...)to keep using the current method = help: add#![feature(int_roundings)]to the crate attributes to enablecore::num::::div_ceil`

error: internal compiler error: compiler/rustc_mir_transform/src/generator.rs:755:13: Broken MIR: generator contains type tokio::sync::oneshot::Sender<HashMap<OperationId, OperationSearchResult, BuildHasherDefault<HHasher>>> in MIR, but typeck only knows about {ResumeTy, &mut ConsensusWorker, ConsensusCommand, HashSet<OperationId, BuildHasherDefault<HHasher>>, &HashSet<OperationId, BuildHasherDefault<HHasher>>, impl Future<Output = HashMap<OperationId, OperationSearchResult, BuildHasherDefault<HHasher>>>, (), Vec, &ConsensusWorker, impl Future<Output = ()>, HashSet<massa_models::Address, BuildHasherDefault<HHasher<massa_models::Address>>>} and [&mut consensus_worker::ConsensusWorker, consensus_worker::ConsensusCommand]
--> massa-consensus/src/consensus_worker.rs:760:37
|
760 | ) -> Result<(), ConsensusError> {
| _____________________________________^
761 | | match cmd {
762 | | ConsensusCommand::GetBlockGraphStatus {
763 | | slot_start,
... |
1040 | | }
1041 | | }
| |_____^

thread 'rustc' panicked at 'Box', /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/compiler/rustc_errors/src/lib.rs:1115:9
stack backtrace:
0: 0x7f7880d0c3ec - std::backtrace_rs::backtrace::libunwind::trace::hb48ad287257c36e7
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7f7880d0c3ec - std::backtrace_rs::backtrace::trace_unsynchronized::h679c2e7fa9f90a51
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f7880d0c3ec - std::sys_common::backtrace::_print_fmt::h771f024e2eaed338
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/std/src/sys_common/backtrace.rs:67:5
3: 0x7f7880d0c3ec - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7132bd4f16bd6d69
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/std/src/sys_common/backtrace.rs:46:22
4: 0x7f7880d6da2c - core::fmt::write::hc1090d9f6f84382a
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/core/src/fmt/mod.rs:1168:17
5: 0x7f7880cfb9e3 - std::io::Write::write_fmt::h7b6754a372143618
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/std/src/io/mod.rs:1653:15
6: 0x7f7880d10812 - std::sys_common::backtrace::_print::h96e3793d8d660752
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/std/src/sys_common/backtrace.rs:49:5
7: 0x7f7880d10812 - std::sys_common::backtrace::print::hb2eae54cbcfd4e47
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/std/src/sys_common/backtrace.rs:36:9
8: 0x7f7880d10812 - std::panicking::default_hook::{{closure}}::hc9fac78a51cd0337
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/std/src/panicking.rs:290:50
9: 0x7f7880d103f5 - std::panicking::default_hook::hb58fc45684bdfd3d
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/std/src/panicking.rs:307:9
10: 0x7f78814f2e71 - rustc_driver[6411da232ab80ee0]::DEFAULT_HOOK::{closure#0}::{closure#0}
11: 0x7f787129d019 - <alloc::boxed::Box<F,A> as core::ops::function::Fn>::call::hacc1e7c42743c631
12: 0x7f78712d6674 - proc_macro::bridge::client::::enter::{{closure}}::{{closure}}::h0c10691982ef91d7
13: 0x7f7871337b96 - std::panicking::update_hook::{{closure}}::h22d5f1b7e8e3879d
14: 0x7f7880d1102b - std::panicking::rust_panic_with_hook::hfc151d1d6b46500f
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/std/src/panicking.rs:695:17
15: 0x7f7881768aa1 - std[703fa669232cf4b6]::panicking::begin_panic::<rustc_errors[e4272de1055763e9]::ExplicitBug>::{closure#0}
16: 0x7f7881768856 - std[703fa669232cf4b6]::sys_common::backtrace::__rust_end_short_backtrace::<std[703fa669232cf4b6]::panicking::begin_panic<rustc_errors[e4272de1055763e9]::ExplicitBug>::{closure#0}, !>
17: 0x7f78816fc2af - std[703fa669232cf4b6]::panicking::begin_panic::<rustc_errors[e4272de1055763e9]::ExplicitBug>
18: 0x7f788176828d - std[703fa669232cf4b6]::panic::panic_any::<rustc_errors[e4272de1055763e9]::ExplicitBug>
19: 0x7f7881762b68 - <rustc_errors[e4272de1055763e9]::HandlerInner>::span_bug::<rustc_span[e6be7de262c29bd6]::span_encoding::Span>
20: 0x7f7881762940 - <rustc_errors[e4272de1055763e9]::Handler>::span_bug::<rustc_span[e6be7de262c29bd6]::span_encoding::Span>
21: 0x7f788170f878 - rustc_middle[b7fb38e3166cfe28]::ty::context::tls::with_opt::<rustc_middle[b7fb38e3166cfe28]::util::bug::opt_span_bug_fmt<rustc_span[e6be7de262c29bd6]::span_encoding::Span>::{closure#0}, ()>
22: 0x7f788170f930 - rustc_middle[b7fb38e3166cfe28]::util::bug::opt_span_bug_fmt::<rustc_span[e6be7de262c29bd6]::span_encoding::Span>
23: 0x7f788170f8fc - rustc_middle[b7fb38e3166cfe28]::util::bug::span_bug_fmt::<rustc_span[e6be7de262c29bd6]::span_encoding::Span>
24: 0x7f78834e2b9d - <rustc_mir_transform[6e25e1d9a994042f]::generator::StateTransform as rustc_middle[b7fb38e3166cfe28]::mir::MirPass>::run_pass
25: 0x7f7882837f9f - rustc_mir_transform[6e25e1d9a994042f]::pass_manager::run_passes
26: 0x7f78834f8158 - rustc_mir_transform[6e25e1d9a994042f]::optimized_mir
27: 0x7f7882d8cb4b - rustc_query_system[46595e61c46ccde4]::query::plumbing::try_execute_query::<rustc_query_impl[2692d0063d807fd3]::plumbing::QueryCtxt, rustc_query_system[46595e61c46ccde4]::query::caches::DefaultCache<rustc_span[e6be7de262c29bd6]::def_id::DefId, &rustc_middle[b7fb38e3166cfe28]::mir::Body>>
28: 0x7f7882ded8a7 - <rustc_query_impl[2692d0063d807fd3]::Queries as rustc_middle[b7fb38e3166cfe28]::ty::query::QueryEngine>::optimized_mir
29: 0x7f7882e86601 - <rustc_metadata[909f2eb977226b6d]::rmeta::encoder::EncodeContext>::encode_crate_root
30: 0x7f78839bdc01 - rustc_metadata[909f2eb977226b6d]::rmeta::encoder::encode_metadata_impl
31: 0x7f78839e9921 - rustc_data_structures[a97acf3660fd11ae]::sync::join::<rustc_metadata[909f2eb977226b6d]::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata[909f2eb977226b6d]::rmeta::encoder::encode_metadata::{closure#1}, rustc_metadata[909f2eb977226b6d]::rmeta::encoder::EncodedMetadata, ()>
32: 0x7f78839bd3d6 - rustc_metadata[909f2eb977226b6d]::rmeta::encoder::encode_metadata
33: 0x7f7883343066 - <rustc_interface[e5f6a38305c70f78]::passes::QueryContext>::enter::<<rustc_interface[e5f6a38305c70f78]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[788739432280db2a]::result::Result<alloc[3f5582607e8bd22]::boxed::Box<dyn core[788739432280db2a]::any::Any>, rustc_errors[e4272de1055763e9]::ErrorReported>>
34: 0x7f788333ba3f - <rustc_interface[e5f6a38305c70f78]::queries::Queries>::ongoing_codegen
35: 0x7f788331979d - <rustc_interface[e5f6a38305c70f78]::interface::Compiler>::enter::<rustc_driver[6411da232ab80ee0]::run_compiler::{closure#1}::{closure#2}, core[788739432280db2a]::result::Result<core[788739432280db2a]::option::Option<rustc_interface[e5f6a38305c70f78]::queries::Linker>, rustc_errors[e4272de1055763e9]::ErrorReported>>
36: 0x7f78832fe6dc - rustc_span[e6be7de262c29bd6]::with_source_map::<core[788739432280db2a]::result::Result<(), rustc_errors[e4272de1055763e9]::ErrorReported>, rustc_interface[e5f6a38305c70f78]::interface::create_compiler_and_run<core[788739432280db2a]::result::Result<(), rustc_errors[e4272de1055763e9]::ErrorReported>, rustc_driver[6411da232ab80ee0]::run_compiler::{closure#1}>::{closure#1}>
37: 0x7f7883318ef4 - <scoped_tls[fadc8eb0bb570999]::ScopedKey<rustc_span[e6be7de262c29bd6]::SessionGlobals>>::set::<rustc_interface[e5f6a38305c70f78]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface[e5f6a38305c70f78]::interface::run_compiler<core[788739432280db2a]::result::Result<(), rustc_errors[e4272de1055763e9]::ErrorReported>, rustc_driver[6411da232ab80ee0]::run_compiler::{closure#1}>::{closure#0}, core[788739432280db2a]::result::Result<(), rustc_errors[e4272de1055763e9]::ErrorReported>>::{closure#0}::{closure#0}, core[788739432280db2a]::result::Result<(), rustc_errors[e4272de1055763e9]::ErrorReported>>
38: 0x7f78832ff765 - std[703fa669232cf4b6]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[e5f6a38305c70f78]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface[e5f6a38305c70f78]::interface::run_compiler<core[788739432280db2a]::result::Result<(), rustc_errors[e4272de1055763e9]::ErrorReported>, rustc_driver[6411da232ab80ee0]::run_compiler::{closure#1}>::{closure#0}, core[788739432280db2a]::result::Result<(), rustc_errors[e4272de1055763e9]::ErrorReported>>::{closure#0}, core[788739432280db2a]::result::Result<(), rustc_errors[e4272de1055763e9]::ErrorReported>>
39: 0x7f788332a669 - <<std[703fa669232cf4b6]::thread::Builder>::spawn_unchecked<rustc_interface[e5f6a38305c70f78]::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface[e5f6a38305c70f78]::interface::run_compiler<core[788739432280db2a]::result::Result<(), rustc_errors[e4272de1055763e9]::ErrorReported>, rustc_driver[6411da232ab80ee0]::run_compiler::{closure#1}>::{closure#0}, core[788739432280db2a]::result::Result<(), rustc_errors[e4272de1055763e9]::ErrorReported>>::{closure#0}, core[788739432280db2a]::result::Result<(), rustc_errors[e4272de1055763e9]::ErrorReported>>::{closure#1} as core[788739432280db2a]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
40: 0x7f7880d1cc13 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once::he0d859a3c195910a
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/alloc/src/boxed.rs:1854:9
41: 0x7f7880d1cc13 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once::hd1ea1710e4b4413d
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/alloc/src/boxed.rs:1854:9
42: 0x7f7880d1cc13 - std::sys::unix::thread::Thread::new::thread_start::h0885fb48df4ea29d
at /rustc/bfe15646761a75f0259e204cab071565eed2b1e5/library/std/src/sys/unix/thread.rs:108:17
43: 0x7f7880c46609 - start_thread
44: 0x7f7880b60293 - clone
45: 0x0 -

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.60.0-nightly (bfe1564 2022-01-22) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C embed-bitcode=no --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [optimized_mir] optimizing MIR for consensus_worker::<impl at massa-consensus/src/consensus_worker.rs:163:1: 1471:2>::process_consensus_command::{closure#0}
end of query stack
warning: massa_consensus (lib) generated 1 warning
error: could not compile massa_consensus; 1 warning emitted`

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions