Skip to content

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

Closed
@ehuss

Description

@ehuss

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

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