Closed
Description
Code
https://github.com/teor2345/zebra/tree/clippy-ice , zebra-consensus crate
I tried minimising the error, but I struggled to reproduce it. It seems to be intermittent, and occur in slightly different crates each time.
This code does not reproduce the error. But it is responsible for the bounds in the error message:
use thiserror::Error;
pub type BoxError = Box<dyn std::error::Error + Send + Sync + 'static>;
#[derive(Error, Debug, Copy, Clone, Eq, PartialEq)]
pub enum RedJubjubError {
#[error("Malformed signing key encoding.")]
MalformedSigningKey,
...
}
#[derive(Error, Debug, PartialEq)]
pub enum TransactionError {
#[error("bindingSig MUST represent a valid signature under the transaction binding validating key bvk of SigHash")]
RedJubjub(RedJubjubError),
#[error("Downcast from BoxError to RedJubjubError failed")]
InternalDowncastError(String),
...
}
impl From<BoxError> for TransactionError {
fn from(err: BoxError) -> Self {
match err.downcast::<RedJubjubError>() {
Ok(e) => TransactionError::RedJubjub(*e),
Err(e) => TransactionError::InternalDowncastError(format!(
"downcast to RedJubjubError failed, original error: {:?}",
e
)),
}
}
}
Command
cd zebra-consensus
cargo clippy --all-targets
The error doesn't occur unless cargo clippy
is passed --all-targets
.
The following commands all execute successfully:
cargo test
cargo build
cargo build --release
Meta
cargo clippy -V
: clippy 0.1.52 (f826641 2021-03-21)rustc -Vv
:
rustc 1.53.0-nightly (f82664191 2021-03-21)
binary: rustc
commit-hash: f82664191d0e8764b7435b9d72eb0e366b8b1464
commit-date: 2021-03-21
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0
Error output
warning: inconsistent struct constructor
--> zebra-consensus/src/primitives/groth16.rs:149:9
|
149 | Self { batch, tx, pvk }
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Self { batch, pvk, tx }`
|
= note: `#[warn(clippy::inconsistent_struct_constructor)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.h
tml#inconsistent_struct_constructor
thread 'rustc' panicked at 'found unstable fingerprints for evaluate_obligation(4565fe7ceb8c9bbe
-7d5d33920c3c07e3): Ok(EvaluatedToOkModuloRegions)', /rustc/f82664191d0e8764b7435b9d72eb0e366b8b
1464/compiler/rustc_query_system/src/query/plumbing.rs:593:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new
note: Clippy version: clippy 0.1.52 (f826641 2021-03-21)
query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `std::boxed::Box<dyn std::error::
Error + std::marker::Send + std::marker::Sync>: std::convert::Into<std::boxed::Box<dyn std::erro
r::Error + std::marker::Send + std::marker::Sync>>`
end of query stack
warning: 1 warning emitted
error: could not compile `zebra-consensus`
Backtrace
thread 'rustc' panicked at 'found unstable fingerprints for evaluate_obligation(4565fe7ceb8c9bbe-7d5d33920c3c07e3): Ok(EvaluatedToOkModuloRegions)', /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/compil
er/rustc_query_system/src/query/plumbing.rs:593:5
stack backtrace:
0: 0x7fd429181ac0 - std::backtrace_rs::backtrace::libunwind::trace::h4dee703919bfd40a
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
1: 0x7fd429181ac0 - std::backtrace_rs::backtrace::trace_unsynchronized::h457e839f1a563e20
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7fd429181ac0 - std::sys_common::backtrace::_print_fmt::h86a55fb30f8393c8
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/sys_common/backtrace.rs:67:5
3: 0x7fd429181ac0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7b3d6cac46d277e1
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/sys_common/backtrace.rs:46:22
4: 0x7fd4291f01ef - core::fmt::write::h127419eb46f2ecc9
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/core/src/fmt/mod.rs:1092:17
5: 0x7fd429175bd2 - std::io::Write::write_fmt::h6010cfbb4726588b
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/io/mod.rs:1572:15
6: 0x7fd4291857f5 - std::sys_common::backtrace::_print::h79b4f9652330cc9d
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/sys_common/backtrace.rs:49:5
7: 0x7fd4291857f5 - std::sys_common::backtrace::print::h330bb326a76af8cf
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/sys_common/backtrace.rs:36:9
8: 0x7fd4291857f5 - std::panicking::default_hook::{{closure}}::heb6a42a7d50a472e
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/panicking.rs:208:50
9: 0x7fd4291852a3 - std::panicking::default_hook::h17e521ba6d68d6e1
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/panicking.rs:225:9
10: 0x55f268f04d19 - clippy_driver::ICE_HOOK::{{closure}}::{{closure}}::hded6e23a8e547380
11: 0x7fd4099b1093 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h8bcea26f9c64a7cb
at /home/dev/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1560:9
12: 0x7fd4098aa9f6 - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::h43c8570d2c425cd5
at /home/dev/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/proc_macro/src/bridge/client.rs:320:21
13: 0x7fd429185f60 - std::panicking::rust_panic_with_hook::h70db735e3a6e70cb
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/panicking.rs:595:17
14: 0x7fd429185ad7 - std::panicking::begin_panic_handler::{{closure}}::h777c71c8e5a7e25c
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/panicking.rs:497:13
15: 0x7fd429181f7c - std::sys_common::backtrace::__rust_end_short_backtrace::h3e9bf30168899554
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/sys_common/backtrace.rs:141:18
16: 0x7fd429185a39 - rust_begin_unwind
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/panicking.rs:493:5
17: 0x7fd42914a1fb - std::panicking::begin_panic_fmt::h0b6b6d9d830486ef
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/panicking.rs:435:5
18: 0x7fd42b9d12e8 - rustc_query_system::query::plumbing::incremental_verify_ich::h05cd42f6e9e5b5ff
19: 0x7fd42b9e0221 - rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory::hac73cb51001cc889
20: 0x7fd42bada804 - rustc_data_structures::stack::ensure_sufficient_stack::h80f76621a4a9e1a2
21: 0x7fd42aeeb98f - rustc_query_system::query::plumbing::get_query_impl::h5da89434232f3c74
22: 0x7fd42af573f3 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::evaluate_obligation::h465b3563e0016af3
23: 0x7fd42b3f6bf8 - <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation::h9a506cd187ffc154
24: 0x7fd42b3f6f10 - <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow::h257a5aa10713fbdc
25: 0x7fd42b405875 - rustc_trait_selection::traits::fulfill::FulfillProcessor::process_trait_obligation::h1d68661077ba038b
26: 0x7fd42b4046ca - rustc_trait_selection::traits::fulfill::FulfillProcessor::progress_changed_obligations::h531329a0ed7bac90
27: 0x7fd42b418ae4 - rustc_data_structures::obligation_forest::ObligationForest<O>::process_obligations::hb7432099742944ca
28: 0x7fd42b404266 - <rustc_trait_selection::traits::fulfill::FulfillmentContext as rustc_infer::traits::engine::TraitEngine>::select_where_possible::h1eb75907e67ef5cb
29: 0x7fd42b404070 - <rustc_trait_selection::traits::fulfill::FulfillmentContext as rustc_infer::traits::engine::TraitEngine>::select_all_or_error::hd6f5b73e1492d1e3
30: 0x55f269127ae8 - rustc_infer::infer::InferCtxtBuilder::enter::h929e049cf1a6771a
31: 0x55f268f79d3f - <clippy_lints::future_not_send::FutureNotSend as rustc_lint::passes::LateLintPass>::check_fn::ha2d98fdef7521fd8
32: 0x7fd42a7d70ce - <rustc_lint::late::LateLintPassObjects as rustc_lint::passes::LateLintPass>::check_fn::h0501e83e6069e808
33: 0x7fd429ac78d8 - <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_fn::h890c11aa39bfe300
34: 0x7fd429ac4f21 - rustc_hir::intravisit::walk_item::h07bd7126338716ac
35: 0x7fd429ac7e83 - rustc_hir::intravisit::Visitor::visit_nested_item::ha9e2dd635b828fe3
36: 0x7fd429ac4578 - rustc_hir::intravisit::walk_mod::h4f2d212d998a3adf
37: 0x7fd429ac7a5f - <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_mod::hca6ef13e9fa17e56
38: 0x7fd429ac7e83 - rustc_hir::intravisit::Visitor::visit_nested_item::ha9e2dd635b828fe3
39: 0x7fd429ac4578 - rustc_hir::intravisit::walk_mod::h4f2d212d998a3adf
40: 0x7fd429ac7a5f - <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_mod::hca6ef13e9fa17e56
41: 0x7fd429ac7e83 - rustc_hir::intravisit::Visitor::visit_nested_item::ha9e2dd635b828fe3
42: 0x7fd429ac4578 - rustc_hir::intravisit::walk_mod::h4f2d212d998a3adf
43: 0x7fd429ac7a5f - <rustc_lint::late::LateContextAndPass<T> as rustc_hir::intravisit::Visitor>::visit_mod::hca6ef13e9fa17e56
44: 0x7fd429ac3342 - rustc_hir::intravisit::walk_crate::h6c73eeb54dcb3dcf
45: 0x7fd429ac545f - rustc_lint::late::late_lint_pass_crate::h909e1e2a81f3ab2b
46: 0x7fd42b627e37 - rustc_lint::late::late_lint_crate::h4a033c0f40cb0799
47: 0x7fd42b5f8811 - rustc_data_structures::sync::join::head0f9cd0977cdac
48: 0x7fd42b604a84 - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h39b9039bf3b3cae9
49: 0x7fd42b5f6fd9 - rustc_session::utils::<impl rustc_session::session::Session>::time::ha822daa0edc02152
50: 0x7fd42b6040cc - rustc_interface::passes::analysis::h84e230aa18168bec
51: 0x7fd42a14141a - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::h5b5ace16f8566972
52: 0x7fd42ba79f50 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h4a1a5c1f85299ad4
53: 0x7fd42bae3b37 - rustc_data_structures::stack::ensure_sufficient_stack::hd90e04d4f105c945
54: 0x7fd42b9aca11 - rustc_query_system::query::plumbing::force_query_with_job::h3b03867f47f56f3f
55: 0x7fd42b982dcb - rustc_query_system::query::plumbing::get_query_impl::hb5cdf9a8bb6380d7
56: 0x7fd42ba5ddbf - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis::h1a577dcf293615cd
57: 0x7fd42b5f1dfb - rustc_interface::passes::QueryContext::enter::h6632cc7bc285eb19
58: 0x7fd42b5c7c75 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::h2731ac3c02105c7c
59: 0x7fd42b5c2301 - rustc_span::with_source_map::h94d38a1c3089ae35
60: 0x7fd42b5c8c4e - rustc_interface::interface::create_compiler_and_run::h2bc2789fb7dc8d5b
61: 0x7fd42b5c31b8 - scoped_tls::ScopedKey<T>::set::hc4c30e2561747f9c
62: 0x7fd42b5c9004 - std::sys_common::backtrace::__rust_begin_short_backtrace::h904e8f4f3fa6a302
63: 0x7fd42b5e0665 - core::ops::function::FnOnce::call_once{{vtable.shim}}::he1a228660be11f81
64: 0x7fd4291958a8 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7f7bdfc757a1add0
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/alloc/src/boxed.rs:1546:9
65: 0x7fd4291958a8 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha294ad0fb99e9b3a
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/alloc/src/boxed.rs:1546:9
66: 0x7fd4291958a8 - std::sys::unix::thread::Thread::new::thread_start::h4614854ae73cd6b0
at /rustc/f82664191d0e8764b7435b9d72eb0e366b8b1464/library/std/src/sys/unix/thread.rs:71:17
67: 0x7fd4290b3ead - start_thread
68: 0x7fd428ea1caf - __clone
69: 0x0 - <unknown>
Subsequent Error Output
thread 'rustc' panicked at 'found unstable fingerprints for evaluate_obligation(b83394a23eea4580
-1637f5d761d51709): Ok(EvaluatedToOkModuloRegions)', /rustc/f82664191d0e8764b7435b9d72eb0e366b8b
1464/compiler/rustc_query_system/src/query/plumbing.rs:593:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
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-bu
g%2C+I-ICE%2C+T-compiler&template=ice.md
note: compiler flags: -Z share-generics=y -C panic=abort -C embed-bitcode=no -C debuginfo=2 -C l
inker=clang -C incremental -C link-arg=-fuse-ld=lld --crate-type lib
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `fn(std::boxed::Box<(dyn std::err
or::Error + std::marker::Send + std::marker::Sync + 'static)>) -> zebra_consensus::checkpoint::V
erifyCheckpointError {zebra_consensus::checkpoint::VerifyCheckpointError::CommitFinalized}: std:
:ops::FnOnce<(std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>,)>`
rust-lang/rust-clippy#1 [normalize_projection_ty] normalizing `Canonical { max_universe: U0, variables: [], value: Pa
ramEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All }, value: ProjectionTy { substs
: [fn(std::boxed::Box<(dyn std::error::Error + std::marker::Send + std::marker::Sync + 'static)>
) -> zebra_consensus::checkpoint::VerifyCheckpointError {zebra_consensus::checkpoint::VerifyChec
kpointError::CommitFinalized}, std::boxed::Box<dyn std::error::Error + std::marker::Send + std::
marker::Sync>], item_def_id: DefId(28:7715 ~ futures_util[932e]::fns::FnOnce1::Output) } } }`
end of query stack
error: could not compile `zebrad`
Metadata
Metadata
Assignees
Labels
No labels