Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc assertion failed with different fingerprints #84925

Closed
peddermaster2 opened this issue May 4, 2021 · 1 comment
Closed

rustc assertion failed with different fingerprints #84925

peddermaster2 opened this issue May 4, 2021 · 1 comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@peddermaster2
Copy link

How I got this bug to show up:

  • build rust-analyzer with the stable toolchain
  • switch the toolchain to nightly
  • (a few days pass by - I can recall how many)
  • pull rust-analyzer git
  • build rust-analyzer (with the nightly toolchain)

A cargo clean in the working directory works for fixing the problem.

Code

No specific code.

Meta

rustc --version --verbose:

rustc 1.53.0-nightly (42816d61e 2021-04-24)
binary: rustc
commit-hash: 42816d61ead7e46d462df997958ccfd514f8c21c
commit-date: 2021-04-24
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0

Error output

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `Some(Fingerprint(17861685163013988291, 6605347323388188758))`,
 right: `Some(Fingerprint(14133554906330567943, 11607229516661027443))`: found unstable fingerprints for predicates_of(core[ec89]::ops::bit::Not): GenericPredicates { parent: None, predicates: [(Binder(TraitPredicate(<Self as std::ops::Not>), []), /home/peter/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/bit.rs:33:1: 33:14 (#0))] }', /rustc/42816d61ead7e46d462df997958ccfd514f8c21c/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-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.53.0-nightly (42816d61e 2021-04-24) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [predicates_of] computing predicates of `std::ops::Not`
#1 [typeck] type-checking `grammar::items::fn_`
end of query stack
error: could not compile `parser`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `rust-analyzer v0.0.0 (/home/peter/git/rust-analyzer/crates/rust-analyzer)`, intermediate artifacts can be found at `/home/peter/git/rust-analyzer/target`

Caused by:
  build failed
Error: install server

Caused by:
    command `cargo install --path crates/rust-analyzer --locked --force --features force-always-assert` failed, exit status: 101
Backtrace

stack backtrace:
   0: rust_begin_unwind
             at /rustc/42816d61ead7e46d462df997958ccfd514f8c21c/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/42816d61ead7e46d462df997958ccfd514f8c21c/library/core/src/panicking.rs:92:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
   4: rustc_query_system::query::plumbing::incremental_verify_ich
   5: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory
   6: rustc_query_system::query::plumbing::get_query_impl
   7: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::predicates_of
   8: rustc_middle::ty::generics::GenericPredicates::instantiate_into
   9: rustc_middle::ty::generics::GenericPredicates::instantiate
  10: rustc_typeck::check::method::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::lookup_method_in_trait
  11: rustc_typeck::check::op::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::lookup_op_method
  12: rustc_typeck::check::op::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_user_unop
  13: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  14: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  15: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  16: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  17: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
  18: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
  19: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  20: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
  21: rustc_typeck::check::check::check_fn
  22: rustc_infer::infer::InferCtxtBuilder::enter
  23: rustc_typeck::check::typeck
  24: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  25: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  26: rustc_data_structures::stack::ensure_sufficient_stack
  27: rustc_query_system::query::plumbing::force_query_with_job
  28: rustc_query_system::query::plumbing::get_query_impl
  29: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
  30: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::par_body_owners
  31: rustc_typeck::check::typeck_item_bodies
  32: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  33: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  34: rustc_data_structures::stack::ensure_sufficient_stack
  35: rustc_query_system::query::plumbing::force_query_with_job
  36: rustc_query_system::query::plumbing::get_query_impl
  37: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck_item_bodies
  38: rustc_session::utils::<impl rustc_session::session::Session>::time
  39: rustc_typeck::check_crate
  40: rustc_interface::passes::analysis
  41: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  42: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  43: rustc_data_structures::stack::ensure_sufficient_stack
  44: rustc_query_system::query::plumbing::force_query_with_job
  45: rustc_query_system::query::plumbing::get_query_impl
  46: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  47: rustc_interface::passes::QueryContext::enter
  48: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  49: rustc_span::with_source_map
  50: rustc_interface::interface::create_compiler_and_run
  51: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@peddermaster2 peddermaster2 added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 4, 2021
@Aaron1011
Copy link
Member

Duplicate of #84341. This is fixed in the latest nightly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants