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

incremental ICE: fingerprints for evaluate_obligation compiling chalk #83115

Closed
matthiaskrgr opened this issue Mar 14, 2021 · 5 comments
Closed
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) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Code

This happens with the chalk crate

git clone https://github.com/rust-lang/chalk
cd chalk
git checkout f7c7856edee8f80636f5a9ef6edc8a1fd42ed940
cargo build
find . | grep \.rs$ | xargs touch   
cargo build # => boom

Meta

rustc --version --verbose:

rustc 1.52.0-nightly (acca81892 2021-03-13)
binary: rustc
commit-hash: acca818928654807ed3bc1ce0e97df118f8716c8
commit-date: 2021-03-13
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 12.0.0

Error output

   Compiling lalrpop v0.19.0
   Compiling chalk-solve v0.62.0-dev.0 (/tmp/chalk/chalk-solve)
   Compiling chalk-parse v0.62.0-dev.0 (/tmp/chalk/chalk-parse)
   Compiling chalk-engine v0.62.0-dev.0 (/tmp/chalk/chalk-engine)
   Compiling chalk-recursive v0.62.0-dev.0 (/tmp/chalk/chalk-recursive)
   Compiling chalk-integration v0.62.0-dev.0 (/tmp/chalk/chalk-integration)
thread 'rustc' panicked at 'found unstable fingerprints for evaluate_obligation(e3239918b04f5ea6-d9d33836ead20deb)', /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/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.52.0-nightly (acca81892 2021-03-13) 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:
#0 [evaluate_obligation] evaluating trait selection obligation `chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>: std::marker::Sized`
#1 [normalize_projection_ty] normalizing `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All }, value: ProjectionTy { substs: [std::iter::Map<chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>, [closure@<chalk_solve::rust_ir::AssociatedTyValue<interner::ChalkIr> as chalk_solve::clauses::program_clauses::ToProgramClauses<interner::ChalkIr>>::to_program_clauses::{closure#0}::{closure#3}]>], item_def_id: DefId(2:6999 ~ core[3998]::iter::traits::collect::IntoIterator::IntoIter) } } }`
end of query stack
error: could not compile `chalk-integration`
Backtrace

thread 'rustc' panicked at 'found unstable fingerprints for evaluate_obligation(e3239918b04f5ea6-d9d33836ead20deb)', /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/compiler/rustc_query_system/src/query/plumbing.rs:593:5
stack backtrace:
   0:     0x7f1905b59930 - std::backtrace_rs::backtrace::libunwind::trace::hfe3b1cace85e87d8
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7f1905b59930 - std::backtrace_rs::backtrace::trace_unsynchronized::h542330af06479043
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f1905b59930 - std::sys_common::backtrace::_print_fmt::h6b88726367858985
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f1905b59930 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hcd76ce6b485adbea
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7f1905bc7abf - core::fmt::write::h127419eb46f2ecc9
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/core/src/fmt/mod.rs:1092:17
   5:     0x7f1905b4da42 - std::io::Write::write_fmt::h0facb64ef2e7f5d8
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/io/mod.rs:1567:15
   6:     0x7f1905b5d675 - std::sys_common::backtrace::_print::h7bf1633ea5421f7b
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7f1905b5d675 - std::sys_common::backtrace::print::h5cc4d09049928ba5
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7f1905b5d675 - std::panicking::default_hook::{{closure}}::h9e84dc005bfc9fc7
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/panicking.rs:208:50
   9:     0x7f1905b5d1d3 - std::panicking::default_hook::h123278a03b1f796b
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/panicking.rs:225:9
  10:     0x7f190632f3fb - rustc_driver::report_ice::h036d06dbb7c2c24c
  11:     0x7f18ed8764f3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h09b6f9ae26022dbe
                               at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1560:9
  12:     0x7f18ed884836 - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::hefb8f10999b1a6c9
                               at /home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/proc_macro/src/bridge/client.rs:320:21
  13:     0x7f1905b5dde0 - std::panicking::rust_panic_with_hook::h4040631aa6c7bc27
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/panicking.rs:595:17
  14:     0x7f1905b5d957 - std::panicking::begin_panic_handler::{{closure}}::h02a17b22ac092d08
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/panicking.rs:497:13
  15:     0x7f1905b59dec - std::sys_common::backtrace::__rust_end_short_backtrace::h6063b024443b5852
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/sys_common/backtrace.rs:141:18
  16:     0x7f1905b5d8b9 - rust_begin_unwind
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/panicking.rs:493:5
  17:     0x7f1905b2203b - std::panicking::begin_panic_fmt::h10b51f96d6207ff1
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/panicking.rs:435:5
  18:     0x7f19084a4809 - rustc_query_system::query::plumbing::incremental_verify_ich::h05b884ecbbf51fd4
  19:     0x7f19084aca01 - rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory::h867c5b7e6e93eed6
  20:     0x7f19084c0c28 - rustc_data_structures::stack::ensure_sufficient_stack::h69fbfd9dd474f86f
  21:     0x7f190799fd06 - rustc_query_system::query::plumbing::get_query_impl::ha8a27c9cad3ab0ff
  22:     0x7f19079f5833 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::evaluate_obligation::h6779a474fcff6b3d
  23:     0x7f1907e97fa1 - <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation::hf892191b66f145b6
  24:     0x7f1907e981a0 - <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow::hf88d6e76ac547df5
  25:     0x7f1907ea0914 - rustc_trait_selection::traits::fulfill::FulfillProcessor::process_trait_obligation::h22b93a7d22097138
  26:     0x7f1907e9f091 - rustc_trait_selection::traits::fulfill::FulfillProcessor::progress_changed_obligations::ha00d22645f34c749
  27:     0x7f1907eb4994 - rustc_data_structures::obligation_forest::ObligationForest<O>::process_obligations::hcb7d4f2d75404ae5
  28:     0x7f1907e9ebb6 - <rustc_trait_selection::traits::fulfill::FulfillmentContext as rustc_infer::traits::engine::TraitEngine>::select_where_possible::hb21f38706f3ef1ce
  29:     0x7f1908237b21 - <rustc_infer::infer::InferCtxtBuilder as rustc_trait_selection::infer::InferCtxtBuilderExt>::enter_canonical_trait_query::h9e8771b7b83dd016
  30:     0x7f190823ade7 - rustc_traits::normalize_projection_ty::normalize_projection_ty::h9df43f7fb0706b28
  31:     0x7f19084baab6 - rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::normalize_projection_ty>::compute::h9da8acf630b1a05d
  32:     0x7f19069c563c - rustc_query_system::query::config::QueryVtable<CTX,K,V>::compute::hd06f761d3342c820
  33:     0x7f1906b63b19 - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::h87c0eea4975040f5
  34:     0x7f1906aaab9f - rustc_query_system::dep_graph::graph::DepGraph<K>::with_ignore::ha306d91155a0d536
  35:     0x7f19069742cb - rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory::h38741992d06ef360
  36:     0x7f19084c260b - rustc_data_structures::stack::ensure_sufficient_stack::ha17f9b92d16e2497
  37:     0x7f190844af70 - rustc_query_system::query::plumbing::get_query_impl::h980fc17272b2bac8
  38:     0x7f190852b427 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::normalize_projection_ty::h3e9345a583e17be8
  39:     0x7f1907ea11aa - <rustc_trait_selection::traits::query::normalize::QueryNormalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty::hc869c3da976a3493
  40:     0x7f1907e9c5a5 - rustc_middle::ty::fold::TypeFoldable::fold_with::hcbc0e67575b7c505
  41:     0x7f1907ee702f - rustc_middle::ty::structural_impls::<impl rustc_middle::ty::fold::TypeFoldable for &rustc_middle::ty::TyS>::super_fold_with::h3aa49e1bbcb3a364
  42:     0x7f1907ea0c5f - <rustc_trait_selection::traits::query::normalize::QueryNormalizer as rustc_middle::ty::fold::TypeFolder>::fold_ty::hc869c3da976a3493
  43:     0x7f1907716128 - <rustc_infer::infer::at::At as rustc_trait_selection::traits::query::normalize::AtExt>::normalize::hf222a0482fb341e2
  44:     0x7f1907714256 - rustc_infer::infer::InferCtxtBuilder::enter::h3a3eb22ae58e478f
  45:     0x7f1907716c7a - rustc_traits::normalize_erasing_regions::normalize_generic_arg_after_erasing_regions::h005ef1d2d20883c8
  46:     0x7f1906b59914 - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::h2db1958328ab07c7
  47:     0x7f1906aab1cc - rustc_query_system::dep_graph::graph::DepGraph<K>::with_ignore::he3f25a72f93d852b
  48:     0x7f1906978075 - rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory::h6f10869d8f3d56ab
  49:     0x7f19084c66b0 - rustc_data_structures::stack::ensure_sufficient_stack::hfdb747dde41ae689
  50:     0x7f19079a4113 - rustc_query_system::query::plumbing::get_query_impl::hb2c100313112ca48
  51:     0x7f19079f5699 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::normalize_generic_arg_after_erasing_regions::h84b86402eb1ff5de
  52:     0x7f1907fd7e98 - <rustc_middle::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_middle::ty::fold::TypeFolder>::fold_ty::h237c91612a2a365e
  53:     0x7f1907b6b21e - <rustc_mir::monomorphize::collector::MirNeighborCollector as rustc_middle::mir::visit::Visitor>::visit_terminator::h0bf2654c31e0daee
  54:     0x7f1907b6daf7 - rustc_mir::monomorphize::collector::collect_neighbours::hdb969d412161bcd5
  55:     0x7f1907b677ce - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  56:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  57:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  58:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  59:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  60:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  61:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  62:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  63:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  64:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  65:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  66:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  67:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  68:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  69:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  70:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  71:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  72:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  73:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  74:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  75:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  76:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  77:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  78:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  79:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  80:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  81:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  82:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  83:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  84:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  85:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  86:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  87:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  88:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  89:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  90:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  91:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  92:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  93:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  94:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  95:     0x7f1907b678c2 - rustc_mir::monomorphize::collector::collect_items_rec::h3721b047c4f9883e
  96:     0x7f190867c4f3 - rustc_session::utils::<impl rustc_session::session::Session>::time::h0440f4f414c9ef02
  97:     0x7f190865968f - rustc_mir::monomorphize::collector::collect_crate_mono_items::h7b2de256f929a618
  98:     0x7f19086830d1 - rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items::h63793682e86156a6
  99:     0x7f19084ba816 - rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::collect_and_partition_mono_items>::compute::h78d360549ea1445a
 100:     0x7f1906b630d2 - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::h84096843adea5251
 101:     0x7f1908551029 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::hc9d4ad7fd89c2c9c
 102:     0x7f19084bda49 - rustc_data_structures::stack::ensure_sufficient_stack::h2203d7d1590a246c
 103:     0x7f1908485e06 - rustc_query_system::query::plumbing::force_query_with_job::h845e082b4c1c35bd
 104:     0x7f1906929e3d - rustc_query_system::query::plumbing::force_query_impl::h78d71823a415af29
 105:     0x7f19068f992b - rustc_query_system::query::plumbing::force_query::heb2cf16257c27c3b
 106:     0x7f19069cd1aa - rustc_query_impl::query_callbacks::collect_and_partition_mono_items::force_from_dep_node::h3d94b3d33ba0799a
 107:     0x7f1907a0eb58 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h9257a9babe92c54c
 108:     0x7f1907a0e975 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_green_and_read::hbf9b915c03770b75
 109:     0x7f19084c13bb - rustc_data_structures::stack::ensure_sufficient_stack::h7fa65d951e50b4fd
 110:     0x7f19084411c5 - rustc_query_system::query::plumbing::get_query_impl::h7ba870440529c740
 111:     0x7f190852af9f - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::exported_symbols::h995c15aeed103867
 112:     0x7f1907cff311 - rustc_metadata::rmeta::encoder::EncodeContext::encode_crate_root::hcb36823456f51dd6
 113:     0x7f1908752e46 - rustc_metadata::rmeta::encoder::encode_metadata_impl::h0790ae1c4e3ddfae
 114:     0x7f190876cef1 - rustc_data_structures::sync::join::h9d9a97d6c927a0d2
 115:     0x7f190875ab5e - rustc_metadata::rmeta::decoder::cstore_impl::<impl rustc_middle::middle::cstore::CrateStore for rustc_metadata::creader::CStore>::encode_metadata::h33472d8fd43fc7ed
 116:     0x7f190897d465 - rustc_middle::ty::context::TyCtxt::encode_metadata::h12bbfca9093c4007
 117:     0x7f19080aa19e - rustc_interface::passes::QueryContext::enter::h7ccf5bf25c21ab1e
 118:     0x7f19080b1c46 - rustc_interface::queries::Queries::ongoing_codegen::h8d1f35e791cf687b
 119:     0x7f190806c606 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::h8ab0a704bae2634f
 120:     0x7f1908066bf1 - rustc_span::with_source_map::h512fd197bcd2b7c3
 121:     0x7f190806bee3 - scoped_tls::ScopedKey<T>::set::hd407f010a973eb63
 122:     0x7f190806d3a4 - std::sys_common::backtrace::__rust_begin_short_backtrace::h3c42279179caa5db
 123:     0x7f1908088765 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hd56f564efc764ea1
 124:     0x7f1905b6d258 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd8ea7ada17dfa868
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/alloc/src/boxed.rs:1546:9
 125:     0x7f1905b6d258 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h91ce3a636c58b978
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/alloc/src/boxed.rs:1546:9
 126:     0x7f1905b6d258 - std::sys::unix::thread::Thread::new::thread_start::h2e193c2e23720fdf
                               at /rustc/acca818928654807ed3bc1ce0e97df118f8716c8/library/std/src/sys/unix/thread.rs:71:17
 127:     0x7f1905a76299 - start_thread
 128:     0x7f190598b053 - clone
 129:                0x0 - <unknown>

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-nightly (acca81892 2021-03-13) 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:
#0 [evaluate_obligation] evaluating trait selection obligation `chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>: std::marker::Sized`
#1 [normalize_projection_ty] normalizing `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All }, value: ProjectionTy { substs: [std::iter::Map<chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>, [closure@<chalk_solve::rust_ir::AssociatedTyValue<interner::ChalkIr> as chalk_solve::clauses::program_clauses::ToProgramClauses<interner::ChalkIr>>::to_program_clauses::{closure#0}::{closure#3}]>], item_def_id: DefId(2:6999 ~ core[3998]::iter::traits::collect::IntoIterator::IntoIter) } } }`
#2 [normalize_generic_arg_after_erasing_regions] normalizing `fn(std::iter::Map<chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>, [closure@<chalk_solve::rust_ir::AssociatedTyValue<interner::ChalkIr> as chalk_solve::clauses::program_clauses::ToProgramClauses<interner::ChalkIr>>::to_program_clauses::{closure#0}::{closure#1}]>, <std::iter::Map<chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>, [closure@<chalk_solve::rust_ir::AssociatedTyValue<interner::ChalkIr> as chalk_solve::clauses::program_clauses::ToProgramClauses<interner::ChalkIr>>::to_program_clauses::{closure#0}::{closure#3}]> as std::iter::IntoIterator>::IntoIter) -> std::iter::Chain<std::iter::Map<chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>, [closure@<chalk_solve::rust_ir::AssociatedTyValue<interner::ChalkIr> as chalk_solve::clauses::program_clauses::ToProgramClauses<interner::ChalkIr>>::to_program_clauses::{closure#0}::{closure#1}]>, <std::iter::Map<chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>, [closure@<chalk_solve::rust_ir::AssociatedTyValue<interner::ChalkIr> as chalk_solve::clauses::program_clauses::ToProgramClauses<interner::ChalkIr>>::to_program_clauses::{closure#0}::{closure#3}]> as std::iter::IntoIterator>::IntoIter> {std::iter::Chain::<std::iter::Map<chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>, [closure@<chalk_solve::rust_ir::AssociatedTyValue<interner::ChalkIr> as chalk_solve::clauses::program_clauses::ToProgramClauses<interner::ChalkIr>>::to_program_clauses::{closure#0}::{closure#1}]>, <std::iter::Map<chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>, [closure@<chalk_solve::rust_ir::AssociatedTyValue<interner::ChalkIr> as chalk_solve::clauses::program_clauses::ToProgramClauses<interner::ChalkIr>>::to_program_clauses::{closure#0}::{closure#3}]> as std::iter::IntoIterator>::IntoIter>::new}`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
#4 [exported_symbols] exported_symbols
end of query stack
error: could not compile `chalk-integration`

To learn more, run the command again with --verbose.

@matthiaskrgr matthiaskrgr 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 Mar 14, 2021
@jonas-schievink jonas-schievink added the A-incr-comp Area: Incremental compilation label Mar 14, 2021
@Aaron1011
Copy link
Member

This is issue #80691 - it is now exposed due to #83007

@matthiaskrgr
Copy link
Member Author

updated error msg with #83314 :

   Compiling chalk-integration v0.62.0-dev.0 (/home/matthias/vcs/github/chalk/chalk-integration)
thread 'rustc' panicked at 'found unstable fingerprints for evaluate_obligation(e3239918b04f5ea6-d9d33836ead20deb): Ok(EvaluatedToOk)', /rustc/61edfd591cedff66fca639c02f66984f6271e5a6/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.52.0-nightly (61edfd591 2021-03-20) 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:
#0 [evaluate_obligation] evaluating trait selection obligation `chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>: std::marker::Sized`
#1 [normalize_projection_ty] normalizing `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All }, value: ProjectionTy { substs: [std::iter::Map<chalk_ir::BindersIntoIterator<&std::vec::Vec<chalk_ir::Binders<chalk_ir::WhereClause<interner::ChalkIr>>>>, [closure@<chalk_solve::rust_ir::AssociatedTyValue<interner::ChalkIr> as chalk_solve::clauses::program_clauses::ToProgramClauses<interner::ChalkIr>>::to_program_clauses::{closure#0}::{closure#3}]>], item_def_id: DefId(2:6993 ~ core[3998]::iter::traits::collect::IntoIterator::IntoIter) } } }`
end of query stack
error: could not compile `chalk-integration`

To learn more, run the command again with --verbose.

@lqd
Copy link
Member

lqd commented Mar 22, 2021

I've spent too much time on this 😅

Here's chalk reduced to 200 lines, triggering the incremental bug #80691. As always: cargo build && touch src/main.rs && cargo build to trigger the ICE.

It's small but not minimal per se: the Fold, Interner, and Binders abstractions could still be removed I presume. Still, it's pretty small compared to the full chalk + its dependencies, and should be a good starting point if someone wants to take it further down to a unit test.

EDIT: slightly further reduced, at 180 lines

@matthiaskrgr
Copy link
Member Author

@Aaron1011 I can no longer reproduce the ICE with rustc 1.53.0-nightly (07e0e2ec2 2021-03-24).
Can this be closed?

@jyn514
Copy link
Member

jyn514 commented May 19, 2021

This was likely #83538, closing since it's fixed on nightly.

@jyn514 jyn514 closed this as completed May 19, 2021
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) ❄️ 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

5 participants