Skip to content

rustc panicked at Failed to extract DefId #96320

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

Open
Sytten opened this issue Apr 22, 2022 · 5 comments
Open

rustc panicked at Failed to extract DefId #96320

Sytten opened this issue Apr 22, 2022 · 5 comments
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

@Sytten
Copy link

Sytten commented Apr 22, 2022

Code

The code is not open source and I am not exactly sure what caused it.
I might be able to create a minimal repro on demand, please reach out.

Meta

rustc 1.60.0 (7737e0b5c 2022-04-04)
binary: rustc
commit-hash: 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c
commit-date: 2022-04-04
host: x86_64-unknown-linux-gnu
release: 1.60.0
LLVM version: 14.0.0

Error output

error: internal compiler error: unexpected panic
query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `for<'r> {core::future::ResumeTy, repositories::response::find_by_request_id::FindByRequestId, actix::address::Addr<repositories::response::ResponseRepository>, &'r actix::address::Addr<repositories::response::ResponseRepository>, actix::address::message::MsgRequest<actix::address::channel::AddressSender<repositories::response::ResponseRepository>, repositories::response::find_by_request_id::FindByRequestId>, ()}: core::marker::Send`
#1 [codegen_fulfill_obligation] checking if `core::ops::unsize::CoerceUnsized` fulfills its obligations
#2 [collect_and_partition_mono_items] collect_and_partition_mono_items
#3 [exported_symbols] exported_symbols
end of query stack
Backtrace

thread 'rustc' panicked at 'Failed to extract DefId: local_def_id_to_hir_id aaae3b8e64d12f85-2976726fb4cbf116', compiler/rustc_middle/src/dep_graph/dep_node.rs:270:17
stack backtrace:
   0:     0x7fb8e01d686d - std::backtrace_rs::backtrace::libunwind::trace::hee598835bc88d35b
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fb8e01d686d - std::backtrace_rs::backtrace::trace_unsynchronized::h9cdc730ba5cf5d72
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fb8e01d686d - std::sys_common::backtrace::_print_fmt::h75aeaf7ed30e43fa
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7fb8e01d686d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h606862f787600875
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7fb8e02364ec - core::fmt::write::he803f0f418caf762
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/fmt/mod.rs:1190:17
   5:     0x7fb8e01c6a98 - std::io::Write::write_fmt::h70bc45872f37e7bb
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/io/mod.rs:1657:15
   6:     0x7fb8e01da847 - std::sys_common::backtrace::_print::h64d038cf8ac3e13e
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7fb8e01da847 - std::sys_common::backtrace::print::h359300b4a7fccf65
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7fb8e01da847 - std::panicking::default_hook::{{closure}}::hf51be35e2f510149
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:295:22
   9:     0x7fb8e01da510 - std::panicking::default_hook::h03ca0f22e1d2d25e
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:314:9
  10:     0x7fb8e09662c1 - rustc_driver[6eeb127b85fe99ac]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7fb8b0429d23 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::ha1e015ddffb20cab
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/boxed.rs:1867:9
  12:     0x7fb8b0428b5c - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::h46c39034f6955489
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/proc_macro/src/bridge/client.rs:319:21
  13:     0x7fb8b04326e0 - std::panicking::update_hook::{{closure}}::hade3f5084bbe4efd
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:258:41
  14:     0x7fb8e01db124 - std::panicking::rust_panic_with_hook::h3b7380e99b825b63
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:702:17
  15:     0x7fb8e01dadd7 - std::panicking::begin_panic_handler::{{closure}}::h8e849d0710154ce0
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13
  16:     0x7fb8e01d6d34 - std::sys_common::backtrace::__rust_end_short_backtrace::hedcdaddbd4c46cc5
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18
  17:     0x7fb8e01daae9 - rust_begin_unwind
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
  18:     0x7fb8e01a3863 - core::panicking::panic_fmt::he1bbc7336d49a357
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
  19:     0x7fb8e1942b01 - <rustc_query_system[cf3d2502706fe991]::dep_graph::dep_node::DepNode<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind> as rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepNodeExt>::extract_def_id::{closure#0}
  20:     0x7fb8e26c2669 - <rustc_query_system[cf3d2502706fe991]::dep_graph::dep_node::DepNode<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind> as rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepNodeExt>::extract_def_id
  21:     0x7fb8e2ce8e1c - rustc_query_impl[8218de0923c6cd45]::query_callbacks::local_def_id_to_hir_id::force_from_dep_node
  22:     0x7fb8e2ff8841 - <rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt as rustc_query_system[cf3d2502706fe991]::dep_graph::DepContext>::try_force_from_dep_node
  23:     0x7fb8e22c0263 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  24:     0x7fb8e22bfa09 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  25:     0x7fb8e22bfa09 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  26:     0x7fb8e22bfa09 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  27:     0x7fb8e22bfa09 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  28:     0x7fb8e22bfa09 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  29:     0x7fb8e22bfa09 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  30:     0x7fb8e22bfa09 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  31:     0x7fb8e22bfa09 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  32:     0x7fb8e22bfa09 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  33:     0x7fb8e22bfa09 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  34:     0x7fb8e22bfa09 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  35:     0x7fb8e230a1f5 - rustc_data_structures[762b64c8eff0c924]::stack::ensure_sufficient_stack::<core[2734bb1f7d9ec6a5]::option::Option<(core[2734bb1f7d9ec6a5]::result::Result<rustc_middle[c145adf1c4567bf]::traits::select::EvaluationResult, rustc_middle[c145adf1c4567bf]::traits::select::OverflowError>, rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepNodeIndex)>, rustc_query_system[cf3d2502706fe991]::query::plumbing::execute_job<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_middle[c145adf1c4567bf]::infer::canonical::Canonical<rustc_middle[c145adf1c4567bf]::ty::ParamEnvAnd<rustc_middle[c145adf1c4567bf]::ty::Predicate>>, core[2734bb1f7d9ec6a5]::result::Result<rustc_middle[c145adf1c4567bf]::traits::select::EvaluationResult, rustc_middle[c145adf1c4567bf]::traits::select::OverflowError>>::{closure#2}>
  36:     0x7fb8e2251e95 - rustc_query_system[cf3d2502706fe991]::query::plumbing::get_query::<rustc_query_impl[8218de0923c6cd45]::queries::evaluate_obligation, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
  37:     0x7fb8e2285c94 - <rustc_query_impl[8218de0923c6cd45]::Queries as rustc_middle[c145adf1c4567bf]::ty::query::QueryEngine>::evaluate_obligation
  38:     0x7fb8e256a6cd - <rustc_trait_selection[1d7483382b445f9]::traits::fulfill::FulfillProcessor>::progress_changed_obligations
  39:     0x7fb8e2586d86 - <rustc_data_structures[762b64c8eff0c924]::obligation_forest::ObligationForest<rustc_trait_selection[1d7483382b445f9]::traits::fulfill::PendingPredicateObligation>>::process_obligations::<rustc_trait_selection[1d7483382b445f9]::traits::fulfill::FulfillProcessor, rustc_data_structures[762b64c8eff0c924]::obligation_forest::Outcome<rustc_trait_selection[1d7483382b445f9]::traits::fulfill::PendingPredicateObligation, rustc_infer[844122ed1ec4b57a]::traits::FulfillmentErrorCode>>
  40:     0x7fb8e256874f - <rustc_trait_selection[1d7483382b445f9]::traits::fulfill::FulfillmentContext as rustc_infer[844122ed1ec4b57a]::traits::engine::TraitEngine>::select_all_or_error
  41:     0x7fb8e250b5c4 - <rustc_infer[844122ed1ec4b57a]::infer::InferCtxtBuilder>::enter::<core[2734bb1f7d9ec6a5]::result::Result<&rustc_middle[c145adf1c4567bf]::traits::ImplSource<()>, rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_trait_selection[1d7483382b445f9]::traits::codegen::codegen_fulfill_obligation::{closure#0}>
  42:     0x7fb8e259ac4a - rustc_trait_selection[1d7483382b445f9]::traits::codegen::codegen_fulfill_obligation
  43:     0x7fb8e2d3df84 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, (rustc_middle[c145adf1c4567bf]::ty::ParamEnv, rustc_middle[c145adf1c4567bf]::ty::sty::Binder<rustc_middle[c145adf1c4567bf]::ty::sty::TraitRef>), core[2734bb1f7d9ec6a5]::result::Result<&rustc_middle[c145adf1c4567bf]::traits::ImplSource<()>, rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
  44:     0x7fb8e2d920dd - rustc_data_structures[762b64c8eff0c924]::stack::ensure_sufficient_stack::<(core[2734bb1f7d9ec6a5]::result::Result<&rustc_middle[c145adf1c4567bf]::traits::ImplSource<()>, rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepNodeIndex), rustc_query_system[cf3d2502706fe991]::query::plumbing::execute_job<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, (rustc_middle[c145adf1c4567bf]::ty::ParamEnv, rustc_middle[c145adf1c4567bf]::ty::sty::Binder<rustc_middle[c145adf1c4567bf]::ty::sty::TraitRef>), core[2734bb1f7d9ec6a5]::result::Result<&rustc_middle[c145adf1c4567bf]::traits::ImplSource<()>, rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#3}>
  45:     0x7fb8e2238161 - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_execute_query::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::query::caches::DefaultCache<(rustc_middle[c145adf1c4567bf]::ty::ParamEnv, rustc_middle[c145adf1c4567bf]::ty::sty::Binder<rustc_middle[c145adf1c4567bf]::ty::sty::TraitRef>), core[2734bb1f7d9ec6a5]::result::Result<&rustc_middle[c145adf1c4567bf]::traits::ImplSource<()>, rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>>
  46:     0x7fb8e22831a7 - <rustc_query_impl[8218de0923c6cd45]::Queries as rustc_middle[c145adf1c4567bf]::ty::query::QueryEngine>::codegen_fulfill_obligation
  47:     0x7fb8e296b3c5 - rustc_monomorphize[efe58eb653827d34]::custom_coerce_unsize_info
  48:     0x7fb8e2969556 - rustc_monomorphize[efe58eb653827d34]::collector::find_vtable_types_for_unsizing
  49:     0x7fb8e1c4641a - rustc_monomorphize[efe58eb653827d34]::collector::collect_neighbours
  50:     0x7fb8e1c40bf9 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  51:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  52:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  53:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  54:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  55:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  56:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  57:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  58:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  59:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  60:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  61:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  62:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  63:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  64:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  65:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  66:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  67:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  68:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  69:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  70:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  71:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  72:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  73:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  74:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  75:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  76:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  77:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  78:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  79:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  80:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  81:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  82:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  83:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  84:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  85:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  86:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  87:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  88:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  89:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  90:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  91:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  92:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  93:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  94:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  95:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  96:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  97:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  98:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
  99:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 100:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 101:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 102:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 103:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 104:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 105:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 106:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 107:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 108:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 109:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 110:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 111:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 112:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 113:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 114:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 115:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 116:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 117:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 118:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 119:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 120:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 121:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 122:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 123:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 124:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 125:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 126:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 127:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 128:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 129:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 130:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 131:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 132:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 133:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 134:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 135:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 136:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 137:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 138:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 139:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 140:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 141:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 142:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 143:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 144:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 145:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 146:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 147:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 148:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 149:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 150:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 151:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 152:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 153:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 154:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 155:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 156:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 157:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 158:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 159:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 160:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 161:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 162:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 163:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 164:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 165:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 166:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 167:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 168:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 169:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 170:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 171:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 172:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 173:     0x7fb8e1c40d26 - rustc_monomorphize[efe58eb653827d34]::collector::collect_items_rec
 174:     0x7fb8e29784ba - <rustc_session[95a8f1c94d15e5dc]::session::Session>::time::<(), rustc_monomorphize[efe58eb653827d34]::collector::collect_crate_mono_items::{closure#1}>
 175:     0x7fb8e2967e18 - rustc_monomorphize[efe58eb653827d34]::collector::collect_crate_mono_items
 176:     0x7fb8e296ef36 - rustc_monomorphize[efe58eb653827d34]::partitioning::collect_and_partition_mono_items
 177:     0x7fb8e138e6d8 - <rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind as rustc_query_system[cf3d2502706fe991]::dep_graph::DepKind>::with_deps::<<rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, (), (&std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::DefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, &[rustc_middle[c145adf1c4567bf]::mir::mono::CodegenUnit])>::{closure#0}, (&std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::DefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, &[rustc_middle[c145adf1c4567bf]::mir::mono::CodegenUnit])>
 178:     0x7fb8e12e15d3 - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, (), (&std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::DefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, &[rustc_middle[c145adf1c4567bf]::mir::mono::CodegenUnit])>
 179:     0x7fb8e13e848d - rustc_data_structures[762b64c8eff0c924]::stack::ensure_sufficient_stack::<((&std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::DefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, &[rustc_middle[c145adf1c4567bf]::mir::mono::CodegenUnit]), rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepNodeIndex), rustc_query_system[cf3d2502706fe991]::query::plumbing::execute_job<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, (), (&std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::DefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, &[rustc_middle[c145adf1c4567bf]::mir::mono::CodegenUnit])>::{closure#3}>
 180:     0x7fb8e2c8b5f7 - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_execute_query::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::query::caches::DefaultCache<(), (&std[cd3cf6af28dff6de]::collections::hash::set::HashSet<rustc_span[4b4bb4534443c42f]::def_id::DefId, core[2734bb1f7d9ec6a5]::hash::BuildHasherDefault<rustc_hash[c8b663e5236d6ce6]::FxHasher>>, &[rustc_middle[c145adf1c4567bf]::mir::mono::CodegenUnit])>>
 181:     0x7fb8e2cbeec0 - rustc_query_system[cf3d2502706fe991]::query::plumbing::get_query::<rustc_query_impl[8218de0923c6cd45]::queries::collect_and_partition_mono_items, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
 182:     0x7fb8e2cd400e - <rustc_query_impl[8218de0923c6cd45]::Queries as rustc_middle[c145adf1c4567bf]::ty::query::QueryEngine>::collect_and_partition_mono_items
 183:     0x7fb8e231c624 - rustc_codegen_ssa[a63da6adbf764609]::back::symbol_export::exported_symbols_provider_local
 184:     0x7fb8e2d3ba2b - <rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepGraph<rustc_middle[c145adf1c4567bf]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[c145adf1c4567bf]::ty::context::TyCtxt, rustc_span[4b4bb4534443c42f]::def_id::CrateNum, &[(rustc_middle[c145adf1c4567bf]::middle::exported_symbols::ExportedSymbol, rustc_middle[c145adf1c4567bf]::middle::exported_symbols::SymbolExportLevel)]>
 185:     0x7fb8e2d993ab - rustc_data_structures[762b64c8eff0c924]::stack::ensure_sufficient_stack::<(&[(rustc_middle[c145adf1c4567bf]::middle::exported_symbols::ExportedSymbol, rustc_middle[c145adf1c4567bf]::middle::exported_symbols::SymbolExportLevel)], rustc_query_system[cf3d2502706fe991]::dep_graph::graph::DepNodeIndex), rustc_query_system[cf3d2502706fe991]::query::plumbing::execute_job<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_span[4b4bb4534443c42f]::def_id::CrateNum, &[(rustc_middle[c145adf1c4567bf]::middle::exported_symbols::ExportedSymbol, rustc_middle[c145adf1c4567bf]::middle::exported_symbols::SymbolExportLevel)]>::{closure#3}>
 186:     0x7fb8e2c7679c - rustc_query_system[cf3d2502706fe991]::query::plumbing::try_execute_query::<rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt, rustc_query_system[cf3d2502706fe991]::query::caches::DefaultCache<rustc_span[4b4bb4534443c42f]::def_id::CrateNum, &[(rustc_middle[c145adf1c4567bf]::middle::exported_symbols::ExportedSymbol, rustc_middle[c145adf1c4567bf]::middle::exported_symbols::SymbolExportLevel)]>>
 187:     0x7fb8e2cb0f03 - rustc_query_system[cf3d2502706fe991]::query::plumbing::get_query::<rustc_query_impl[8218de0923c6cd45]::queries::exported_symbols, rustc_query_impl[8218de0923c6cd45]::plumbing::QueryCtxt>
 188:     0x7fb8e233bcc7 - <rustc_metadata[12fb5a340a247fff]::rmeta::encoder::EncodeContext>::encode_crate_root
 189:     0x7fb8e2e1a71f - rustc_metadata[12fb5a340a247fff]::rmeta::encoder::encode_metadata_impl
 190:     0x7fb8e2e33031 - rustc_data_structures[762b64c8eff0c924]::sync::join::<rustc_metadata[12fb5a340a247fff]::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata[12fb5a340a247fff]::rmeta::encoder::encode_metadata::{closure#1}, rustc_metadata[12fb5a340a247fff]::rmeta::encoder::EncodedMetadata, ()>
 191:     0x7fb8e2e19fb6 - rustc_metadata[12fb5a340a247fff]::rmeta::encoder::encode_metadata
 192:     0x7fb8e27e792d - <rustc_interface[afc566840a941718]::passes::QueryContext>::enter::<<rustc_interface[afc566840a941718]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<alloc[9a009599db7253ec]::boxed::Box<dyn core[2734bb1f7d9ec6a5]::any::Any>, rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
 193:     0x7fb8e27de02f - <rustc_interface[afc566840a941718]::queries::Queries>::ongoing_codegen
 194:     0x7fb8e27b5b04 - rustc_interface[afc566840a941718]::interface::create_compiler_and_run::<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>
 195:     0x7fb8e279b134 - std[cd3cf6af28dff6de]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[afc566840a941718]::util::run_in_thread_pool_with_globals<rustc_interface[afc566840a941718]::interface::run_compiler<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>
 196:     0x7fb8e27ce3e9 - <<std[cd3cf6af28dff6de]::thread::Builder>::spawn_unchecked_<rustc_interface[afc566840a941718]::util::run_in_thread_pool_with_globals<rustc_interface[afc566840a941718]::interface::run_compiler<core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>, rustc_driver[6eeb127b85fe99ac]::run_compiler::{closure#1}>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#0}, core[2734bb1f7d9ec6a5]::result::Result<(), rustc_errors[bd800fb2a5e0b9f5]::ErrorReported>>::{closure#1} as core[2734bb1f7d9ec6a5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
 197:     0x7fb8e01e6d03 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf70ac038171e3e1a
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/boxed.rs:1853:9
 198:     0x7fb8e01e6d03 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he6690128792365ad
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/alloc/src/boxed.rs:1853:9
 199:     0x7fb8e01e6d03 - std::sys::unix::thread::Thread::new::thread_start::ha07928d93d5a5ec9
                               at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys/unix/thread.rs:108:17
 200:     0x7fb8e0117609 - start_thread
 201:     0x7fb8e0031103 - clone
 202:                0x0 - <unknown>

@Sytten Sytten 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 Apr 22, 2022
@imlazyeye
Copy link

looks potentially related to what I submitted a moment ago for #96319 -- perhaps see if the reproduction steps I listed there seem relevant to you?

@matthiaskrgr matthiaskrgr added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Apr 24, 2022
@shamil-gadelshin
Copy link

I have a similar error:

    Checking subspace-farmer v0.3.0 (/Users/shamix/work/subspace/subspace/crates/subspace-farmer)
thread 'rustc' panicked at 'Failed to extract DefId: local_def_id_to_hir_id 5db45c0f22591dae-8961b01b3696dd2c', compiler/rustc_middle/src/dep_graph/dep_node.rs:276:17
stack backtrace:
   0:        0x103c2427c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd11c99e1712a3b93
   1:        0x103c707b0 - core::fmt::write::h4ab72be77d234a5f
   2:        0x103c1712c - std::io::Write::write_fmt::h7a395bc03edd57f7
   3:        0x103c26cfc - std::panicking::default_hook::{{closure}}::h47fd33997e6d194f
   4:        0x103c26a20 - std::panicking::default_hook::h1a91dfc69873868c
   5:        0x10b2056c8 - rustc_driver[f48df164c0df47ae]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x103c273c0 - std::panicking::rust_panic_with_hook::he4e418194a15755b
   7:        0x103c27268 - std::panicking::begin_panic_handler::{{closure}}::h3a0dcdc46b3616f8
   8:        0x103c24780 - std::sys_common::backtrace::__rust_end_short_backtrace::h309ea9be0e151aac
   9:        0x103c26fc0 - _rust_begin_unwind
  10:        0x103c9b940 - core::panicking::panic_fmt::hb22eaf3078a294e9
  11:        0x10ec84360 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::dep_node::DepNode<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind> as rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepNodeExt>::extract_def_id::{closure#0}
  12:        0x10ed41b44 - <rustc_middle[7525aa5c060ae11c]::ty::context::TyCtxt>::def_path_hash_to_def_id
  13:        0x10ec842d4 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::dep_node::DepNode<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind> as rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepNodeExt>::extract_def_id
  14:        0x10e34e3f8 - rustc_query_impl[bfdc63cc2bf5d01a]::query_callbacks::local_def_id_to_hir_id::force_from_dep_node
  15:        0x10ed2dde0 - <rustc_middle[7525aa5c060ae11c]::ty::context::TyCtxt as rustc_query_system[87b6dd34bffcfee9]::dep_graph::DepContext>::try_force_from_dep_node
  16:        0x10e240a98 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  17:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  18:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  19:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  20:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  21:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  22:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  23:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  24:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  25:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  26:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  27:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  28:        0x10e240a68 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  29:        0x10e21000c - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::try_mark_green::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  30:        0x10dfc797c - rustc_query_system[87b6dd34bffcfee9]::query::plumbing::ensure_must_run::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt, rustc_span[36d49193b7150beb]::def_id::LocalDefId, rustc_span[36d49193b7150beb]::def_id::LocalDefId>
  31:        0x10e0ab6d0 - rustc_query_system[87b6dd34bffcfee9]::query::plumbing::get_query::<rustc_query_impl[bfdc63cc2bf5d01a]::queries::check_mod_item_types, rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  32:        0x10d800644 - <rustc_middle[7525aa5c060ae11c]::hir::map::Map>::for_each_module::<rustc_typeck[e07573f7d98ec6f6]::check_crate::{closure#6}::{closure#0}>
  33:        0x10d7481d4 - <rustc_session[433617d2846ed95c]::session::Session>::time::<(), rustc_typeck[e07573f7d98ec6f6]::check_crate::{closure#6}>
  34:        0x10d835a04 - rustc_typeck[e07573f7d98ec6f6]::check_crate
  35:        0x10b287c44 - rustc_interface[1dba0817ea3889b6]::passes::analysis
  36:        0x10e276ad4 - <rustc_query_system[87b6dd34bffcfee9]::dep_graph::graph::DepGraph<rustc_middle[7525aa5c060ae11c]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[7525aa5c060ae11c]::ty::context::TyCtxt, (), core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>>
  37:        0x10e03e52c - rustc_query_system[87b6dd34bffcfee9]::query::plumbing::try_execute_query::<rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt, rustc_query_system[87b6dd34bffcfee9]::query::caches::DefaultCache<(), core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>>>
  38:        0x10e0d7994 - rustc_query_system[87b6dd34bffcfee9]::query::plumbing::get_query::<rustc_query_impl[bfdc63cc2bf5d01a]::queries::analysis, rustc_query_impl[bfdc63cc2bf5d01a]::plumbing::QueryCtxt>
  39:        0x10b1934d4 - <rustc_interface[1dba0817ea3889b6]::passes::QueryContext>::enter::<rustc_driver[f48df164c0df47ae]::run_compiler::{closure#1}::{closure#2}::{closure#3}, core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>>
  40:        0x10b192940 - <rustc_interface[1dba0817ea3889b6]::interface::Compiler>::enter::<rustc_driver[f48df164c0df47ae]::run_compiler::{closure#1}::{closure#2}, core[8ab628c3bfd0892e]::result::Result<core[8ab628c3bfd0892e]::option::Option<rustc_interface[1dba0817ea3889b6]::queries::Linker>, rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>>
  41:        0x10b189dbc - rustc_span[36d49193b7150beb]::with_source_map::<core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>, rustc_interface[1dba0817ea3889b6]::interface::create_compiler_and_run<core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>, rustc_driver[f48df164c0df47ae]::run_compiler::{closure#1}>::{closure#1}>
  42:        0x10b193b80 - rustc_interface[1dba0817ea3889b6]::interface::create_compiler_and_run::<core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>, rustc_driver[f48df164c0df47ae]::run_compiler::{closure#1}>
  43:        0x10b1872e0 - <scoped_tls[cbb3081050cb5959]::ScopedKey<rustc_span[36d49193b7150beb]::SessionGlobals>>::set::<rustc_interface[1dba0817ea3889b6]::interface::run_compiler<core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>, rustc_driver[f48df164c0df47ae]::run_compiler::{closure#1}>::{closure#0}, core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>>
  44:        0x10b18fabc - std[f452f9d828515d4d]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1dba0817ea3889b6]::util::run_in_thread_pool_with_globals<rustc_interface[1dba0817ea3889b6]::interface::run_compiler<core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>, rustc_driver[f48df164c0df47ae]::run_compiler::{closure#1}>::{closure#0}, core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>>::{closure#0}, core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>>
  45:        0x10b1c1904 - <<std[f452f9d828515d4d]::thread::Builder>::spawn_unchecked_<rustc_interface[1dba0817ea3889b6]::util::run_in_thread_pool_with_globals<rustc_interface[1dba0817ea3889b6]::interface::run_compiler<core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>, rustc_driver[f48df164c0df47ae]::run_compiler::{closure#1}>::{closure#0}, core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>>::{closure#0}, core[8ab628c3bfd0892e]::result::Result<(), rustc_errors[cf85e573247dc9ea]::ErrorGuaranteed>>::{closure#1} as core[8ab628c3bfd0892e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  46:        0x103c2f498 - std::sys::unix::thread::Thread::new::thread_start::ha9077d1e0aa52ee5
  47:        0x1ac95a26c - __pthread_deallocate

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-nightly (06754d885 2022-07-08) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -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 [analysis] running analysis passes on this crate
end of query stack

@fogti
Copy link
Contributor

fogti commented Jul 20, 2022

I also encountered this: YZITE/yzix@78311e1

@lqd
Copy link
Member

lqd commented Jul 20, 2022

Thanks for the repro @zseri. There have been a few new cases of this ICE in the last week, and they have been fixed since.

Your specific issue (which is different from the OP) is indeed already fixed on the latest nightly (but is present on nightly-2022-07-16).

@bmulder-innoseis
Copy link

I'm having the same issue.
I think it might be related to doing funky things using the async_trait crate.
In my case, I have some async_trait Trait with generics, as such need those generics to be Send/Sync, and then use the trait in a Box<dyn Trait + Send>.

My code looks something like this
#[async_trait]
trait RequestHandler {
    async fn start(&mut self, ...);
    ...
}

trait Request: Sized {
    type ReplyType: Reply
    type Handler: From<Message<Self> + RequestHandler;
    fn foo(&mut self);
}

trait Reply  { ... }

struct Message<T: Request> {
    pub request: Arc<T>,
    pub replier: tokio::sync::mpsc::Sender<Result<T::ReplyType, Status>>,
}

struct MyHandler<T: Request> {
    message: Message<T>,
}

impl<T: Request + Send + Sync> From<Message<T>> for MyHandler<T> {
    fn from(msg: Message<T>) -> Self { Self { message: msg } }
}

#[async_trait]
impl <T> RequestHandler for MyHandler<T>
    where T: Request + Send + Sync,
          <T as Request>::ReplyType: Send
{
    async fn start(&mut self, ...) {...}
}

struct Inner {
    current_task: Option<Box<dyn RequestHandler + Send>>
}

impl Inner {
    async fn handle_message<T: Request>(&mut self, msg: &Message<T>) {
       if let Some(_) = &self.current_task {
            msg.replier.send(Err(Status::Busy)).await; return;
       }

        let task = Box::new(T::Handler::from(msg.clone()));
        task.start(...).await;
        self.current_task = Some(task);
    }
}

now this panics with:

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `Message<SomeRequest>: core::marker::Send`
#1 [codegen_select_candidate] computing candidate for `<core::pin::Pin<alloc::boxed::Box<core::future::from_generator::GenFuture<[static generator@src/main.rs:...]>>> as core::ops::unsize::CoerceUnsized<core::pin::Pin<alloc::boxed::Box<dyn core::future::future::Future<Output = core::result::Result<tonic::response::Response<tokio_stream::wrappers::mpsc_bounded::ReceiverStream<core::result::Result<SomeReply, tonic::status::Status>>>, tonic::status::Status>> + core::marker::Send>>>>`
#2 [collect_and_partition_mono_items] collect_and_partition_mono_items
#3 [exported_symbols] exported_symbols

the messages come from tonic for anyone interested. Roughly it is a grpc server that can handle a list of requests and reply to them later using server-side gRPC streaming. Instances of Inner are protected using Arc, but they still require to be Send.

But now I'm guessing it tries to find out if the saved Message inside MyHandler inside Inner is actually Send, as that message contains a channel Sender, as well as some other stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

7 participants