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

ICE: issue 84970, encountered incremental compilation error with evaluate_obligation(4270e020b571106c-835a5b1013d879df) #127432

Open
Internal-Compiler-Error opened this issue Jul 6, 2024 · 1 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.

Comments

@Internal-Compiler-Error
Copy link

Internal-Compiler-Error commented Jul 6, 2024

Code

Apologies, I only filed this issue after I already changed the code so I can't remember what state it was.

Meta

rustc --version --verbose:

rustc 1.79.0 (129f3b996 2024-06-10)
binary: rustc
commit-hash: 129f3b9964af4d4a709d1383930ade12dfe7c081
commit-date: 2024-06-10
host: x86_64-unknown-linux-gnu
release: 1.79.0
LLVM version: 18.1.7

Error output

error: internal compiler error: encountered incremental compilation error with evaluate_obligation(4270e020b571106c-835a5b1013d879df)
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p midwest_mainline` or `cargo clean` to allow your project to compile
  = note: Please follow the instructions below to create a bug report with the provided information
  = note: See <https://github.com/rust-lang/rust/issues/84970> for more information

thread 'rustc' panicked at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/compiler/rustc_query_system/src/query/plumbing.rs:725:9:
Found unstable fingerprints for evaluate_obligation(4270e020b571106c-835a5b1013d879df): Ok(EvaluatedToAmbig)
stack backtrace:
   0:     0x7c40fa03c035 - std::backtrace_rs::backtrace::libunwind::trace::h1a07e5dba0da0cd2
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
   1:     0x7c40fa03c035 - std::backtrace_rs::backtrace::trace_unsynchronized::h61b9b8394328c0bc
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7c40fa03c035 - std::sys_common::backtrace::_print_fmt::h1c5e18b460934cff
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7c40fa03c035 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1e1a1972118942ad
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7c40fa08b29b - core::fmt::rt::Argument::fmt::h07af2b4071d536cd
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/fmt/rt.rs:165:63
   5:     0x7c40fa08b29b - core::fmt::write::hc090a2ffd6b28c4a
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/fmt/mod.rs:1157:21
   6:     0x7c40fa030bdf - std::io::Write::write_fmt::h8898bac6ff039a23
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/io/mod.rs:1832:15
   7:     0x7c40fa03be0e - std::sys_common::backtrace::_print::h4e80c5803d4ee35b
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7c40fa03be0e - std::sys_common::backtrace::print::ha96650907276675e
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7c40fa03e779 - std::panicking::default_hook::{{closure}}::h215c2a0a8346e0e0
  10:     0x7c40fa03e4bd - std::panicking::default_hook::h207342be97478370
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:298:9
  11:     0x7c40f6c891b7 - std[3c8ba8ebcf555201]::panicking::update_hook::<alloc[bfbae7e348dce413]::boxed::Box<rustc_driver_impl[c88438ade88661f4]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7c40fa03ee76 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::ha9c3bc81d312fd83
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2036:9
  13:     0x7c40fa03ee76 - std::panicking::rust_panic_with_hook::hac8bdceee1e4fe2c
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:799:13
  14:     0x7c40fa03ec24 - std::panicking::begin_panic_handler::{{closure}}::h00d785e82757ce3c
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:664:13
  15:     0x7c40fa03c4f9 - std::sys_common::backtrace::__rust_end_short_backtrace::h1628d957bcd06996
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7c40fa03e957 - rust_begin_unwind
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:652:5
  17:     0x7c40fa087763 - core::panicking::panic_fmt::hdc63834ffaaefae5
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:72:14
  18:     0x7c40f74067a6 - rustc_query_system[4e189ce2c77124d]::query::plumbing::incremental_verify_ich_failed::<rustc_middle[3ff731b746e7b038]::ty::context::TyCtxt>
  19:     0x7c40f8553e58 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::DefaultCache<rustc_type_ir[a145be3c51398263]::canonical::Canonical<rustc_middle[3ff731b746e7b038]::ty::context::TyCtxt, rustc_middle[3ff731b746e7b038]::ty::ParamEnvAnd<rustc_middle[3ff731b746e7b038]::ty::predicate::Predicate>>, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, true>
  20:     0x7c40f85525e0 - rustc_query_impl[a12402620de91e8]::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
  21:     0x7c40f4d7b644 - <rustc_trait_selection[173dcaf5d960508e]::traits::fulfill::FulfillProcessor as rustc_data_structures[52ff41d7b92c45f3]::obligation_forest::ObligationProcessor>::process_obligation
  22:     0x7c40f800ea00 - <rustc_data_structures[52ff41d7b92c45f3]::obligation_forest::ObligationForest<rustc_trait_selection[173dcaf5d960508e]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[173dcaf5d960508e]::traits::fulfill::FulfillProcessor>
  23:     0x7c40f4ea3cff - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_method_argument_types
  24:     0x7c40f8abc1d5 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  25:     0x7c40f8aba6a4 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  26:     0x7c40f8ab4aec - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_block_with_expected
  27:     0x7c40f8aba64d - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  28:     0x7c40f8abe662 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  29:     0x7c40f8ab5bb6 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_block_with_expected
  30:     0x7c40f8ac06a5 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  31:     0x7c40f8abe662 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  32:     0x7c40f8abd580 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  33:     0x7c40f8ab5bb6 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_block_with_expected
  34:     0x7c40f8aba64d - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  35:     0x7c40f8ab4bc6 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_block_with_expected
  36:     0x7c40f8aba64d - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  37:     0x7c40f84ddc8c - rustc_hir_typeck[e95414a4bbf7473d]::check::check_fn
  38:     0x7c40f8746b96 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_closure
  39:     0x7c40f8abfc0a - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  40:     0x7c40f8482980 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_decl
  41:     0x7c40f8ab5c4c - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_block_with_expected
  42:     0x7c40f8aba64d - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  43:     0x7c40f8abd580 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  44:     0x7c40f8ab4bc6 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_block_with_expected
  45:     0x7c40f8aba64d - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  46:     0x7c40f84ddc8c - rustc_hir_typeck[e95414a4bbf7473d]::check::check_fn
  47:     0x7c40f8746b96 - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_closure
  48:     0x7c40f8abfc0a - <rustc_hir_typeck[e95414a4bbf7473d]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
  49:     0x7c40f84ddc8c - rustc_hir_typeck[e95414a4bbf7473d]::check::check_fn
  50:     0x7c40f84d2baf - rustc_hir_typeck[e95414a4bbf7473d]::typeck
  51:     0x7c40f84d188d - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 8usize]>>
  52:     0x7c40f81182b8 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::VecCache<rustc_span[8c7415e9d33ddd75]::def_id::LocalDefId, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, true>
  53:     0x7c40f8116dd8 - rustc_query_impl[a12402620de91e8]::plumbing::force_from_dep_node::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::VecCache<rustc_span[8c7415e9d33ddd75]::def_id::LocalDefId, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 8usize]>>, false, false, false>>
  54:     0x7c40f8ee0ced - <rustc_query_impl[a12402620de91e8]::plumbing::query_callback<rustc_query_impl[a12402620de91e8]::query_impl::typeck::QueryType>::{closure#0} as core[868bc93c3f2beb33]::ops::function::FnOnce<(rustc_middle[3ff731b746e7b038]::ty::context::TyCtxt, rustc_query_system[4e189ce2c77124d]::dep_graph::dep_node::DepNode)>>::call_once
  55:     0x7c40f80299df - <rustc_query_system[4e189ce2c77124d]::dep_graph::graph::DepGraphData<rustc_middle[3ff731b746e7b038]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt>
  56:     0x7c40f802994b - <rustc_query_system[4e189ce2c77124d]::dep_graph::graph::DepGraphData<rustc_middle[3ff731b746e7b038]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt>
  57:     0x7c40f802994b - <rustc_query_system[4e189ce2c77124d]::dep_graph::graph::DepGraphData<rustc_middle[3ff731b746e7b038]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt>
  58:     0x7c40f802994b - <rustc_query_system[4e189ce2c77124d]::dep_graph::graph::DepGraphData<rustc_middle[3ff731b746e7b038]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt>
  59:     0x7c40f80291c4 - <rustc_query_system[4e189ce2c77124d]::dep_graph::graph::DepGraphData<rustc_middle[3ff731b746e7b038]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt>
  60:     0x7c40f89821f7 - rustc_query_system[4e189ce2c77124d]::query::plumbing::ensure_must_run::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::DefaultCache<rustc_span[8c7415e9d33ddd75]::def_id::LocalModDefId, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt>
  61:     0x7c40f8982716 - rustc_query_impl[a12402620de91e8]::query_impl::check_mod_type_wf::get_query_incr::__rust_end_short_backtrace
  62:     0x7c40f87ca1d0 - rustc_hir_analysis[46a17d8846b4335f]::check_crate
  63:     0x7c40f89890e0 - rustc_interface[640972162e3c086f]::passes::analysis
  64:     0x7c40f8988aef - rustc_query_impl[a12402620de91e8]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[a12402620de91e8]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>
  65:     0x7c40f8e71e53 - rustc_query_system[4e189ce2c77124d]::query::plumbing::try_execute_query::<rustc_query_impl[a12402620de91e8]::DynamicConfig<rustc_query_system[4e189ce2c77124d]::query::caches::SingleCache<rustc_middle[3ff731b746e7b038]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[a12402620de91e8]::plumbing::QueryCtxt, true>
  66:     0x7c40f8e71a9c - rustc_query_impl[a12402620de91e8]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  67:     0x7c40f8b83149 - rustc_interface[640972162e3c086f]::interface::run_compiler::<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}
  68:     0x7c40f8b40f8b - std[3c8ba8ebcf555201]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[640972162e3c086f]::util::run_in_thread_with_globals<rustc_interface[640972162e3c086f]::interface::run_compiler<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>
  69:     0x7c40f8b40d80 - <<std[3c8ba8ebcf555201]::thread::Builder>::spawn_unchecked_<rustc_interface[640972162e3c086f]::util::run_in_thread_with_globals<rustc_interface[640972162e3c086f]::interface::run_compiler<core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>, rustc_driver_impl[c88438ade88661f4]::run_compiler::{closure#0}>::{closure#1}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[868bc93c3f2beb33]::result::Result<(), rustc_span[8c7415e9d33ddd75]::ErrorGuaranteed>>::{closure#2} as core[868bc93c3f2beb33]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  70:     0x7c40fa048cab - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h09e5a4c541afa800
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9
  71:     0x7c40fa048cab - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h9c8b03c22f4e7026
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/boxed.rs:2022:9
  72:     0x7c40fa048cab - std::sys::pal::unix::thread::Thread::new::thread_start::h522bc89a54da820a
                               at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/sys/pal/unix/thread.rs:108:17
  73:     0x7c40f3ca6ded - <unknown>
  74:     0x7c40f3d2a0dc - <unknown>
  75:                0x0 - <unknown>

error: 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.79.0 (129f3b996 2024-06-10) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `&'a str: core::marker::Send`
#1 [typeck] type-checking `dht_service::<impl at src/dht_service.rs:179:1: 179:11>::bootstrap_with_random_id`
#2 [analysis] running analysis passes on this crate
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 type_of_opaque(midwest_mainline[083c]::dht_service::{impl#7}::bootstrap_with_random_id::{opaque#0})
#1 type_of(midwest_mainline[083c]::dht_service::{impl#7}::bootstrap_with_random_id::{opaque#0})
#2 check_well_formed(midwest_mainline[083c]::dht_service::{impl#7}::bootstrap_with_random_id::{opaque#0})
#3 check_mod_type_wf(midwest_mainline[083c]::dht_service)
end of try_mark_green dep node stack

Backtrace

<backtrace>

Other info

I was using unstable feature of tokio and this was my .cargo/config.toml

Note the comments are intentional. I already commented out the lines about mold a few days ago before I hit the ICE so may or may not be related.

[build]
rustflags = ["--cfg", "tokio_unstable"]

# [target.x86_64-unknown-linux-gnu]
# linker = "clang"
# rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold"]
@Internal-Compiler-Error Internal-Compiler-Error 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 Jul 6, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 6, 2024
@Internal-Compiler-Error
Copy link
Author

!84970 mention the issue so they get linked

@Internal-Compiler-Error Internal-Compiler-Error changed the title ICE in issue 84970 ICE: issue 84970, encountered incremental compilation error with evaluate_obligation(4270e020b571106c-835a5b1013d879df) Jul 6, 2024
@saethlin saethlin added A-incr-comp Area: Incremental compilation and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 6, 2024
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

3 participants