Skip to content

ICE: called Option::unwrap() on a None value at def_path_hash_map.rs:23:85 #107226

@yatesco

Description

@yatesco

reporting as requested.

i18n git:(develop) rustup show
Default host: x86_64-apple-darwin
rustup home:  /Users/coliny/.rustup

installed toolchains
--------------------

stable-x86_64-apple-darwin (default)
nightly-2022-06-14-x86_64-apple-darwin
nightly-x86_64-apple-darwin
1.60.0-x86_64-apple-darwin

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-apple-darwin
x86_64-pc-windows-gnu

active toolchain
----------------

stable-x86_64-apple-darwin (default)
rustc 1.64.0 (a55dd71d5 2022-09-19)

RUST_BACKTRACE=1

   Compiling i18n v0.1.0 (/Users/coliny/Dev/com.qfi.health/src/rust/i18n)
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:23:85
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: <rustc_metadata::creader::CStore as rustc_session::cstore::CrateStore>::def_path_hash_to_def_id
   4: <rustc_middle::ty::context::TyCtxt>::def_path_hash_to_def_id
   5: <rustc_query_system::dep_graph::dep_node::DepNode<rustc_middle::dep_graph::dep_node::DepKind> as rustc_middle::dep_graph::dep_node::DepNodeExt>::extract_def_id
   6: rustc_query_impl::query_callbacks::type_of::force_from_dep_node
   7: <rustc_middle::ty::context::TyCtxt as rustc_query_system::dep_graph::DepContext>::try_force_from_dep_node
   8: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
   9: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  10: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  11: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  12: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  13: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  14: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
  15: rustc_query_system::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl::plumbing::QueryCtxt, rustc_middle::infer::canonical::Canonical<rustc_middle::ty::ParamEnvAnd<rustc_middle::ty::Predicate>>, core::result::Result<rustc_middle::traits::select::EvaluationResult, rustc_middle::traits::select::OverflowError>>
  16: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::evaluate_obligation, rustc_query_impl::plumbing::QueryCtxt>
  17: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::evaluate_obligation
  18: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  19: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  20: <rustc_trait_selection::traits::fulfill::FulfillProcessor>::process_trait_obligation
  21: <rustc_trait_selection::traits::fulfill::FulfillProcessor as rustc_data_structures::obligation_forest::ObligationProcessor>::process_obligation
  22: <rustc_data_structures::obligation_forest::ObligationForest<rustc_trait_selection::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection::traits::fulfill::FulfillProcessor, rustc_data_structures::obligation_forest::Outcome<rustc_trait_selection::traits::fulfill::PendingPredicateObligation, rustc_infer::traits::FulfillmentErrorCode>>
  23: <rustc_trait_selection::traits::fulfill::FulfillmentContext as rustc_infer::traits::engine::TraitEngine>::select_where_possible
  24: <rustc_trait_selection::traits::fulfill::FulfillmentContext as rustc_infer::traits::engine::TraitEngine>::select_all_or_error
  25: <rustc_infer::infer::InferCtxtBuilder>::enter::<core::result::Result<&rustc_middle::traits::ImplSource<()>, rustc_middle::traits::CodegenObligationError>, rustc_trait_selection::traits::codegen::codegen_fulfill_obligation::{closure#0}>
  26: rustc_trait_selection::traits::codegen::codegen_fulfill_obligation
  27: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle::ty::context::TyCtxt, (rustc_middle::ty::ParamEnv, rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::TraitRef>), core::result::Result<&rustc_middle::traits::ImplSource<()>, rustc_middle::traits::CodegenObligationError>>::{closure#0}, core::result::Result<&rustc_middle::traits::ImplSource<()>, rustc_middle::traits::CodegenObligationError>>
  28: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (rustc_middle::ty::ParamEnv, rustc_middle::ty::sty::Binder<rustc_middle::ty::sty::TraitRef>), core::result::Result<&rustc_middle::traits::ImplSource<()>, rustc_middle::traits::CodegenObligationError>>
  29: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::codegen_fulfill_obligation, rustc_query_impl::plumbing::QueryCtxt>
  30: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::codegen_fulfill_obligation
  31: rustc_ty_utils::instance::inner_resolve_instance
  32: rustc_ty_utils::instance::resolve_instance
  33: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<(rustc_span::def_id::DefId, &rustc_middle::ty::list::List<rustc_middle::ty::subst::GenericArg>)>, core::result::Result<core::option::Option<rustc_middle::ty::instance::Instance>, rustc_errors::ErrorGuaranteed>>::{closure#0}, core::result::Result<core::option::Option<rustc_middle::ty::instance::Instance>, rustc_errors::ErrorGuaranteed>>
  34: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<(rustc_span::def_id::DefId, &rustc_middle::ty::list::List<rustc_middle::ty::subst::GenericArg>)>, core::result::Result<core::option::Option<rustc_middle::ty::instance::Instance>, rustc_errors::ErrorGuaranteed>>
  35: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::resolve_instance, rustc_query_impl::plumbing::QueryCtxt>
  36: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::resolve_instance
  37: <rustc_middle::ty::instance::Instance>::resolve_opt_const_arg
  38: <rustc_middle::ty::instance::Instance>::resolve
  39: <rustc_monomorphize::collector::MirNeighborCollector as rustc_middle::mir::visit::Visitor>::visit_terminator
  40: rustc_monomorphize::collector::collect_neighbours
  41: rustc_monomorphize::collector::collect_items_rec
  42: rustc_monomorphize::collector::collect_items_rec
  43: rustc_monomorphize::collector::collect_items_rec
  44: rustc_monomorphize::collector::collect_items_rec
  45: rustc_monomorphize::collector::collect_items_rec
  46: rustc_monomorphize::collector::collect_items_rec
  47: rustc_monomorphize::collector::collect_items_rec
  48: rustc_monomorphize::collector::collect_items_rec
  49: rustc_monomorphize::collector::collect_items_rec
  50: rustc_monomorphize::collector::collect_items_rec
  51: rustc_monomorphize::collector::collect_items_rec
  52: rustc_monomorphize::collector::collect_items_rec
  53: rustc_monomorphize::collector::collect_items_rec
  54: rustc_monomorphize::collector::collect_items_rec
  55: rustc_monomorphize::collector::collect_items_rec
  56: rustc_monomorphize::collector::collect_items_rec
  57: rustc_monomorphize::collector::collect_items_rec
  58: rustc_monomorphize::collector::collect_items_rec
  59: rustc_monomorphize::collector::collect_items_rec
  60: <core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::par_for_each_in<alloc::vec::Vec<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#0}> as core::ops::function::FnOnce<()>>::call_once
  61: std::panicking::try::<(), core::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures::sync::par_for_each_in<alloc::vec::Vec<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#0}>>
  62: rustc_data_structures::sync::par_for_each_in::<alloc::vec::Vec<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}::{closure#0}>
  63: <rustc_session::session::Session>::time::<(), rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}>
  64: rustc_monomorphize::collector::collect_crate_mono_items
  65: rustc_monomorphize::partitioning::collect_and_partition_mono_items
  66: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>
  67: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>>
  68: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::collect_and_partition_mono_items, rustc_query_impl::plumbing::QueryCtxt>
  69: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_and_partition_mono_items
  70: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  71: <rustc_session::session::Session>::time::<alloc::boxed::Box<dyn core::any::Any>, rustc_interface::passes::start_codegen::{closure#0}>
  72: <rustc_interface::passes::QueryContext>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_errors::ErrorGuaranteed>>
  73: <rustc_interface::queries::Queries>::ongoing_codegen
  74: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuaranteed>>
  75: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  76: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
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.64.0 (a55dd71d5 2022-09-19) running on x86_64-apple-darwin

note: compiler flags: --crate-type bin -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `warp::filter::and_then::AndThenFuture<warp::filter::and::And<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::post::{closure#0}]>::{closure#0}]>, warp::filter::and::And<warp::filter::and::And<warp::filters::any::Any, warp::filters::path::Exact<warp::filters::path::internal::Opaque<web::start::{closure#0}::__StaticPath>>>, warp::filter::FilterFn<[closure@warp::filters::path::end::{closure#0}]>>>, warp::filters::multipart::FormOptions>, fn(warp::filters::multipart::FormData) -> impl core::future::future::Future<Output = core::result::Result<impl warp::reply::Reply, warp::reject::Rejection>> {web::handle_upload}>: core::marker::Send`
#1 [codegen_fulfill_obligation] checking if `core::future::into_future::IntoFuture` fulfills its obligations
#2 [resolve_instance] resolving instance `<tracing_futures::Instrumented<futures_util::future::future::Map<hyper::server::Server<hyper::server::tcp::AddrIncoming, hyper::service::make::MakeServiceFn<[closure@warp::server::Server<warp::filter::or::Or<warp::filter::or::Or<warp::filter::map::Map<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::get::{closure#0}]>::{closure#0}]>, warp::filters::path::Exact<warp::filters::path::internal::Opaque<&str>>>, [closure@i18n/src/web.rs:23:14: 23:21]>, warp::filter::map::Map<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::get::{closure#0}]>::{closure#0}]>, warp::filters::path::Exact<warp::filters::path::internal::Opaque<&str>>>, [closure@i18n/src/web.rs:25:76: 25:78]>>, warp::filter::and_then::AndThen<warp::filter::and::And<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::post::{closure#0}]>::{closure#0}]>, warp::filter::and::And<warp::filter::and::And<warp::filters::any::Any, warp::filters::path::Exact<warp::filters::path::internal::Opaque<web::start::{closure#0}::__StaticPath>>>, warp::filter::FilterFn<[closure@warp::filters::path::end::{closure#0}]>>>, warp::filters::multipart::FormOptions>, fn(warp::filters::multipart::FormData) -> impl core::future::future::Future<Output = core::result::Result<impl warp::reply::Reply, warp::reject::Rejection>> {web::handle_upload}>>>::bind_ephemeral<std::net::addr::SocketAddr>::{closure#1}::{closure#0}]>>, [closure@warp::server::Server<warp::filter::or::Or<warp::filter::or::Or<warp::filter::map::Map<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::get::{closure#0}]>::{closure#0}]>, warp::filters::path::Exact<warp::filters::path::internal::Opaque<&str>>>, [closure@i18n/src/web.rs:23:14: 23:21]>, warp::filter::map::Map<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::get::{closure#0}]>::{closure#0}]>, warp::filters::path::Exact<warp::filters::path::internal::Opaque<&str>>>, [closure@i18n/src/web.rs:25:76: 25:78]>>, warp::filter::and_then::AndThen<warp::filter::and::And<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::post::{closure#0}]>::{closure#0}]>, warp::filter::and::And<warp::filter::and::And<warp::filters::any::Any, warp::filters::path::Exact<warp::filters::path::internal::Opaque<web::start::{closure#0}::__StaticPath>>>, warp::filter::FilterFn<[closure@warp::filters::path::end::{closure#0}]>>>, warp::filters::multipart::FormOptions>, fn(warp::filters::multipart::FormData) -> impl core::future::future::Future<Output = core::result::Result<impl warp::reply::Reply, warp::reject::Rejection>> {web::handle_upload}>>>::bind_ephemeral<std::net::addr::SocketAddr>::{closure#0}]>> as core::future::into_future::IntoFuture>::into_future`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack

RUST_BACKTRACE=full:

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:23:85
stack backtrace:
   0:        0x109aa45c4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7d80e14dd19335c9
   1:        0x109afc68b - core::fmt::write::h1709d0255080e28a
   2:        0x109a96fe8 - std::io::Write::write_fmt::hecc56b5639d319e7
   3:        0x109aa789d - std::panicking::default_hook::{{closure}}::had4d1cd22a173020
   4:        0x109aa75ee - std::panicking::default_hook::h42aa124509888735
   5:        0x11221c73a - rustc_driver[b232a614d5c482d6]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x109aa7f0b - std::panicking::rust_panic_with_hook::h2b231e816574a23a
   7:        0x109aa7d4a - std::panicking::begin_panic_handler::{{closure}}::h9da8d88b7a4c9d5e
   8:        0x109aa4a47 - std::sys_common::backtrace::__rust_end_short_backtrace::h10dbf1377dfaf877
   9:        0x109aa7a5a - _rust_begin_unwind
  10:        0x109b27943 - core::panicking::panic_fmt::hde1544b10dc8b4d3
  11:        0x109b27827 - core::panicking::panic::h73607a325a777129
  12:        0x115f717d9 - <rustc_metadata[6e15ed64399eb477]::creader::CStore as rustc_session[3f62dfdbb5354e46]::cstore::CrateStore>::def_path_hash_to_def_id
  13:        0x11675c8fe - <rustc_middle[77b05d97adc105c3]::ty::context::TyCtxt>::def_path_hash_to_def_id
  14:        0x1166ce09e - <rustc_query_system[923812efe1d06df6]::dep_graph::dep_node::DepNode<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind> as rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepNodeExt>::extract_def_id
  15:        0x115c09f7a - rustc_query_impl[1fb0f992e528a50]::query_callbacks::type_of::force_from_dep_node
  16:        0x11673ef9c - <rustc_middle[77b05d97adc105c3]::ty::context::TyCtxt as rustc_query_system[923812efe1d06df6]::dep_graph::DepContext>::try_force_from_dep_node
  17:        0x115ad77db - <rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt>
  18:        0x115ad7798 - <rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt>
  19:        0x115ad7798 - <rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt>
  20:        0x115ad7798 - <rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt>
  21:        0x115ad7798 - <rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt>
  22:        0x115ad7798 - <rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt>
  23:        0x115ad7798 - <rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt>
  24:        0x1158ebac7 - rustc_query_system[923812efe1d06df6]::query::plumbing::try_load_from_disk_and_cache_in_memory::<rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt, rustc_middle[77b05d97adc105c3]::infer::canonical::Canonical<rustc_middle[77b05d97adc105c3]::ty::ParamEnvAnd<rustc_middle[77b05d97adc105c3]::ty::Predicate>>, core[ccfd6f2964525339]::result::Result<rustc_middle[77b05d97adc105c3]::traits::select::EvaluationResult, rustc_middle[77b05d97adc105c3]::traits::select::OverflowError>>
  25:        0x115939334 - rustc_query_system[923812efe1d06df6]::query::plumbing::get_query::<rustc_query_impl[1fb0f992e528a50]::queries::evaluate_obligation, rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt>
  26:        0x115c07339 - <rustc_query_impl[1fb0f992e528a50]::Queries as rustc_middle[77b05d97adc105c3]::ty::query::QueryEngine>::evaluate_obligation
  27:        0x116453546 - <rustc_infer[daf5aaa74dbe2ea7]::infer::InferCtxt as rustc_trait_selection[5b0b3e5dfe8e4329]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  28:        0x116453653 - <rustc_infer[daf5aaa74dbe2ea7]::infer::InferCtxt as rustc_trait_selection[5b0b3e5dfe8e4329]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  29:        0x1164e456d - <rustc_trait_selection[5b0b3e5dfe8e4329]::traits::fulfill::FulfillProcessor>::process_trait_obligation
  30:        0x1164e3f62 - <rustc_trait_selection[5b0b3e5dfe8e4329]::traits::fulfill::FulfillProcessor as rustc_data_structures[9d9aca487cd3f5bb]::obligation_forest::ObligationProcessor>::process_obligation
  31:        0x116560602 - <rustc_data_structures[9d9aca487cd3f5bb]::obligation_forest::ObligationForest<rustc_trait_selection[5b0b3e5dfe8e4329]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[5b0b3e5dfe8e4329]::traits::fulfill::FulfillProcessor, rustc_data_structures[9d9aca487cd3f5bb]::obligation_forest::Outcome<rustc_trait_selection[5b0b3e5dfe8e4329]::traits::fulfill::PendingPredicateObligation, rustc_infer[daf5aaa74dbe2ea7]::traits::FulfillmentErrorCode>>
  32:        0x1164dcfad - <rustc_trait_selection[5b0b3e5dfe8e4329]::traits::fulfill::FulfillmentContext as rustc_infer[daf5aaa74dbe2ea7]::traits::engine::TraitEngine>::select_where_possible
  33:        0x1164dce80 - <rustc_trait_selection[5b0b3e5dfe8e4329]::traits::fulfill::FulfillmentContext as rustc_infer[daf5aaa74dbe2ea7]::traits::engine::TraitEngine>::select_all_or_error
  34:        0x11641d1f5 - <rustc_infer[daf5aaa74dbe2ea7]::infer::InferCtxtBuilder>::enter::<core[ccfd6f2964525339]::result::Result<&rustc_middle[77b05d97adc105c3]::traits::ImplSource<()>, rustc_middle[77b05d97adc105c3]::traits::CodegenObligationError>, rustc_trait_selection[5b0b3e5dfe8e4329]::traits::codegen::codegen_fulfill_obligation::{closure#0}>
  35:        0x116527bf1 - rustc_trait_selection[5b0b3e5dfe8e4329]::traits::codegen::codegen_fulfill_obligation
  36:        0x1159a58d4 - <rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind as rustc_query_system[923812efe1d06df6]::dep_graph::DepKind>::with_deps::<<rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[77b05d97adc105c3]::ty::context::TyCtxt, (rustc_middle[77b05d97adc105c3]::ty::ParamEnv, rustc_middle[77b05d97adc105c3]::ty::sty::Binder<rustc_middle[77b05d97adc105c3]::ty::sty::TraitRef>), core[ccfd6f2964525339]::result::Result<&rustc_middle[77b05d97adc105c3]::traits::ImplSource<()>, rustc_middle[77b05d97adc105c3]::traits::CodegenObligationError>>::{closure#0}, core[ccfd6f2964525339]::result::Result<&rustc_middle[77b05d97adc105c3]::traits::ImplSource<()>, rustc_middle[77b05d97adc105c3]::traits::CodegenObligationError>>
  37:        0x115b18742 - <rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[77b05d97adc105c3]::ty::context::TyCtxt, (rustc_middle[77b05d97adc105c3]::ty::ParamEnv, rustc_middle[77b05d97adc105c3]::ty::sty::Binder<rustc_middle[77b05d97adc105c3]::ty::sty::TraitRef>), core[ccfd6f2964525339]::result::Result<&rustc_middle[77b05d97adc105c3]::traits::ImplSource<()>, rustc_middle[77b05d97adc105c3]::traits::CodegenObligationError>>
  38:        0x115950327 - rustc_query_system[923812efe1d06df6]::query::plumbing::get_query::<rustc_query_impl[1fb0f992e528a50]::queries::codegen_fulfill_obligation, rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt>
  39:        0x115c06270 - <rustc_query_impl[1fb0f992e528a50]::Queries as rustc_middle[77b05d97adc105c3]::ty::query::QueryEngine>::codegen_fulfill_obligation
  40:        0x114f87689 - rustc_ty_utils[fa5a1d9038bce425]::instance::inner_resolve_instance
  41:        0x114f86125 - rustc_ty_utils[fa5a1d9038bce425]::instance::resolve_instance
  42:        0x1159a4138 - <rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind as rustc_query_system[923812efe1d06df6]::dep_graph::DepKind>::with_deps::<<rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[77b05d97adc105c3]::ty::context::TyCtxt, rustc_middle[77b05d97adc105c3]::ty::ParamEnvAnd<(rustc_span[dadb10719d06531]::def_id::DefId, &rustc_middle[77b05d97adc105c3]::ty::list::List<rustc_middle[77b05d97adc105c3]::ty::subst::GenericArg>)>, core[ccfd6f2964525339]::result::Result<core[ccfd6f2964525339]::option::Option<rustc_middle[77b05d97adc105c3]::ty::instance::Instance>, rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>>::{closure#0}, core[ccfd6f2964525339]::result::Result<core[ccfd6f2964525339]::option::Option<rustc_middle[77b05d97adc105c3]::ty::instance::Instance>, rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>>
  43:        0x115addb80 - <rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[77b05d97adc105c3]::ty::context::TyCtxt, rustc_middle[77b05d97adc105c3]::ty::ParamEnvAnd<(rustc_span[dadb10719d06531]::def_id::DefId, &rustc_middle[77b05d97adc105c3]::ty::list::List<rustc_middle[77b05d97adc105c3]::ty::subst::GenericArg>)>, core[ccfd6f2964525339]::result::Result<core[ccfd6f2964525339]::option::Option<rustc_middle[77b05d97adc105c3]::ty::instance::Instance>, rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>>
  44:        0x115931c92 - rustc_query_system[923812efe1d06df6]::query::plumbing::get_query::<rustc_query_impl[1fb0f992e528a50]::queries::resolve_instance, rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt>
  45:        0x115c07834 - <rustc_query_impl[1fb0f992e528a50]::Queries as rustc_middle[77b05d97adc105c3]::ty::query::QueryEngine>::resolve_instance
  46:        0x116855d10 - <rustc_middle[77b05d97adc105c3]::ty::instance::Instance>::resolve_opt_const_arg
  47:        0x1168554d6 - <rustc_middle[77b05d97adc105c3]::ty::instance::Instance>::resolve
  48:        0x1148970e3 - <rustc_monomorphize[a406f6b04befd1b4]::collector::MirNeighborCollector as rustc_middle[77b05d97adc105c3]::mir::visit::Visitor>::visit_terminator
  49:        0x11489f0c5 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_neighbours
  50:        0x11489c30d - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  51:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  52:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  53:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  54:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  55:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  56:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  57:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  58:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  59:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  60:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  61:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  62:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  63:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  64:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  65:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  66:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  67:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  68:        0x11489c9a6 - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_items_rec
  69:        0x1148ad534 - <core[ccfd6f2964525339]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[9d9aca487cd3f5bb]::sync::par_for_each_in<alloc[a79849253dbb7549]::vec::Vec<rustc_middle[77b05d97adc105c3]::mir::mono::MonoItem>, rustc_monomorphize[a406f6b04befd1b4]::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#0}> as core[ccfd6f2964525339]::ops::function::FnOnce<()>>::call_once
  70:        0x1148c4150 - std[2c17b0a3fe477be8]::panicking::try::<(), core[ccfd6f2964525339]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[9d9aca487cd3f5bb]::sync::par_for_each_in<alloc[a79849253dbb7549]::vec::Vec<rustc_middle[77b05d97adc105c3]::mir::mono::MonoItem>, rustc_monomorphize[a406f6b04befd1b4]::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#0}>>
  71:        0x1148c657f - rustc_data_structures[9d9aca487cd3f5bb]::sync::par_for_each_in::<alloc[a79849253dbb7549]::vec::Vec<rustc_middle[77b05d97adc105c3]::mir::mono::MonoItem>, rustc_monomorphize[a406f6b04befd1b4]::collector::collect_crate_mono_items::{closure#1}::{closure#0}>
  72:        0x1148b28aa - <rustc_session[3f62dfdbb5354e46]::session::Session>::time::<(), rustc_monomorphize[a406f6b04befd1b4]::collector::collect_crate_mono_items::{closure#1}>
  73:        0x11489976a - rustc_monomorphize[a406f6b04befd1b4]::collector::collect_crate_mono_items
  74:        0x1148a4022 - rustc_monomorphize[a406f6b04befd1b4]::partitioning::collect_and_partition_mono_items
  75:        0x115b2d4d8 - <rustc_query_system[923812efe1d06df6]::dep_graph::graph::DepGraph<rustc_middle[77b05d97adc105c3]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[77b05d97adc105c3]::ty::context::TyCtxt, (), (&std[2c17b0a3fe477be8]::collections::hash::set::HashSet<rustc_span[dadb10719d06531]::def_id::DefId, core[ccfd6f2964525339]::hash::BuildHasherDefault<rustc_hash[e8dfd47c01bdec5e]::FxHasher>>, &[rustc_middle[77b05d97adc105c3]::mir::mono::CodegenUnit])>
  76:        0x1158c260c - rustc_query_system[923812efe1d06df6]::query::plumbing::try_execute_query::<rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt, rustc_query_system[923812efe1d06df6]::query::caches::DefaultCache<(), (&std[2c17b0a3fe477be8]::collections::hash::set::HashSet<rustc_span[dadb10719d06531]::def_id::DefId, core[ccfd6f2964525339]::hash::BuildHasherDefault<rustc_hash[e8dfd47c01bdec5e]::FxHasher>>, &[rustc_middle[77b05d97adc105c3]::mir::mono::CodegenUnit])>>
  77:        0x115956d1f - rustc_query_system[923812efe1d06df6]::query::plumbing::get_query::<rustc_query_impl[1fb0f992e528a50]::queries::collect_and_partition_mono_items, rustc_query_impl[1fb0f992e528a50]::plumbing::QueryCtxt>
  78:        0x115c07017 - <rustc_query_impl[1fb0f992e528a50]::Queries as rustc_middle[77b05d97adc105c3]::ty::query::QueryEngine>::collect_and_partition_mono_items
  79:        0x1123f2adc - <rustc_codegen_llvm[72a00bab46809736]::LlvmCodegenBackend as rustc_codegen_ssa[a7c95725fcbf9efd]::traits::backend::CodegenBackend>::codegen_crate
  80:        0x1122c5dc2 - <rustc_session[3f62dfdbb5354e46]::session::Session>::time::<alloc[a79849253dbb7549]::boxed::Box<dyn core[ccfd6f2964525339]::any::Any>, rustc_interface[f8b8cf4f770498c1]::passes::start_codegen::{closure#0}>
  81:        0x1122c3c7c - <rustc_interface[f8b8cf4f770498c1]::passes::QueryContext>::enter::<<rustc_interface[f8b8cf4f770498c1]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[ccfd6f2964525339]::result::Result<alloc[a79849253dbb7549]::boxed::Box<dyn core[ccfd6f2964525339]::any::Any>, rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>>
  82:        0x11233e6f9 - <rustc_interface[f8b8cf4f770498c1]::queries::Queries>::ongoing_codegen
  83:        0x1121ad424 - <rustc_interface[f8b8cf4f770498c1]::interface::Compiler>::enter::<rustc_driver[b232a614d5c482d6]::run_compiler::{closure#1}::{closure#2}, core[ccfd6f2964525339]::result::Result<core[ccfd6f2964525339]::option::Option<rustc_interface[f8b8cf4f770498c1]::queries::Linker>, rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>>
  84:        0x112202398 - rustc_span[dadb10719d06531]::with_source_map::<core[ccfd6f2964525339]::result::Result<(), rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>, rustc_interface[f8b8cf4f770498c1]::interface::create_compiler_and_run<core[ccfd6f2964525339]::result::Result<(), rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>, rustc_driver[b232a614d5c482d6]::run_compiler::{closure#1}>::{closure#1}>
  85:        0x1121ae039 - <scoped_tls[48db78d854efead3]::ScopedKey<rustc_span[dadb10719d06531]::SessionGlobals>>::set::<rustc_interface[f8b8cf4f770498c1]::interface::run_compiler<core[ccfd6f2964525339]::result::Result<(), rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>, rustc_driver[b232a614d5c482d6]::run_compiler::{closure#1}>::{closure#0}, core[ccfd6f2964525339]::result::Result<(), rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>>
  86:        0x1121d0b99 - std[2c17b0a3fe477be8]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[f8b8cf4f770498c1]::util::run_in_thread_pool_with_globals<rustc_interface[f8b8cf4f770498c1]::interface::run_compiler<core[ccfd6f2964525339]::result::Result<(), rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>, rustc_driver[b232a614d5c482d6]::run_compiler::{closure#1}>::{closure#0}, core[ccfd6f2964525339]::result::Result<(), rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>>::{closure#0}, core[ccfd6f2964525339]::result::Result<(), rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>>
  87:        0x1121d13c1 - <<std[2c17b0a3fe477be8]::thread::Builder>::spawn_unchecked_<rustc_interface[f8b8cf4f770498c1]::util::run_in_thread_pool_with_globals<rustc_interface[f8b8cf4f770498c1]::interface::run_compiler<core[ccfd6f2964525339]::result::Result<(), rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>, rustc_driver[b232a614d5c482d6]::run_compiler::{closure#1}>::{closure#0}, core[ccfd6f2964525339]::result::Result<(), rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>>::{closure#0}, core[ccfd6f2964525339]::result::Result<(), rustc_errors[7d8f39c483a9ccdf]::ErrorGuaranteed>>::{closure#1} as core[ccfd6f2964525339]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  88:        0x109ab1457 - std::sys::unix::thread::Thread::new::thread_start::h76e6c1c658a39a87
  89:     0x7ff807362259 - __pthread_start

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.64.0 (a55dd71d5 2022-09-19) running on x86_64-apple-darwin

note: compiler flags: --crate-type bin -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `warp::filter::and_then::AndThenFuture<warp::filter::and::And<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::post::{closure#0}]>::{closure#0}]>, warp::filter::and::And<warp::filter::and::And<warp::filters::any::Any, warp::filters::path::Exact<warp::filters::path::internal::Opaque<web::start::{closure#0}::__StaticPath>>>, warp::filter::FilterFn<[closure@warp::filters::path::end::{closure#0}]>>>, warp::filters::multipart::FormOptions>, fn(warp::filters::multipart::FormData) -> impl core::future::future::Future<Output = core::result::Result<impl warp::reply::Reply, warp::reject::Rejection>> {web::handle_upload}>: core::marker::Send`
#1 [codegen_fulfill_obligation] checking if `core::future::into_future::IntoFuture` fulfills its obligations
#2 [resolve_instance] resolving instance `<tracing_futures::Instrumented<futures_util::future::future::Map<hyper::server::Server<hyper::server::tcp::AddrIncoming, hyper::service::make::MakeServiceFn<[closure@warp::server::Server<warp::filter::or::Or<warp::filter::or::Or<warp::filter::map::Map<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::get::{closure#0}]>::{closure#0}]>, warp::filters::path::Exact<warp::filters::path::internal::Opaque<&str>>>, [closure@i18n/src/web.rs:23:14: 23:21]>, warp::filter::map::Map<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::get::{closure#0}]>::{closure#0}]>, warp::filters::path::Exact<warp::filters::path::internal::Opaque<&str>>>, [closure@i18n/src/web.rs:25:76: 25:78]>>, warp::filter::and_then::AndThen<warp::filter::and::And<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::post::{closure#0}]>::{closure#0}]>, warp::filter::and::And<warp::filter::and::And<warp::filters::any::Any, warp::filters::path::Exact<warp::filters::path::internal::Opaque<web::start::{closure#0}::__StaticPath>>>, warp::filter::FilterFn<[closure@warp::filters::path::end::{closure#0}]>>>, warp::filters::multipart::FormOptions>, fn(warp::filters::multipart::FormData) -> impl core::future::future::Future<Output = core::result::Result<impl warp::reply::Reply, warp::reject::Rejection>> {web::handle_upload}>>>::bind_ephemeral<std::net::addr::SocketAddr>::{closure#1}::{closure#0}]>>, [closure@warp::server::Server<warp::filter::or::Or<warp::filter::or::Or<warp::filter::map::Map<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::get::{closure#0}]>::{closure#0}]>, warp::filters::path::Exact<warp::filters::path::internal::Opaque<&str>>>, [closure@i18n/src/web.rs:23:14: 23:21]>, warp::filter::map::Map<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::get::{closure#0}]>::{closure#0}]>, warp::filters::path::Exact<warp::filters::path::internal::Opaque<&str>>>, [closure@i18n/src/web.rs:25:76: 25:78]>>, warp::filter::and_then::AndThen<warp::filter::and::And<warp::filter::and::And<warp::filter::FilterFn<[closure@warp::filters::method::method_is<[closure@warp::filters::method::post::{closure#0}]>::{closure#0}]>, warp::filter::and::And<warp::filter::and::And<warp::filters::any::Any, warp::filters::path::Exact<warp::filters::path::internal::Opaque<web::start::{closure#0}::__StaticPath>>>, warp::filter::FilterFn<[closure@warp::filters::path::end::{closure#0}]>>>, warp::filters::multipart::FormOptions>, fn(warp::filters::multipart::FormData) -> impl core::future::future::Future<Output = core::result::Result<impl warp::reply::Reply, warp::reject::Rejection>> {web::handle_upload}>>>::bind_ephemeral<std::net::addr::SocketAddr>::{closure#0}]>> as core::future::into_future::IntoFuture>::into_future`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack

Activity

yatesco

yatesco commented on Jan 23, 2023

@yatesco
Author

(note: a cargo clean allowed compilation to succeed. I compile this multiple times a day and never run into this particular compilation problem, hence reporting)

albertlarsan68

albertlarsan68 commented on Jan 23, 2023

@albertlarsan68
Member

From the report that cleaning solved,
@rustbot label +A-incr-comp

added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Apr 5, 2023
sourcefrog

sourcefrog commented on May 21, 2023

@sourcefrog
Contributor

I also hit an ICE at the same line:

; cargo t -q
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:23:85
stack backtrace:
   0:        0x10089d864 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbcf32a37cac96a91
   1:        0x1008f0958 - core::fmt::write::he4ac7801a7c477c2
   2:        0x10089330c - std::io::Write::write_fmt::h22e5b10c231d60a2
   3:        0x10089d678 - std::sys_common::backtrace::print::h88d0a948d9efe2ff
   4:        0x1008a008c - std::panicking::default_hook::{{closure}}::h44b2e707537e2778
   5:        0x10089fe4c - std::panicking::default_hook::hfeb18c42faaa0956
   6:        0x108d82f78 - rustc_driver_impl[c07b475f7162e0]::DEFAULT_HOOK::{closure#0}::{closure#0}
   7:        0x1008a074c - std::panicking::rust_panic_with_hook::h934ded7e790c9958
   8:        0x1008a0504 - std::panicking::begin_panic_handler::{{closure}}::h7126a282c4e974b7
   9:        0x10089dc84 - std::sys_common::backtrace::__rust_end_short_backtrace::hf7df1b8a9f804fcd
  10:        0x1008a02d8 - _rust_begin_unwind
  11:        0x10091c400 - core::panicking::panic_fmt::h0f564f53d93f5a9a
  12:        0x10091c470 - core::panicking::panic::h9a3a31a4d7c8524a
  13:        0x10c4e5200 - <rustc_metadata[6bb6e21c2fb6176b]::creader::CStore as rustc_session[820cacd699a5067b]::cstore::CrateStore>::def_path_hash_to_def_id
  14:        0x10ccac150 - <rustc_middle[723cfe9f1a3a538a]::ty::context::TyCtxt>::def_path_hash_to_def_id
  15:        0x10cbea9e4 - <rustc_query_system[d22d3f540ac00fd5]::dep_graph::dep_node::DepNode<rustc_middle[723cfe9f1a3a538a]::dep_graph::dep_node::DepKind> as rustc_middle[723cfe9f1a3a538a]::dep_graph::dep_node::DepNodeExt>::extract_def_id
  16:        0x10c100088 - <rustc_query_impl[7e39b3c0ea0e60de]::plumbing::query_callback<rustc_query_impl[7e39b3c0ea0e60de]::queries::opt_def_kind>::{closure#0} as core[7cd3bd47ed09ffd]::ops::function::FnOnce<(rustc_middle[723cfe9f1a3a538a]::ty::context::TyCtxt, rustc_query_system[d22d3f540ac00fd5]::dep_graph::dep_node::DepNode<rustc_middle[723cfe9f1a3a538a]::dep_graph::dep_node::DepKind>)>>::call_once
  17:        0x10c0ef534 - <rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepGraphData<rustc_middle[723cfe9f1a3a538a]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>
  18:        0x10c0ef57c - <rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepGraphData<rustc_middle[723cfe9f1a3a538a]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>
  19:        0x10c0ef57c - <rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepGraphData<rustc_middle[723cfe9f1a3a538a]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>
  20:        0x10c0ef57c - <rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepGraphData<rustc_middle[723cfe9f1a3a538a]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>
  21:        0x10c003370 - <std[ca6a5c052cb0c859]::thread::local::LocalKey<core[7cd3bd47ed09ffd]::cell::Cell<*const ()>>>::with::<rustc_middle[723cfe9f1a3a538a]::ty::context::tls::enter_context<rustc_query_system[d22d3f540ac00fd5]::query::plumbing::execute_job_incr<rustc_query_impl[7e39b3c0ea0e60de]::queries::evaluate_obligation, rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>::{closure#1}, core[7cd3bd47ed09ffd]::option::Option<(rustc_middle[723cfe9f1a3a538a]::query::erase::Erased<[u8; 2usize]>, rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepNodeIndex)>>::{closure#0}, core[7cd3bd47ed09ffd]::option::Option<(rustc_middle[723cfe9f1a3a538a]::query::erase::Erased<[u8; 2usize]>, rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepNodeIndex)>>
  22:        0x10bf183e0 - rustc_query_system[d22d3f540ac00fd5]::query::plumbing::try_execute_query::<rustc_query_impl[7e39b3c0ea0e60de]::queries::evaluate_obligation, rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>
  23:        0x10c169d6c - <rustc_query_impl[7e39b3c0ea0e60de]::Queries as rustc_middle[723cfe9f1a3a538a]::ty::query::QueryEngine>::evaluate_obligation
  24:        0x10c9eacc0 - <rustc_infer[cfb8c86e9d5860f5]::infer::InferCtxt as rustc_trait_selection[914d6aa5ea50c8f3]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  25:        0x10c9eb024 - <rustc_infer[cfb8c86e9d5860f5]::infer::InferCtxt as rustc_trait_selection[914d6aa5ea50c8f3]::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  26:        0x10c927624 - <rustc_trait_selection[914d6aa5ea50c8f3]::traits::fulfill::FulfillProcessor>::process_trait_obligation
  27:        0x10c926a64 - <rustc_trait_selection[914d6aa5ea50c8f3]::traits::fulfill::FulfillProcessor as rustc_data_structures[b6351f22e3d2cdd7]::obligation_forest::ObligationProcessor>::process_obligation
  28:        0x10c988fbc - <rustc_data_structures[b6351f22e3d2cdd7]::obligation_forest::ObligationForest<rustc_trait_selection[914d6aa5ea50c8f3]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[914d6aa5ea50c8f3]::traits::fulfill::FulfillProcessor>
  29:        0x10c9256b0 - <rustc_trait_selection[914d6aa5ea50c8f3]::traits::fulfill::FulfillmentContext as rustc_infer[cfb8c86e9d5860f5]::traits::engine::TraitEngine>::select_where_possible
  30:        0x10bc8bf98 - <dyn rustc_infer[cfb8c86e9d5860f5]::traits::engine::TraitEngine as rustc_infer[cfb8c86e9d5860f5]::traits::engine::TraitEngineExt>::select_all_or_error
  31:        0x10bcf4914 - rustc_traits[3f1e2625ab0cbba4]::codegen::codegen_select_candidate
  32:        0x10c0308fc - <std[ca6a5c052cb0c859]::thread::local::LocalKey<core[7cd3bd47ed09ffd]::cell::Cell<*const ()>>>::with::<rustc_middle[723cfe9f1a3a538a]::ty::context::tls::enter_context<rustc_query_system[d22d3f540ac00fd5]::query::plumbing::execute_job_incr<rustc_query_impl[7e39b3c0ea0e60de]::queries::codegen_select_candidate, rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[723cfe9f1a3a538a]::query::erase::Erased<[u8; 16usize]>, rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[723cfe9f1a3a538a]::query::erase::Erased<[u8; 16usize]>, rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepNodeIndex)>
  33:        0x10bf3c964 - rustc_query_system[d22d3f540ac00fd5]::query::plumbing::try_execute_query::<rustc_query_impl[7e39b3c0ea0e60de]::queries::codegen_select_candidate, rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>
  34:        0x10c15f2a8 - <rustc_query_impl[7e39b3c0ea0e60de]::Queries as rustc_middle[723cfe9f1a3a538a]::ty::query::QueryEngine>::codegen_select_candidate
  35:        0x10b18e35c - rustc_ty_utils[a741f169bbeee40b]::instance::inner_resolve_instance
  36:        0x10b18d898 - rustc_ty_utils[a741f169bbeee40b]::instance::resolve_instance
  37:        0x10bfec6b8 - <std[ca6a5c052cb0c859]::thread::local::LocalKey<core[7cd3bd47ed09ffd]::cell::Cell<*const ()>>>::with::<rustc_middle[723cfe9f1a3a538a]::ty::context::tls::enter_context<rustc_query_system[d22d3f540ac00fd5]::query::plumbing::execute_job_incr<rustc_query_impl[7e39b3c0ea0e60de]::queries::resolve_instance, rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[723cfe9f1a3a538a]::query::erase::Erased<[u8; 32usize]>, rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[723cfe9f1a3a538a]::query::erase::Erased<[u8; 32usize]>, rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepNodeIndex)>
  38:        0x10bf05e70 - rustc_query_system[d22d3f540ac00fd5]::query::plumbing::try_execute_query::<rustc_query_impl[7e39b3c0ea0e60de]::queries::resolve_instance, rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>
  39:        0x10c16bcc8 - <rustc_query_impl[7e39b3c0ea0e60de]::Queries as rustc_middle[723cfe9f1a3a538a]::ty::query::QueryEngine>::resolve_instance
  40:        0x10cc2c420 - <rustc_middle[723cfe9f1a3a538a]::ty::instance::Instance>::resolve_opt_const_arg
  41:        0x10cc2be40 - <rustc_middle[723cfe9f1a3a538a]::ty::instance::Instance>::expect_resolve
  42:        0x10b4a9da8 - <rustc_monomorphize[475d4823699b904d]::collector::MirNeighborCollector as rustc_middle[723cfe9f1a3a538a]::mir::visit::Visitor>::visit_terminator
  43:        0x10b4ae580 - rustc_monomorphize[475d4823699b904d]::collector::collect_neighbours
  44:        0x10b4acb88 - rustc_monomorphize[475d4823699b904d]::collector::collect_items_rec
  45:        0x10b4ad398 - rustc_monomorphize[475d4823699b904d]::collector::collect_items_rec
  46:        0x10b4ce454 - <core[7cd3bd47ed09ffd]::panic::unwind_safe::AssertUnwindSafe<rustc_data_structures[b6351f22e3d2cdd7]::sync::par_for_each_in<alloc[f5d5b4c8b72391a3]::vec::Vec<rustc_middle[723cfe9f1a3a538a]::mir::mono::MonoItem>, rustc_monomorphize[475d4823699b904d]::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#0}> as core[7cd3bd47ed09ffd]::ops::function::FnOnce<()>>::call_once
  47:        0x10b4bf478 - rustc_data_structures[b6351f22e3d2cdd7]::sync::par_for_each_in::<alloc[f5d5b4c8b72391a3]::vec::Vec<rustc_middle[723cfe9f1a3a538a]::mir::mono::MonoItem>, rustc_monomorphize[475d4823699b904d]::collector::collect_crate_mono_items::{closure#1}::{closure#0}>
  48:        0x10b4c6ff8 - <rustc_session[820cacd699a5067b]::session::Session>::time::<(), rustc_monomorphize[475d4823699b904d]::collector::collect_crate_mono_items::{closure#1}>
  49:        0x10b4ab170 - rustc_monomorphize[475d4823699b904d]::collector::collect_crate_mono_items
  50:        0x10b4bc624 - rustc_monomorphize[475d4823699b904d]::partitioning::collect_and_partition_mono_items
  51:        0x10c047144 - <std[ca6a5c052cb0c859]::thread::local::LocalKey<core[7cd3bd47ed09ffd]::cell::Cell<*const ()>>>::with::<rustc_middle[723cfe9f1a3a538a]::ty::context::tls::enter_context<rustc_query_system[d22d3f540ac00fd5]::query::plumbing::execute_job_incr<rustc_query_impl[7e39b3c0ea0e60de]::queries::collect_and_partition_mono_items, rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>::{closure#2}, (rustc_middle[723cfe9f1a3a538a]::query::erase::Erased<[u8; 24usize]>, rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepNodeIndex)>::{closure#0}, (rustc_middle[723cfe9f1a3a538a]::query::erase::Erased<[u8; 24usize]>, rustc_query_system[d22d3f540ac00fd5]::dep_graph::graph::DepNodeIndex)>
  52:        0x10bf4fb20 - rustc_query_system[d22d3f540ac00fd5]::query::plumbing::try_execute_query::<rustc_query_impl[7e39b3c0ea0e60de]::queries::collect_and_partition_mono_items, rustc_query_impl[7e39b3c0ea0e60de]::plumbing::QueryCtxt>
  53:        0x10c168ab4 - <rustc_query_impl[7e39b3c0ea0e60de]::Queries as rustc_middle[723cfe9f1a3a538a]::ty::query::QueryEngine>::collect_and_partition_mono_items
  54:        0x108f18570 - rustc_codegen_ssa[28ee3fd94f9aaab4]::base::codegen_crate::<rustc_codegen_llvm[2145e776f1e6f672]::LlvmCodegenBackend>
  55:        0x108f15664 - <rustc_codegen_llvm[2145e776f1e6f672]::LlvmCodegenBackend as rustc_codegen_ssa[28ee3fd94f9aaab4]::traits::backend::CodegenBackend>::codegen_crate
  56:        0x108e26d20 - <rustc_session[820cacd699a5067b]::session::Session>::time::<alloc[f5d5b4c8b72391a3]::boxed::Box<dyn core[7cd3bd47ed09ffd]::any::Any>, rustc_interface[6cbd027d94b5de24]::passes::start_codegen::{closure#0}>
  57:        0x108e9d964 - rustc_interface[6cbd027d94b5de24]::passes::start_codegen
  58:        0x108e8b368 - <rustc_middle[723cfe9f1a3a538a]::ty::context::GlobalCtxt>::enter::<<rustc_interface[6cbd027d94b5de24]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[7cd3bd47ed09ffd]::result::Result<alloc[f5d5b4c8b72391a3]::boxed::Box<dyn core[7cd3bd47ed09ffd]::any::Any>, rustc_span[61b8e85a80df2ab2]::ErrorGuaranteed>>
  59:        0x108e55340 - <rustc_interface[6cbd027d94b5de24]::queries::Queries>::ongoing_codegen
  60:        0x108dd3bd0 - <rustc_interface[6cbd027d94b5de24]::interface::Compiler>::enter::<rustc_driver_impl[c07b475f7162e0]::run_compiler::{closure#1}::{closure#2}, core[7cd3bd47ed09ffd]::result::Result<core[7cd3bd47ed09ffd]::option::Option<rustc_interface[6cbd027d94b5de24]::queries::Linker>, rustc_span[61b8e85a80df2ab2]::ErrorGuaranteed>>
  61:        0x108d8a208 - rustc_span[61b8e85a80df2ab2]::set_source_map::<core[7cd3bd47ed09ffd]::result::Result<(), rustc_span[61b8e85a80df2ab2]::ErrorGuaranteed>, rustc_interface[6cbd027d94b5de24]::interface::run_compiler<core[7cd3bd47ed09ffd]::result::Result<(), rustc_span[61b8e85a80df2ab2]::ErrorGuaranteed>, rustc_driver_impl[c07b475f7162e0]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  62:        0x108d9df88 - std[ca6a5c052cb0c859]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[6cbd027d94b5de24]::util::run_in_thread_pool_with_globals<rustc_interface[6cbd027d94b5de24]::interface::run_compiler<core[7cd3bd47ed09ffd]::result::Result<(), rustc_span[61b8e85a80df2ab2]::ErrorGuaranteed>, rustc_driver_impl[c07b475f7162e0]::run_compiler::{closure#1}>::{closure#0}, core[7cd3bd47ed09ffd]::result::Result<(), rustc_span[61b8e85a80df2ab2]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7cd3bd47ed09ffd]::result::Result<(), rustc_span[61b8e85a80df2ab2]::ErrorGuaranteed>>
  63:        0x108d8e9b4 - <<std[ca6a5c052cb0c859]::thread::Builder>::spawn_unchecked_<rustc_interface[6cbd027d94b5de24]::util::run_in_thread_pool_with_globals<rustc_interface[6cbd027d94b5de24]::interface::run_compiler<core[7cd3bd47ed09ffd]::result::Result<(), rustc_span[61b8e85a80df2ab2]::ErrorGuaranteed>, rustc_driver_impl[c07b475f7162e0]::run_compiler::{closure#1}>::{closure#0}, core[7cd3bd47ed09ffd]::result::Result<(), rustc_span[61b8e85a80df2ab2]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7cd3bd47ed09ffd]::result::Result<(), rustc_span[61b8e85a80df2ab2]::ErrorGuaranteed>>::{closure#1} as core[7cd3bd47ed09ffd]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  64:        0x1008a8df4 - std::sys::unix::thread::Thread::new::thread_start::hb384a6c80d311b9f
  65:        0x1a1797fa8 - __pthread_joiner_wake

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.70.0-beta.4 (2013813b6 2023-05-07) running on aarch64-apple-darwin

note: compiler flags: --crate-type bin -C embed-bitcode=no -C split-debuginfo=unpacked -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 `core::iter::adapters::map::Map<conserve::merge::MergeTrees<conserve::index::IndexEntry, conserve::entry::EntryValue, readahead_iterator::Readahead<conserve::index::IndexEntry>, readahead_iterator::Readahead<conserve::entry::EntryValue>>, [closure@conserve::diff::diff::{closure#1}]>: core::iter::traits::iterator::Iterator`
#1 [codegen_select_candidate] computing candidate for `<core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<conserve::merge::MergeTrees<conserve::index::IndexEntry, conserve::entry::EntryValue, readahead_iterator::Readahead<conserve::index::IndexEntry>, readahead_iterator::Readahead<conserve::entry::EntryValue>>, [closure@conserve::diff::diff::{closure#1}]>, [closure@conserve::diff::diff::{closure#2}]> as core::iter::traits::collect::IntoIterator>`
#2 [resolve_instance] resolving instance `<core::iter::adapters::filter::Filter<core::iter::adapters::map::Map<conserve::merge::MergeTrees<conserve::index::IndexEntry, conserve::entry::EntryValue, readahead_iterator::Readahead<conserve::index::IndexEntry>, readahead_iterator::Readahead<conserve::entry::EntryValue>>, [closure@conserve::diff::diff::{closure#1}]>, [closure@conserve::diff::diff::{closure#2}]> as core::iter::traits::collect::IntoIterator>::into_iter`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 TraitSelect(2ce9722f4be39d84-e6abd6d79f6d982a)
#1 TraitSelect(f1545d48d51e5f25-cb50ec9c3fb605c0)
#2 TraitSelect(b770b3d75e5d9a83-fee98413a1acd933)
#3 evaluate_obligation(c4c407a854a36793-9a94dd7cff03eb78)
end of try_mark_green dep node stack
error: could not compile `conserve` (bin "conserve")

Cleaning the tree also fixed it for me.

I've saved a tarball of the tree (prior to cleaning) in case that helps, but it is too big to attach here. Let me know if you want it.

poliorcetics

poliorcetics commented on Jun 13, 2023

@poliorcetics
Contributor

Also seen in:

rustc 1.70.0 (90c541806 2023-05-31) running on aarch64-apple-darwin
compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C incremental=[REDACTED]

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `salsa::lru::Lru<salsa::derived::slot::Slot<hir_ty::db::ConstEvalQuery, salsa::derived::AlwaysMemoizeValue>>: core::marker::Sync`
#1 [check_well_formed] checking that `<impl at crates/ide-db/src/lib.rs:321:1: 321:46>` is well-formed
#2 [analysis] running analysis passes on this crate
end of query stack

Seen when using incremental compilation of rust-analyzer, last compiled yesterday morning (2023-06-12) and today's evening (2023-06-13), going from commit 38c47dfe3 to f8dec25bd.

I had cache previously, so I don't think this is simply one compilation that broke it but I'll have to check if I can reproduce

DropDemBits

DropDemBits commented on Jun 17, 2023

@DropDemBits
Contributor

also managed to reproduce from compiling rust-analyzer, and managed to narrow down the range to going from 68bdf609 to a4695788

this also happens on the most recent nightly i downloaded:

rustc 1.72.0-nightly (6bba06146 2023-06-16)
binary: rustc
commit-hash: 6bba061467f7c2cab04b262b95eb67bf89265587
commit-date: 2023-06-16
host: x86_64-pc-windows-msvc
release: 1.72.0-nightly
LLVM version: 16.0.5
Backtrace

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler\rustc_metadata\src\rmeta\def_path_hash_map.rs:22:85
stack backtrace:
   0:     0x7ff8a8f9638c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha711c250b85f00b6
   1:     0x7ff8a8fcf75b - core::fmt::write::h8b746ceb05268665
   2:     0x7ff8a8f8bad9 - <std::io::IoSliceMut as core::fmt::Debug>::fmt::h17d4c9c252eb1f18
   3:     0x7ff8a8f9613b - std::sys::common::alloc::realloc_fallback::h86e911c5d3071681
   4:     0x7ff8a8f99949 - std::panicking::default_hook::ha641d15382f33042
   5:     0x7ff8a8f995ff - std::panicking::default_hook::ha641d15382f33042
   6:     0x7ff87c60ee2a - rustc_driver_impl[ac46132e4667b0e2]::install_ice_hook
   7:     0x7ff8a8f9a070 - std::panicking::rust_panic_with_hook::hb74f0ca28627faee
   8:     0x7ff8a8f99dba - <std::panicking::begin_panic_handler::StrPanicPayload as core::panic::BoxMeUp>::get::hc29339976862ea42
   9:     0x7ff8a8f96fb9 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha711c250b85f00b6
  10:     0x7ff8a8f99b00 - rust_begin_unwind
  11:     0x7ff8a9003395 - core::panicking::panic_fmt::hdf116630103fe4c1
  12:     0x7ff8a9003442 - core::panicking::panic::hddb12b75ed5677ca
  13:     0x7ff87c04a98f - <rustc_metadata[35d7f45a15e9253c]::creader::CStore as rustc_session[c44ac7fb57fe4e38]::cstore::CrateStore>::def_path_hash_to_def_id
  14:     0x7ff87c53b7c3 - <rustc_query_system[d5068e30ce4122c]::dep_graph::dep_node::DepNode<rustc_middle[44f03dff55d08e24]::dep_graph::dep_node::DepKind> as rustc_middle[44f03dff55d08e24]::dep_graph::dep_node::DepNodeExt>::extract_def_id
  15:     0x7ff87b234ba4 - rustc_query_impl[86f67fbd7cf5381d]::profiling_support::alloc_self_profile_query_strings
  16:     0x7ff87bf8a44f - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  17:     0x7ff87bf8a3e5 - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  18:     0x7ff87bf8a3e5 - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  19:     0x7ff87bf8a3e5 - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  20:     0x7ff87bf8a3e5 - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  21:     0x7ff87bf8a3e5 - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  22:     0x7ff87bf8a3e5 - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  23:     0x7ff87bf8a3e5 - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  24:     0x7ff87bf8a3e5 - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  25:     0x7ff87bf8a3e5 - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  26:     0x7ff87bf8a3e5 - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  27:     0x7ff87bfc33ff - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  28:     0x7ff87bf185ee - rustc_mir_dataflow[e372c1c23679be2]::impls::borrowed_locals::borrowed_locals
  29:     0x7ff87c37f4bf - <rustc_trait_selection[1a98754f5d25eeac]::traits::fulfill::FulfillProcessor as rustc_data_structures[89b65d4879e031ac]::obligation_forest::ObligationProcessor>::process_obligation
  30:     0x7ff87c36a490 - <rustc_trait_selection[1a98754f5d25eeac]::traits::select::SelectionContext>::select
  31:     0x7ff87c30dc9d - <rustc_trait_selection[1a98754f5d25eeac]::traits::engine::ObligationCtxt>::select_all_or_error
  32:     0x7ff87b8f3329 - rustc_hir_analysis[490ffebf3855a719]::collect::get_infer_ret_ty
  33:     0x7ff87bf4ae5f - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  34:     0x7ff87c014eac - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  35:     0x7ff87b25e440 - rustc_query_impl[86f67fbd7cf5381d]::profiling_support::alloc_self_profile_query_strings
  36:     0x7ff87c00a3c4 - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  37:     0x7ff87b298659 - rustc_query_impl[86f67fbd7cf5381d]::profiling_support::alloc_self_profile_query_strings
  38:     0x7ff87b2301a6 - rustc_query_impl[86f67fbd7cf5381d]::profiling_support::alloc_self_profile_query_strings
  39:     0x7ff87bf8a44f - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  40:     0x7ff87bfad22a - rustc_query_impl[86f67fbd7cf5381d]::query_callbacks
  41:     0x7ff87b1fcfbb - rustc_query_impl[86f67fbd7cf5381d]::query_system
  42:     0x7ff87afc18a8 - <rustc_hir_analysis[490ffebf3855a719]::collect::type_of::opaque::RpitConstraintChecker as rustc_hir[240e0f447b8477b]::intravisit::Visitor>::visit_expr
  43:     0x7ff87af734ba - rustc_hir_analysis[490ffebf3855a719]::provide
  44:     0x7ff87b8a6320 - rustc_hir_analysis[490ffebf3855a719]::check_crate
  45:     0x7ff87893d991 - rustc_interface[e5dbb5c07706f27a]::passes::analysis
  46:     0x7ff87b24818d - rustc_query_impl[86f67fbd7cf5381d]::profiling_support::alloc_self_profile_query_strings
  47:     0x7ff87b2eae69 - rustc_query_impl[86f67fbd7cf5381d]::profiling_support::alloc_self_profile_query_strings
  48:     0x7ff87b25da35 - rustc_query_impl[86f67fbd7cf5381d]::profiling_support::alloc_self_profile_query_strings
  49:     0x7ff87b29e5cb - rustc_query_impl[86f67fbd7cf5381d]::profiling_support::alloc_self_profile_query_strings
  50:     0x7ff87b1f7995 - rustc_query_impl[86f67fbd7cf5381d]::query_system
  51:     0x7ff87891a741 - <rustc_middle[44f03dff55d08e24]::ty::SymbolName as core[4699d6319c9d7119]::fmt::Debug>::fmt
  52:     0x7ff878904c78 - <rustc_middle[44f03dff55d08e24]::ty::SymbolName as core[4699d6319c9d7119]::fmt::Debug>::fmt
  53:     0x7ff8789021c4 - rustc_driver_impl[ac46132e4667b0e2]::main
  54:     0x7ff878918fc0 - <rustc_middle[44f03dff55d08e24]::ty::SymbolName as core[4699d6319c9d7119]::fmt::Debug>::fmt
  55:     0x7ff878918036 - <rustc_middle[44f03dff55d08e24]::ty::SymbolName as core[4699d6319c9d7119]::fmt::Debug>::fmt
  56:     0x7ff8a8fad49c - std::sys::windows::thread::Thread::new::hbaf0a34f84f60208
  57:     0x7ff93b5d7614 - BaseThreadInitThunk
  58:     0x7ff93cc426a1 - RtlUserThreadStart

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.72.0-nightly (6bba06146 2023-06-16) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type lib -C embed-bitcode=no -C linker=rust-lld -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 `salsa::lru::Lru<salsa::derived::slot::Slot<hir_ty::db::ConstEvalQuery, salsa::derived::AlwaysMemoizeValue>>: core::marker::Sync`
#1 [check_well_formed] checking that `<impl at crates\ide-db\src\lib.rs:321:1: 321:46>` is well-formed
#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 TraitSelect(f835a2aed7114745-aace19837e26cf42)
#1 TraitSelect(491d02ec380d3087-e9c70e9c1d1a00ee)
#2 TraitSelect(323b91217aaa90a6-ee312bbaf6c1caf9)
#3 TraitSelect(634282def7bbd07a-25cfa6d0f34459b6)
#4 TraitSelect(6d32dd3aa7a37cae-9028cfcd55eceeb3)
#5 TraitSelect(79c5ec62d5e66c17-5be7ab434b91b14a)
#6 TraitSelect(a9d3bc2a591d136b-f36a3a70699af9e)
#7 TraitSelect(3d1ac002bb6cec79-d4bedef34ab24c94)
#8 TraitSelect(948f79e96f020801-5634941188d65325)
#9 TraitSelect(1e5d135a1d0014d6-ea30bc6e1aec9b09)
#10 evaluate_obligation(18e045f8b6d00112-eb771c5ba229e257)
end of try_mark_green dep node stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 check_mod_type_wf(ide_db[4988])
end of try_mark_green dep node stack

to reproduce:

cargo clean
git checkout 68bdf609f37a74547d9fbdf28ed22c10f9bcca45
cargo +nightly b -p ide-db
git checkout a4695788caa4370136d3df38f9f20d0bb12060fa
cargo +nightly b -p ide-db
added
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
on Jul 4, 2023
Aedius

Aedius commented on Oct 14, 2023

@Aedius

i got the same issue, same row and similar backtrace on Rust beta :

rustc 1.74.0-beta.1 (b5c050feb 2023-10-03)
binary: rustc
commit-hash: b5c050febf10c9bcc0459d41fe2a1e190ad30b8d
commit-date: 2023-10-03
host: x86_64-pc-windows-msvc
release: 1.74.0-beta.1
LLVM version: 17.0.2

a cargo clean also fix the issue

davepacheco

davepacheco commented on Oct 16, 2023

@davepacheco

I saw this too:

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:22:85
stack backtrace:
   0: 0xfffffc7fecea15a4 - std::backtrace_rs::backtrace::libunwind::trace::ha20bdf7275ee7b0d
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1: 0xfffffc7fecea15a4 - std::backtrace_rs::backtrace::trace_unsynchronized::h2e9cadc5a81fff50
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2: 0xfffffc7fecea15a4 - std::sys_common::backtrace::_print_fmt::h238edd5606f894f5
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/sys_common/backtrace.rs:65:5
   3: 0xfffffc7fecea15a4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h50f0e1b004533f21
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/sys_common/backtrace.rs:44:22
...
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.72.1 (d5c2e9c34 2023-09-13) running on x86_64-unknown-illumos

note: compiler flags: --crate-type bin -C panic=abort -C embed-bitcode=no -C debuginfo=line-tables-only -C incremental=[REDACTED] -C link-arg=-Wl,-znocompstrtab -C link-arg=-Wl,-R/opt/ooce/pgsql-13/lib/amd64

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `diesel::query_builder::select_clause::DefaultSelectClause<diesel::query_builder::from_clause::FromClause<nexus_db_model::schema::inv_collection::table>>: core::marker::Sized`
#1 [typeck] type-checking `db::cmd_db_inventory_collections_list`
#2 [type_of] computing type of `db::cmd_db_inventory_collections_list::{opaque#0}`
#3 [check_mod_item_types] checking item types in module `db`
#4 [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 adt_sized_constraint(thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:22:85
...
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: {OpaqueTypeKey { def_id: DefId(0:1735 ~ omdb[b5e6]::db::cmd_db_inventory_collections_list::{opaque#0}), substs: [ReFree(DefId(0:169 ~ omdb[b5e6]::db::cmd_db_inventory_collections_list), BrNamed(DefId(0:1733 ~ omdb[b5e6]::db::cmd_db_inventory_collections_list::'_), '_)), ReFree(DefId(0:169 ~ omdb[b5e6]::db::cmd_db_inventory_collections_list), BrNamed(DefId(0:1734 ~ omdb[b5e6]::db::cmd_db_inventory_collections_list::'_#1), '_))] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: dev-tools/omdb/src/bin/omdb/db.rs:1486:6: 1486:31 (#2788), ty: _ } }}
  |
...

This is reproducible in my current state with cargo check --all-targets. I've saved the full output and a ZFS snapshot of the current filesystem, which includes the source and target directories. If any of this is useful, let me know how to make it available. (It's about 80 GiB though.)

changed the title [-]Compiler error[/-] [+]ICE: called `Option::unwrap()` on a `None` value' at def_path_hash_map.rs:23:85[/+] on Feb 11, 2024
changed the title [-]ICE: called `Option::unwrap()` on a `None` value' at def_path_hash_map.rs:23:85[/-] [+]ICE: called `Option::unwrap()` on a `None` value at def_path_hash_map.rs:23:85[/+] on Feb 11, 2024
DropDemBits

DropDemBits commented on Mar 11, 2024

@DropDemBits
Contributor

Reproduces on the latest nightly (2024-03-10).

With the following starting code:

pub enum GeneralConstId {
    AnonymousConstId(u32),
}

pub struct HirDatabaseGroupStorage__ where Self: Send {
    _key: <ConstEvalQuery as Query>::Key,
    _value: Slot<ConstEvalQuery>,
}

pub trait Query {
    type Key;
    type Value;
}

pub struct ConstEvalQuery;

impl Query for ConstEvalQuery {
    type Key = GeneralConstId;
    type Value = &'static str;
}

pub struct Slot<Q: Query> {
    _key: Q::Key,
    _state: Q::Value,
}

And the following change:

 pub enum GeneralConstId {
-    AnonymousConstId(u32),
+    ConstBlockId(u32),
 }

Current error & backtrace:
rustc-ice-2024-03-11T22_11_34-11668.txt

DropDemBits

DropDemBits commented on Mar 12, 2024

@DropDemBits
Contributor

bisected with cargo-bisect-rustc v0.6.8

searched nightlies: nightly-2021-09-09 through nightly-2022-08-05
regressed nightly: nightly-2021-09-19
regressed commit range: 9dd4ce...aa8f2d
commit list:

  commit[0] 2021-09-17: Auto merge of #88956 - ehuss:update-cargo, r=ehuss
  commit[1] 2021-09-17: Auto merge of #88962 - fee1-dead:const-drop, r=oli-obk
  commit[2] 2021-09-18: Auto merge of #88965 - fee1-dead:const-drop-1, r=oli-obk
  commit[3] 2021-09-18: Auto merge of #88978 - bjorn3:move_symbol_interner_lock, r=Mark-Simulacrum
  commit[4] 2021-09-18: Auto merge of #88980 - tmiasko:instrument-debug, r=oli-obk
  commit[5] 2021-09-18: Auto merge of #88988 - Mark-Simulacrum:avoid-into-ok, r=nagisa
  commit[6] 2021-09-18: Auto merge of #88650 - sapessi:issue-77175-fix, r=estebank
  commit[7] 2021-09-18: Auto merge of #82183 - michaelwoerister:lazier-defpathhash-loading2, r=wesleywiser
  commit[8] 2021-09-18: Auto merge of #88994 - Aaron1011:intercrate-caching, r=jackh726
  commit[9] 2021-09-18: Auto merge of #89000 - Mark-Simulacrum:no-new-lrc, r=petrochenkov

#82183 is likely where it regressed since it deals with DefPathHashs.

EDIT: Thinking about it, that might just be where the issue was exposed since it shouldn't be touching that
DepNode in the first place.

pacak

pacak commented on Jun 10, 2024

@pacak
Contributor
    /// Extracts the DefId corresponding to this DepNode. This will work                                                                                                                                                                       
    /// if two conditions are met:                                                                                                                                                                                                             
    ///                                                                                                                                                                                                                                        
    /// 1. The Fingerprint of the DepNode actually is a DefPathHash, and                                                                                                                                                                       
    /// 2. the item that the DefPath refers to exists in the current tcx.                                                                                                                                                                      
    ///                                                                                                                                                                                                                                        
    /// Condition (1) is determined by the DepKind variant of the                                                                                                                                                                              
    /// DepNode. Condition (2) might not be fulfilled if a DepNode                                                                                                                                                                             
    /// refers to something from the previous compilation session that                                                                                                                                                                         
    /// has been removed.                                                                                                                                                                                                                      
    fn extract_def_id(&self, tcx: TyCtxt<'_>) -> Option<DefId> {                                                                                                                                                                               
        if tcx.fingerprint_style(self.kind) == FingerprintStyle::DefPathHash {                                                                                                                                                                 
            Some(tcx.def_path_hash_to_def_id(                                                                                                                                                                                                  
                DefPathHash(self.hash.into()),                                                                                                                                                                                                 
                &("Failed to extract DefId", self.kind, self.hash),                                                                                                                                                                            
            ))                                                                                                                                                                                                                                 
        } else {                                                                                                                                                                                                                               
            None                                                                                                                                                                                                                               
        }                                                                                                                                                                                                                                      
    }                                                                                                                                                                                                                                          

I have some code that panics around this area and I think that it is caused by #82183 as well. Comment suggest (2) that situation where DepNode refers to something removed is possible and previously it would return None, but after 2b60338 this mapping fails with panic.

pacak

pacak commented on Jun 10, 2024

@pacak
Contributor
pub trait P {
    type A;
}

struct S;

impl P for S {
    type A = C;
}

struct T<D: P>(D::A, Z<D>);

struct Z<D: P>(D::A, String);

impl<D: P> T<D> {
    pub fn i() -> Self {
        loop {}
    }
}

enum C {
    E(()),
}

pub fn m() {
    T::<S>::i();
}

compile, rename C::E to C::E1, compile to get the panic.

added a commit that references this issue on Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationI-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

      Participants

      @pacak@yatesco@sourcefrog@davepacheco@Aedius

      Issue actions

        ICE: called `Option::unwrap()` on a `None` value at def_path_hash_map.rs:23:85 · Issue #107226 · rust-lang/rust