Skip to content

unstable fingerprints for evaluate_obligation(..): Ok(EvaluatedToOk) #85277

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

Closed
ehuss opened this issue May 14, 2021 · 4 comments
Closed

unstable fingerprints for evaluate_obligation(..): Ok(EvaluatedToOk) #85277

ehuss opened this issue May 14, 2021 · 4 comments
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

@ehuss
Copy link
Contributor

ehuss commented May 14, 2021

I reliably get a panic with the following steps building rustc. (Not sure if you still want these reports.)

  1. Start with a clean checkout of rustc, commit 17f30e5
  2. Enable incremental
  3. ./x.py build library/std
  4. Apply the patch shown below.
  5. ./x.py build library/std

Patch:

diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index 1348b02b878..8ca303a6220 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -1120,6 +1120,7 @@ pub fn is_attr_known(&self, attr: &Attribute) -> bool {
     }

     pub fn mark_attr_used(&self, attr: &Attribute) {
+        if std::env::var("ERIC").is_ok() { panic!("boo"); }
         self.used_attrs.lock().mark(attr)
     }
Backtrace

   Compiling rustc_mir v0.0.0 (/home/eric/Proj/rust/compiler/rustc_mir)
   Compiling rustc_interface v0.0.0 (/home/eric/Proj/rust/compiler/rustc_interface)
thread 'rustc' panicked at 'found unstable fingerprints for evaluate_obligation(aead98484af64c44-abb1ca458b6e09aa): Ok(EvaluatedToOk)', /rustc/215738137bcbef2c3637a5bd290ef612cffe6ba5/compiler/rustc_query_system/src/query/plumbing.rs:593:5
stack backtrace:
   0: rust_begin_unwind
             at /rustc/215738137bcbef2c3637a5bd290ef612cffe6ba5/library/std/src/panicking.rs:493:5
   1: std::panicking::begin_panic_fmt
             at /rustc/215738137bcbef2c3637a5bd290ef612cffe6ba5/library/std/src/panicking.rs:435:5
   2: rustc_query_system::query::plumbing::incremental_verify_ich
   3: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory
   4: rustc_data_structures::stack::ensure_sufficient_stack
   5: rustc_query_system::query::plumbing::get_query_impl
   6: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::evaluate_obligation
   7: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
   8: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
   9: rustc_trait_selection::traits::type_known_to_meet_bound_modulo_regions
  10: rustc_ty_utils::common_traits::is_item_raw
  11: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  12: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory
  13: rustc_data_structures::stack::ensure_sufficient_stack
  14: rustc_query_system::query::plumbing::get_query_impl
  15: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::is_freeze_raw
  16: rustc_middle::ty::util::<impl rustc_middle::ty::TyS>::is_freeze
  17: rustc_middle::ty::layout::<impl rustc_target::abi::TyAndLayoutMethods<C> for &rustc_middle::ty::TyS>::pointee_info_at
  18: <rustc_target::abi::call::FnAbi<&rustc_middle::ty::TyS> as rustc_middle::ty::layout::FnAbiExt<C>>::new_internal::{{closure}}::{{closure}}
  19: rustc_target::abi::call::ArgAbi<Ty>::new
  20: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
  21: <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold
  22: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  23: <rustc_target::abi::call::FnAbi<&rustc_middle::ty::TyS> as rustc_middle::ty::layout::FnAbiExt<C>>::new_internal
  24: <rustc_target::abi::call::FnAbi<&rustc_middle::ty::TyS> as rustc_middle::ty::layout::FnAbiExt<C>>::of_instance
  25: rustc_codegen_ssa::mir::block::<impl rustc_codegen_ssa::mir::FunctionCx<Bx>>::codegen_terminator
  26: rustc_codegen_ssa::mir::codegen_mir
  27: rustc_codegen_ssa::base::codegen_instance
  28: <rustc_middle::mir::mono::MonoItem as rustc_codegen_ssa::mono_item::MonoItemExt>::define
  29: rustc_codegen_llvm::base::compile_codegen_unit::module_codegen
  30: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  31: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  32: rustc_codegen_llvm::base::compile_codegen_unit
  33: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  34: rustc_interface::passes::QueryContext::enter
  35: rustc_interface::queries::Queries::ongoing_codegen
  36: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  37: rustc_span::with_source_map
  38: rustc_interface::interface::create_compiler_and_run
  39: 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.52.0-beta.3 (215738137 2021-04-06) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z macro-backtrace -Z tls-model=initial-exec -Z unstable-options -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C incremental -C link-args=-Wl,-rpath,$ORIGIN/../lib -C prefer-dynamic -C llvm-args=-import-instr-limit=10 --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 `dataflow::framework::engine::Results<dataflow::impls::liveness::MaybeLiveLocals>: std::marker::Freeze`
#1 [is_freeze_raw] computing whether `dataflow::framework::engine::Results<dataflow::impls::liveness::MaybeLiveLocals>` is freeze
end of query stack
error: could not compile `rustc_mir`

To learn more, run the command again with --verbose.
command did not execute successfully: "/home/eric/Proj/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "32" "--release" "--features" " llvm max_level_info" "--manifest-path" "/home/eric/Proj/rust/compiler/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
failed to run: /home/eric/Proj/rust/build/bootstrap/debug/bootstrap build library/std
Build completed unsuccessfully in 0:00:13

@ehuss ehuss added 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. C-bug Category: This is a bug. labels May 14, 2021
@jyn514
Copy link
Member

jyn514 commented May 14, 2021

@ehuss does this still reproduce after rebasing over #85186 ?

@ehuss
Copy link
Contributor Author

ehuss commented May 14, 2021

17f30e5 is after #85186 was merged.

@Aaron1011
Copy link
Member

@ehuss: The stack trace you posted show that the error happens when running the bootstrap (beta) compiler, which doesn't include the fix. Does this still happen with a stage1 compiler?

@ehuss
Copy link
Contributor Author

ehuss commented May 14, 2021

Oh, my apologies. That should have been obvious to me that it was using beta. Building with 6d395a1 as stage0 seems to work. I'll close as presumably fixed by #85186.

@ehuss ehuss closed this as completed May 14, 2021
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

3 participants