Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpaqueTypeKey ICE with ouroboros #114640

Open
matt-duch opened this issue Aug 8, 2023 · 1 comment
Open

OpaqueTypeKey ICE with ouroboros #114640

matt-duch opened this issue Aug 8, 2023 · 1 comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matt-duch
Copy link

I upfront apologize for not being able to create a minimum reproducible sample. I tried incrementally to recreate this behavior by creating code from scratch, but wasn't able to. This seems to be triggered by an interaction with ouroboros, but when an inner struct changes (but not always, just under some specific set of circumstances I can't pin down). Please let me know if more information is needed to understand what's happening.

Code

While trying to understand the issue, I created this struct based on an example in the ouroboros docs (which worked), and slowly modified to approach what I had that caused the crash. I built it in a separate mod and everything worked (I could freely modify the struct without issues, while still using it in an ouroboros struct). I then moved it into the same mod as my failing struct and switched it out for the struct causing errors in Context. Now, if I try to modify the struct (add a field, change a name, anything), the ICE happens. However, as is, it will compile. This happened in 1.72 nightly, so I tried upgrading to nightly today, but no go. If I make changes, cargo clean and cargo build, it'll work.

<code>
pub mod rec {
      pub struct ComplexData<'a> {
	      pub r#type: std::collections::BTreeMap<def::QualifiedName, u64>,
	      pub l2: Vec<crate::rec::Type<'a>>,
      }
}

#[self_referencing]
pub struct Context<'a> {
	def: &'a def::namespace::Namespace<def::DefaultTypeDecl>,
	#[borrows(def)]
	#[covariant]
	complex_data: crate::rec::ComplexData<'this>,
}

Meta

rustc --version --verbose:

<version>
rustc 1.73.0-nightly (03a119b0b 2023-08-07)
binary: rustc
commit-hash: 03a119b0b0e310d22d94399b24ed030056050f13
commit-date: 2023-08-07
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5

Error output

<output>
thread 'rustc' panicked at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/compiler/rustc_query_system/src/dep_graph/graph.rs:350:9:
forcing query with already existing `DepNode`
- query-key: Canonical { value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [Binder { value: TraitPredicate(<ComplexDataBuilder_ as std::marker::Sized>, polarity:Positive), bound_vars: [] }, Binder { value: TraitPredicate(<ComplexDataBuilder_ as std::ops::FnOnce<(&'this &fabric_aem_def_typ::namespace::Namespace<fabric_aem_def_typ::StdNamed<fabric_aem_def_typ::comp::Std<fabric_aem_def_typ::StdTypeUse<fabric_aem_def_typ::prim::Std>>, fabric_aem_def_typ::comp::StdGeneric<fabric_aem_def_typ::StdTypeUse<fabric_aem_def_typ::prim::Std>>>>,)>>, polarity:Positive), bound_vars: [Region(BrNamed(DefId(0:1247 ~ fabric_aem_mach_typ[1b43]::ouroboros_impl_context::{impl#2}::'this), 'this))] }, Binder { value: ProjectionPredicate(AliasTy { args: [ComplexDataBuilder_, (&'this &fabric_aem_def_typ::namespace::Namespace<fabric_aem_def_typ::StdNamed<fabric_aem_def_typ::comp::Std<fabric_aem_def_typ::StdTypeUse<fabric_aem_def_typ::prim::Std>>, fabric_aem_def_typ::comp::StdGeneric<fabric_aem_def_typ::StdTypeUse<fabric_aem_def_typ::prim::Std>>>>,)], def_id: DefId(2:2934 ~ core[d58d]::ops::function::FnOnce::Output) }, Term::Ty(std::pin::Pin<std::boxed::Box<(dyn std::future::Future<Output = rec::ComplexData<'this>> + 'this)>>)), bound_vars: [Region(BrNamed(DefId(0:1247 ~ fabric_aem_mach_typ[1b43]::ouroboros_impl_context::{impl#2}::'this), 'this))] }], reveal: UserFacing }, value: Normalize { value: [async fn body@base/fabric/aem/mach/typ/src/lib.rs:23:1: 23:20] } }, max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }
Backtrace

<backtrace>
stack backtrace:
   0:     0x7fb527d6313c - std::backtrace_rs::backtrace::libunwind::trace::hce3e928953bc2090
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fb527d6313c - std::backtrace_rs::backtrace::trace_unsynchronized::hca355bd13c592b0c
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fb527d6313c - std::sys_common::backtrace::_print_fmt::h44d865e76ccdae95
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7fb527d6313c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6649ade1fbcab036
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fb527dc983c - core::fmt::rt::Argument::fmt::h8f066fabb716785c
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/core/src/fmt/rt.rs:138:9
   5:     0x7fb527dc983c - core::fmt::write::hb13ec807b233a5a9
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/core/src/fmt/mod.rs:1094:21
   6:     0x7fb527d557ce - std::io::Write::write_fmt::h9624102bcbe9cdf3
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/io/mod.rs:1714:15
   7:     0x7fb527d62f25 - std::sys_common::backtrace::_print::h826f6e19825e64be
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fb527d62f25 - std::sys_common::backtrace::print::h38ab5892ba126dbd
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fb527d6607a - std::panicking::panic_hook_with_disk_dump::{{closure}}::h5cf034e3220814da
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/panicking.rs:278:22
  10:     0x7fb527d65d13 - std::panicking::panic_hook_with_disk_dump::h2f556212aef98ce9
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/panicking.rs:312:9
  11:     0x7fb52b0457b9 - <rustc_driver_impl[196a76b828487ebe]::install_ice_hook::{closure#0} as core[d58d26022ce54cf9]::ops::function::FnOnce<(&core[d58d26022ce54cf9]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  12:     0x7fb527d66920 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hd78399023e773aea
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/alloc/src/boxed.rs:2021:9
  13:     0x7fb527d66920 - std::panicking::rust_panic_with_hook::h92a78257c6e77dd8
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/panicking.rs:733:13
  14:     0x7fb527d666a7 - std::panicking::begin_panic_handler::{{closure}}::h361d5cc2d3940ca8
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/panicking.rs:621:13
  15:     0x7fb527d63676 - std::sys_common::backtrace::__rust_end_short_backtrace::hb375dad8ac9a26ce
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys_common/backtrace.rs:170:18
  16:     0x7fb527d663f2 - rust_begin_unwind
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/panicking.rs:617:5
  17:     0x7fb527dc5bf3 - core::panicking::panic_fmt::hc420f997cfe736c7
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/core/src/panicking.rs:67:14
  18:     0x7fb52a69654d - rustc_query_system[ff1b11b811969333]::query::plumbing::try_execute_query::<rustc_query_impl[448221c6598f4969]::DynamicConfig<rustc_query_system[ff1b11b811969333]::query::caches::DefaultCache<rustc_middle[4ba7bc41550d4ec4]::infer::canonical::Canonical<rustc_middle[4ba7bc41550d4ec4]::ty::ParamEnvAnd<rustc_middle[4ba7bc41550d4ec4]::traits::query::type_op::Normalize<rustc_middle[4ba7bc41550d4ec4]::ty::Ty>>>, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[448221c6598f4969]::plumbing::QueryCtxt, true>
  19:     0x7fb52a6958ff - rustc_query_impl[448221c6598f4969]::query_impl::type_op_normalize_ty::get_query_incr::__rust_end_short_backtrace
  20:     0x7fb529cf4041 - <rustc_middle[4ba7bc41550d4ec4]::ty::Ty as rustc_trait_selection[8c483b5b4c9db9ab]::traits::query::type_op::normalize::Normalizable>::type_op_method
  21:     0x7fb529cee951 - rustc_borrowck[19ed1c66e4925e77]::type_check::free_region_relations::create
  22:     0x7fb529cb4874 - rustc_borrowck[19ed1c66e4925e77]::type_check::type_check
  23:     0x7fb529cac107 - rustc_borrowck[19ed1c66e4925e77]::nll::compute_regions
  24:     0x7fb529c44014 - rustc_borrowck[19ed1c66e4925e77]::do_mir_borrowck
  25:     0x7fb529c42325 - rustc_borrowck[19ed1c66e4925e77]::mir_borrowck
  26:     0x7fb52904954e - rustc_query_impl[448221c6598f4969]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[448221c6598f4969]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 8usize]>>
  27:     0x7fb52904951e - <rustc_query_impl[448221c6598f4969]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[d58d26022ce54cf9]::ops::function::FnOnce<(rustc_middle[4ba7bc41550d4ec4]::ty::context::TyCtxt, rustc_span[d89656448013b6d3]::def_id::LocalDefId)>>::call_once
  28:     0x7fb529896064 - rustc_query_system[ff1b11b811969333]::query::plumbing::try_execute_query::<rustc_query_impl[448221c6598f4969]::DynamicConfig<rustc_query_system[ff1b11b811969333]::query::caches::VecCache<rustc_span[d89656448013b6d3]::def_id::LocalDefId, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[448221c6598f4969]::plumbing::QueryCtxt, true>
  29:     0x7fb5299ac61c - rustc_query_impl[448221c6598f4969]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace
  30:     0x7fb52a2276ff - <rustc_borrowck[19ed1c66e4925e77]::type_check::TypeChecker>::prove_closure_bounds
  31:     0x7fb52a20248f - <rustc_borrowck[19ed1c66e4925e77]::type_check::TypeChecker>::typeck_mir
  32:     0x7fb529cb4d50 - rustc_borrowck[19ed1c66e4925e77]::type_check::type_check
  33:     0x7fb529cac107 - rustc_borrowck[19ed1c66e4925e77]::nll::compute_regions
  34:     0x7fb529c44014 - rustc_borrowck[19ed1c66e4925e77]::do_mir_borrowck
  35:     0x7fb529c42325 - rustc_borrowck[19ed1c66e4925e77]::mir_borrowck
  36:     0x7fb52904954e - rustc_query_impl[448221c6598f4969]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[448221c6598f4969]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 8usize]>>
  37:     0x7fb52904951e - <rustc_query_impl[448221c6598f4969]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[d58d26022ce54cf9]::ops::function::FnOnce<(rustc_middle[4ba7bc41550d4ec4]::ty::context::TyCtxt, rustc_span[d89656448013b6d3]::def_id::LocalDefId)>>::call_once
  38:     0x7fb529896064 - rustc_query_system[ff1b11b811969333]::query::plumbing::try_execute_query::<rustc_query_impl[448221c6598f4969]::DynamicConfig<rustc_query_system[ff1b11b811969333]::query::caches::VecCache<rustc_span[d89656448013b6d3]::def_id::LocalDefId, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[448221c6598f4969]::plumbing::QueryCtxt, true>
  39:     0x7fb529b7f6d6 - rustc_query_system[ff1b11b811969333]::query::plumbing::force_query::<rustc_query_impl[448221c6598f4969]::DynamicConfig<rustc_query_system[ff1b11b811969333]::query::caches::VecCache<rustc_span[d89656448013b6d3]::def_id::LocalDefId, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[448221c6598f4969]::plumbing::QueryCtxt>
  40:     0x7fb52a7dde63 - rustc_query_impl[448221c6598f4969]::plumbing::force_from_dep_node::<rustc_query_impl[448221c6598f4969]::DynamicConfig<rustc_query_system[ff1b11b811969333]::query::caches::VecCache<rustc_span[d89656448013b6d3]::def_id::LocalDefId, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 8usize]>>, false, false, false>>
  41:     0x7fb52b93db1d - <rustc_query_impl[448221c6598f4969]::plumbing::query_callback<rustc_query_impl[448221c6598f4969]::query_impl::mir_borrowck::QueryType>::{closure#0} as core[d58d26022ce54cf9]::ops::function::FnOnce<(rustc_middle[4ba7bc41550d4ec4]::ty::context::TyCtxt, rustc_query_system[ff1b11b811969333]::dep_graph::dep_node::DepNode<rustc_middle[4ba7bc41550d4ec4]::dep_graph::dep_node::DepKind>)>>::call_once
  42:     0x7fb5291885f9 - <rustc_query_system[ff1b11b811969333]::dep_graph::graph::DepGraphData<rustc_middle[4ba7bc41550d4ec4]::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl[448221c6598f4969]::plumbing::QueryCtxt>
  43:     0x7fb529b465dd - rustc_query_system[ff1b11b811969333]::query::plumbing::try_execute_query::<rustc_query_impl[448221c6598f4969]::DynamicConfig<rustc_query_system[ff1b11b811969333]::query::caches::DefaultCache<rustc_span[d89656448013b6d3]::def_id::DefId, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[448221c6598f4969]::plumbing::QueryCtxt, true>
  44:     0x7fb52a999d9c - rustc_query_impl[448221c6598f4969]::query_impl::type_of::get_query_incr::__rust_end_short_backtrace
  45:     0x7fb52a1b13f6 - rustc_middle[4ba7bc41550d4ec4]::query::plumbing::query_get_at::<rustc_query_system[ff1b11b811969333]::query::caches::DefaultCache<rustc_span[d89656448013b6d3]::def_id::DefId, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 8usize]>>>
  46:     0x7fb52a1a9cd6 - rustc_hir_analysis[266c6319d34224b7]::check::check::check_mod_item_types
  47:     0x7fb529de7e0c - rustc_query_impl[448221c6598f4969]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[448221c6598f4969]::query_impl::check_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 0usize]>>
  48:     0x7fb529de7dee - <rustc_query_impl[448221c6598f4969]::query_impl::check_mod_item_types::dynamic_query::{closure#2} as core[d58d26022ce54cf9]::ops::function::FnOnce<(rustc_middle[4ba7bc41550d4ec4]::ty::context::TyCtxt, rustc_span[d89656448013b6d3]::def_id::LocalDefId)>>::call_once
  49:     0x7fb529ddb5c0 - rustc_query_system[ff1b11b811969333]::query::plumbing::try_execute_query::<rustc_query_impl[448221c6598f4969]::DynamicConfig<rustc_query_system[ff1b11b811969333]::query::caches::VecCache<rustc_span[d89656448013b6d3]::def_id::LocalDefId, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[448221c6598f4969]::plumbing::QueryCtxt, true>
  50:     0x7fb52a9a4f72 - rustc_query_impl[448221c6598f4969]::query_impl::check_mod_item_types::get_query_incr::__rust_end_short_backtrace
  51:     0x7fb52a4fb0a7 - <rustc_middle[4ba7bc41550d4ec4]::hir::map::Map>::for_each_module::<rustc_hir_analysis[266c6319d34224b7]::check_crate::{closure#6}::{closure#0}>
  52:     0x7fb52a4f9dff - rustc_hir_analysis[266c6319d34224b7]::check_crate
  53:     0x7fb52a4f427a - rustc_interface[99275295a6910fa9]::passes::analysis
  54:     0x7fb52a52b97a - rustc_query_impl[448221c6598f4969]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[448221c6598f4969]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 1usize]>>
  55:     0x7fb52a52b969 - <rustc_query_impl[448221c6598f4969]::query_impl::analysis::dynamic_query::{closure#2} as core[d58d26022ce54cf9]::ops::function::FnOnce<(rustc_middle[4ba7bc41550d4ec4]::ty::context::TyCtxt, ())>>::call_once
  56:     0x7fb52a814b86 - rustc_query_system[ff1b11b811969333]::query::plumbing::try_execute_query::<rustc_query_impl[448221c6598f4969]::DynamicConfig<rustc_query_system[ff1b11b811969333]::query::caches::SingleCache<rustc_middle[4ba7bc41550d4ec4]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[448221c6598f4969]::plumbing::QueryCtxt, true>
  57:     0x7fb52a8146fe - rustc_query_impl[448221c6598f4969]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  58:     0x7fb52a2cdb45 - <rustc_middle[4ba7bc41550d4ec4]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[196a76b828487ebe]::run_compiler::{closure#1}::{closure#2}::{closure#5}, core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>>
  59:     0x7fb52a2cc9e3 - rustc_span[d89656448013b6d3]::set_source_map::<core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>, rustc_interface[99275295a6910fa9]::interface::run_compiler<core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>, rustc_driver_impl[196a76b828487ebe]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  60:     0x7fb52a2c6b80 - std[31c3f87331eb5e42]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[99275295a6910fa9]::util::run_in_thread_pool_with_globals<rustc_interface[99275295a6910fa9]::interface::run_compiler<core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>, rustc_driver_impl[196a76b828487ebe]::run_compiler::{closure#1}>::{closure#0}, core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>>
  61:     0x7fb52a2c64de - <<std[31c3f87331eb5e42]::thread::Builder>::spawn_unchecked_<rustc_interface[99275295a6910fa9]::util::run_in_thread_pool_with_globals<rustc_interface[99275295a6910fa9]::interface::run_compiler<core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>, rustc_driver_impl[196a76b828487ebe]::run_compiler::{closure#1}>::{closure#0}, core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>>::{closure#1} as core[d58d26022ce54cf9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  62:     0x7fb527d710c5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h347acbcb58be099b
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/alloc/src/boxed.rs:2007:9
  63:     0x7fb527d710c5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc150f5dcae5f9c37
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/alloc/src/boxed.rs:2007:9
  64:     0x7fb527d710c5 - std::sys::unix::thread::Thread::new::thread_start::h77f77ee5162cba0c
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys/unix/thread.rs:108:17
  65:     0x7fb527a8f18a - start_thread
                               at ./nptl/pthread_create.c:444:8
  66:     0x7fb527b1dbd0 - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  67:                0x0 - <unknown>

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please attach the file at `/home/matt/prj/epitaxial/main/src/rustc-ice-2023-08-08T22:25:19.528627676Z-249165.txt` to your bug report

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

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

query stack during panic:
#0 [type_op_normalize_ty] normalizing `[async fn body@base/fabric/aem/mach/typ/src/lib.rs:23:1: 23:20]`
#1 [mir_borrowck] borrow-checking `ouroboros_impl_context::<impl at base/fabric/aem/mach/typ/src/lib.rs:23:1: 23:20>::build::{closure#0}`
#2 [mir_borrowck] borrow-checking `ouroboros_impl_context::<impl at base/fabric/aem/mach/typ/src/lib.rs:23:1: 23:20>::build`
#3 [type_of] computing type of `ouroboros_impl_context::<impl at base/fabric/aem/mach/typ/src/lib.rs:23:1: 23:20>::build::{opaque#0}`
#4 [check_mod_item_types] checking item types in module `ouroboros_impl_context`
#5 [analysis] running analysis passes on this crate
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 type_of(fabric_aem_mach_typ[1b43]::ouroboros_impl_context::{impl#2}::build::{opaque#0})
end of try_mark_green dep node stack
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: {OpaqueTypeKey { def_id: DefId(0:1724 ~ fabric_aem_mach_typ[1b43]::ouroboros_impl_context::{impl#2}::build::{opaque#0}), args: ['?8, ComplexDataBuilder_, '?9] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: base/fabric/aem/mach/typ/src/lib.rs:23:1: 23:20 (#129), ty: [async fn body@base/fabric/aem/mach/typ/src/lib.rs:23:1: 23:20] } }}
  |
  = note: delayed at compiler/rustc_infer/src/infer/opaque_types/table.rs:44:26
             0: <rustc_errors::HandlerInner>::emit_diagnostic
             1: <rustc_session::session::Session>::delay_span_bug::<rustc_span::span_encoding::Span, alloc::string::String>
             2: core::ptr::drop_in_place::<rustc_infer::infer::InferCtxt>
             3: rustc_borrowck::mir_borrowck
             4: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
             5: <rustc_query_impl::query_impl::mir_borrowck::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
             6: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
             7: rustc_query_system::query::plumbing::force_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt>
             8: rustc_query_impl::plumbing::force_from_dep_node::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>>
             9: <rustc_query_impl::plumbing::query_callback<rustc_query_impl::query_impl::mir_borrowck::QueryType>::{closure#0} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_query_system::dep_graph::dep_node::DepNode<rustc_middle::dep_graph::dep_node::DepKind>)>>::call_once
            10: <rustc_query_system::dep_graph::graph::DepGraphData<rustc_middle::dep_graph::dep_node::DepKind>>::try_mark_previous_green::<rustc_query_impl::plumbing::QueryCtxt>
            11: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            12: rustc_query_impl::query_impl::type_of::get_query_incr::__rust_end_short_backtrace
            13: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
            14: rustc_hir_analysis::check::check::check_mod_item_types
            15: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::check_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 0]>>
            16: <rustc_query_impl::query_impl::check_mod_item_types::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::LocalDefId)>>::call_once
            17: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 0]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            18: rustc_query_impl::query_impl::check_mod_item_types::get_query_incr::__rust_end_short_backtrace
            19: <rustc_middle::hir::map::Map>::for_each_module::<rustc_hir_analysis::check_crate::{closure#6}::{closure#0}>
            20: rustc_hir_analysis::check_crate
            21: rustc_interface::passes::analysis
            22: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
            23: <rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
            24: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
            25: rustc_query_impl::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
            26: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#5}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            27: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
            28: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
            29: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
            30: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/alloc/src/boxed.rs:2007:9
            31: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/alloc/src/boxed.rs:2007:9
            32: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys/unix/thread.rs:108:17
            33: start_thread
                       at ./nptl/pthread_create.c:444:8
            34: __GI___clone3
                       at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
          

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: please attach the file at `/home/matt/prj/epitaxial/main/src/rustc-ice-2023-08-08T22:25:19.528627676Z-249165.txt` to your bug report

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

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

query stack during panic:
end of query stack
thread 'rustc' panicked at library/core/src/panicking.rs:126:5:
panic in a function that cannot unwind
stack backtrace:
   0:     0x7fb527d6313c - std::backtrace_rs::backtrace::libunwind::trace::hce3e928953bc2090
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fb527d6313c - std::backtrace_rs::backtrace::trace_unsynchronized::hca355bd13c592b0c
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fb527d6313c - std::sys_common::backtrace::_print_fmt::h44d865e76ccdae95
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7fb527d6313c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6649ade1fbcab036
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fb527dc983c - core::fmt::rt::Argument::fmt::h8f066fabb716785c
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/core/src/fmt/rt.rs:138:9
   5:     0x7fb527dc983c - core::fmt::write::hb13ec807b233a5a9
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/core/src/fmt/mod.rs:1094:21
   6:     0x7fb527d557ce - std::io::Write::write_fmt::h9624102bcbe9cdf3
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/io/mod.rs:1714:15
   7:     0x7fb527d62f25 - std::sys_common::backtrace::_print::h826f6e19825e64be
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fb527d62f25 - std::sys_common::backtrace::print::h38ab5892ba126dbd
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fb527d6607a - std::panicking::panic_hook_with_disk_dump::{{closure}}::h5cf034e3220814da
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/panicking.rs:278:22
  10:     0x7fb527d65d13 - std::panicking::panic_hook_with_disk_dump::h2f556212aef98ce9
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/panicking.rs:312:9
  11:     0x7fb52b0457b9 - <rustc_driver_impl[196a76b828487ebe]::install_ice_hook::{closure#0} as core[d58d26022ce54cf9]::ops::function::FnOnce<(&core[d58d26022ce54cf9]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  12:     0x7fb527d66920 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hd78399023e773aea
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/alloc/src/boxed.rs:2021:9
  13:     0x7fb527d66920 - std::panicking::rust_panic_with_hook::h92a78257c6e77dd8
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/panicking.rs:733:13
  14:     0x7fb527d66661 - std::panicking::begin_panic_handler::{{closure}}::h361d5cc2d3940ca8
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/panicking.rs:619:13
  15:     0x7fb527d63676 - std::sys_common::backtrace::__rust_end_short_backtrace::hb375dad8ac9a26ce
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys_common/backtrace.rs:170:18
  16:     0x7fb527d663f2 - rust_begin_unwind
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/panicking.rs:617:5
  17:     0x7fb527dc5c33 - core::panicking::panic_nounwind_fmt::hb40c402e860cb7b7
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/core/src/panicking.rs:96:14
  18:     0x7fb527dc5cd7 - core::panicking::panic_nounwind::h0ba2cc5d9f3e183b
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/core/src/panicking.rs:126:5
  19:     0x7fb527dc5e63 - core::panicking::panic_cannot_unwind::hd404264b8e994729
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/core/src/panicking.rs:189:5
  20:     0x7fb52a2cd837 - rustc_span[d89656448013b6d3]::set_source_map::<core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>, rustc_interface[99275295a6910fa9]::interface::run_compiler<core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>, rustc_driver_impl[196a76b828487ebe]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  21:     0x7fb52a2c6b80 - std[31c3f87331eb5e42]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[99275295a6910fa9]::util::run_in_thread_pool_with_globals<rustc_interface[99275295a6910fa9]::interface::run_compiler<core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>, rustc_driver_impl[196a76b828487ebe]::run_compiler::{closure#1}>::{closure#0}, core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>>
  22:     0x7fb52a2c64de - <<std[31c3f87331eb5e42]::thread::Builder>::spawn_unchecked_<rustc_interface[99275295a6910fa9]::util::run_in_thread_pool_with_globals<rustc_interface[99275295a6910fa9]::interface::run_compiler<core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>, rustc_driver_impl[196a76b828487ebe]::run_compiler::{closure#1}>::{closure#0}, core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[d58d26022ce54cf9]::result::Result<(), rustc_span[d89656448013b6d3]::ErrorGuaranteed>>::{closure#1} as core[d58d26022ce54cf9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  23:     0x7fb527d710c5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h347acbcb58be099b
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/alloc/src/boxed.rs:2007:9
  24:     0x7fb527d710c5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc150f5dcae5f9c37
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/alloc/src/boxed.rs:2007:9
  25:     0x7fb527d710c5 - std::sys::unix::thread::Thread::new::thread_start::h77f77ee5162cba0c
                               at /rustc/03a119b0b0e310d22d94399b24ed030056050f13/library/std/src/sys/unix/thread.rs:108:17
  26:     0x7fb527a8f18a - start_thread
                               at ./nptl/pthread_create.c:444:8
  27:     0x7fb527b1dbd0 - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  28:                0x0 - <unknown>

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please attach the file at `/home/matt/prj/epitaxial/main/src/rustc-ice-2023-08-08T22:25:19.528627676Z-249165.txt` to your bug report

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

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

query stack during panic:
end of query stack
thread caused non-unwinding panic. aborting.

[rustc-ice-2023-08-08T22:25:19.528627676Z-249165.txt](https://github.com/rust-lang/rust/files/12296626/rustc-ice-2023-08-08T22.25.19.528627676Z-249165.txt)
@matt-duch matt-duch 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 Aug 8, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 8, 2023
@saethlin saethlin added A-incr-comp Area: Incremental compilation E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 12, 2023
@kpreid
Copy link
Contributor

kpreid commented Dec 25, 2023

Relabeling issues which don't have a runnable reproduction (as opposed to not having a minimized one) to the new label S-needs-repro.
@rustbot label +S-needs-repro -E-needs-mcve

@rustbot rustbot added S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. and removed E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. 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

4 participants