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

Failed to recover key for generics_of(---) #79977

Closed
jocutajar opened this issue Dec 12, 2020 · 6 comments
Closed

Failed to recover key for generics_of(---) #79977

jocutajar opened this issue Dec 12, 2020 · 6 comments
Assignees
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jocutajar
Copy link

jocutajar commented Dec 12, 2020

I started seeing this on recent nightly rustc. It seems rather random to me, but when it happens it stays it this broken state. cargo clean removes the problem. Switching to sable works, switching back still broken.

I have a hunch that it gets broken when the code doesn't change (docs only) or when I revert to previously built code state. Other indicators - I'm using rust-analyzer in VS code. It could possibly mess with the target.

Code

https://gitlab.com/BrightOpen/BackYard/Samotop/-/tree/7a5ac6e356e772977dcf81e1db0d880f5cdb996a

Meta

rustc --version --verbose:

rustc 1.50.0-nightly (d32c320d7 2020-12-10)
binary: rustc
commit-hash: d32c320d7eee56706486fef6be778495303afe9e
commit-date: 2020-12-10
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly

Error output

 Compiling samotop v0.12.0 (/home/robert/Projects/BrightOpen/Samotop/samotop)
thread 'rustc' panicked at 'Failed to recover key for generics_of(7864437247d7d9a-bedbc1380bdaf7a0) with hash 7864437247d7d9a-bedbc1380bdaf7a0', compiler/rustc_middle/src/ty/query/mod.rs:235:5
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d32c320d7eee56706486fef6be778495303afe9e/library/std/src/panicking.rs:493:5
   1: std::panicking::begin_panic_fmt
             at /rustc/d32c320d7eee56706486fef6be778495303afe9e/library/std/src/panicking.rs:435:5
   2: rustc_middle::ty::query::try_load_from_on_disk_cache::{{closure}}
   3: rustc_middle::ty::query::try_load_from_on_disk_cache
   4: rustc_query_system::dep_graph::graph::DepGraph<K>::exec_cache_promotions
   5: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
   6: rustc_incremental::persist::save::save_in
   7: rustc_data_structures::sync::join
   8: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
   9: rustc_incremental::persist::save::save_dep_graph
  10: rustc_codegen_ssa::base::finalize_tcx
  11: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  12: rustc_session::utils::<impl rustc_session::session::Session>::time
  13: rustc_interface::passes::QueryContext::enter
  14: rustc_interface::queries::Queries::ongoing_codegen
  15: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  16: rustc_span::with_source_map
  17: rustc_interface::interface::create_compiler_and_run
  18: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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.50.0-nightly (d32c320d7 2020-12-10) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type lib

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

query stack during panic:
end of query stack
@jocutajar jocutajar 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 Dec 12, 2020
@jyn514 jyn514 added A-incr-comp Area: Incremental compilation regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Dec 12, 2020
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Dec 12, 2020
@jyn514
Copy link
Member

jyn514 commented Dec 12, 2020

cc @Aaron1011 - this might be related to your recent incremental changes?

@camelid
Copy link
Member

camelid commented Dec 12, 2020

It's in that same spot in rustc_middle as #79661 ... coincidence or no?

@camelid
Copy link
Member

camelid commented Dec 12, 2020

cc #79890

@Aaron1011 Aaron1011 self-assigned this Dec 13, 2020
@Aaron1011
Copy link
Member

Aaron1011 commented Dec 13, 2020

The nightly you're using doesn't contain my fix. Can you re-test on the latest nightly?

@camelid camelid added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 13, 2020
@jocutajar
Copy link
Author

I've updated to rustc 1.50.0-nightly (803c602 2020-12-13) and will let you know if this re-occurs. I could not reproduce it myself on the previous nightly either as it is rather random.

@LeSeulArtichaut LeSeulArtichaut removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Dec 21, 2020
@LeSeulArtichaut
Copy link
Contributor

LeSeulArtichaut commented Dec 21, 2020

I'm going to go ahead and close this issue. Feel free to open another issue or reopen this one if you run into this bug again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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

6 participants