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

Odd compiler panic #132478

Open
lucasgelfond opened this issue Nov 1, 2024 · 1 comment
Open

Odd compiler panic #132478

lucasgelfond opened this issue Nov 1, 2024 · 1 comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ 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

@lucasgelfond
Copy link

lucasgelfond commented Nov 1, 2024

Code

I'm a Rust newbie and working in a largeish production codebase, so difficult to find something minimally reproducible, but getting a pretty gnarly compiler bug internally. Just comes from running cargo check (note: no problems in CI! Just on my local machine, a 2021 M1 Pro MacBook Pro.

Meta

rustc --version --verbose:

rustc 1.82.0 (f6e511eec 2024-10-15)
binary: rustc
commit-hash: f6e511eec7342f59a25f7c0534f1dbea00d01b14
commit-date: 2024-10-15
host: aarch64-apple-darwin
release: 1.82.0
LLVM version: 19.1.1

Error output

thread 'rustc' panicked at compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:23:54:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:        0x10cb04bdc - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::habbf9c4f641febb1
   1:        0x10a0d1770 - core::fmt::write::ha36a8060c13608ea
   2:        0x10caf8b0c - std::io::Write::write_fmt::h431832c8ebcc85c9
   3:        0x10cb072a4 - std::panicking::default_hook::{{closure}}::h4aa1f60327dfff6a
   4:        0x10cb06ef8 - std::panicking::default_hook::h4ebc6eb4ae179807
   5:        0x10ac42afc - <alloc[764fc8c78a1bb3e1]::boxed::Box<rustc_driver_impl[d9f1096c2de14668]::install_ice_hook::{closure#0}> as core[fafc87a594706398]::ops::function::Fn<(&dyn for<'a, 'b> core[fafc87a594706398]::ops::function::Fn<(&'a std[d8d90c69e022292b]::panic::PanicHookInfo<'b>,), Output = ()> + core[fafc87a594706398]::marker::Sync + core[fafc87a594706398]::marker::Send, &std[d8d90c69e022292b]::panic::PanicHookInfo)>>::call
   6:        0x10cb08428 - std::panicking::rust_panic_with_hook::h6a84efe4dcab239c
   7:        0x10cb07818 - std::panicking::begin_panic_handler::{{closure}}::h5eef292190467fef
   8:        0x10cb05084 - std::sys::backtrace::__rust_end_short_backtrace::hd7e7925203f20af9
   9:        0x10cb07514 - _rust_begin_unwind
  10:        0x10f183b60 - core::panicking::panic_fmt::h410d3f147658259b
  11:        0x10f183bcc - core::panicking::panic::hee236ca94fc05047
  12:        0x10f183ae8 - core::option::unwrap_failed::h187ebe480b20e6be
  13:        0x10b70adcc - <rustc_metadata[acfe361cc13a0072]::rmeta::decoder::cstore_impl::provide_cstore_hooks::{closure#0} as core[fafc87a594706398]::ops::function::FnOnce<(rustc_middle[1486d011505b3441]::query::plumbing::TyCtxtAt, rustc_span[12a1c67e1f6abb]::def_id::DefPathHash, rustc_span[12a1c67e1f6abb]::def_id::StableCrateId)>>::call_once
  14:        0x10b7f27c4 - <rustc_middle[1486d011505b3441]::ty::context::TyCtxt>::def_path_hash_to_def_id
  15:        0x10c0b735c - <rustc_query_impl[d98edaeb063d7c4c]::plumbing::query_callback<rustc_query_impl[d98edaeb063d7c4c]::query_impl::adt_def::QueryType>::{closure#0} as core[fafc87a594706398]::ops::function::FnOnce<(rustc_middle[1486d011505b3441]::ty::context::TyCtxt, rustc_query_system[1bcdf744069b5f02]::dep_graph::dep_node::DepNode)>>::call_once
  16:        0x10c1b9f40 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  17:        0x10c1b9ee8 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  18:        0x10c1b9ee8 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  19:        0x10c1b9ee8 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  20:        0x10c1b9ee8 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  21:        0x10c1b9cd4 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  22:        0x10c0666d4 - rustc_query_system[1bcdf744069b5f02]::query::plumbing::try_execute_query::<rustc_query_impl[d98edaeb063d7c4c]::DynamicConfig<rustc_query_system[1bcdf744069b5f02]::query::caches::DefaultCache<rustc_type_ir[920e70aa31006d3f]::canonical::Canonical<rustc_middle[1486d011505b3441]::ty::context::TyCtxt, rustc_middle[1486d011505b3441]::ty::ParamEnvAnd<rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate>>, rustc_middle[1486d011505b3441]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt, true>
  23:        0x10c18a71c - rustc_query_impl[d98edaeb063d7c4c]::query_impl::type_op_prove_predicate::get_query_incr::__rust_end_short_backtrace
  24:        0x10c8a8398 - <rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate as rustc_trait_selection[59cf63c55545eaab]::traits::query::type_op::QueryTypeOp>::perform_query
  25:        0x10a6c3a10 - <rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate as rustc_trait_selection[59cf63c55545eaab]::traits::query::type_op::QueryTypeOp>::fully_perform_into
  26:        0x10a5d5614 - <rustc_infer[6bbdea83bea8e02f]::infer::InferCtxt>::commit_if_ok::<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed, rustc_trait_selection[59cf63c55545eaab]::traits::query::type_op::custom::scrape_region_constraints<rustc_middle[1486d011505b3441]::ty::ParamEnvAnd<rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate>, (), <rustc_middle[1486d011505b3441]::ty::ParamEnvAnd<rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate> as rustc_trait_selection[59cf63c55545eaab]::traits::query::type_op::TypeOp>::fully_perform::{closure#1}>::{closure#0}>
  27:        0x10a6b555c - <rustc_middle[1486d011505b3441]::ty::ParamEnvAnd<rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate> as rustc_trait_selection[59cf63c55545eaab]::traits::query::type_op::TypeOp>::fully_perform
  28:        0x10a6803e0 - <rustc_borrowck[aa07daf8814d9f80]::type_check::TypeChecker>::fully_perform_op::<(), rustc_middle[1486d011505b3441]::ty::ParamEnvAnd<rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate>>
  29:        0x10a6810cc - <rustc_borrowck[aa07daf8814d9f80]::type_check::TypeChecker>::normalize_and_prove_instantiated_predicates
  30:        0x10a67c5e4 - <rustc_borrowck[aa07daf8814d9f80]::type_check::TypeVerifier as rustc_middle[1486d011505b3441]::mir::visit::Visitor>::visit_const_operand
  31:        0x10a67d654 - <rustc_borrowck[aa07daf8814d9f80]::type_check::TypeVerifier as rustc_middle[1486d011505b3441]::mir::visit::Visitor>::visit_body
  32:        0x10a67751c - rustc_borrowck[aa07daf8814d9f80]::type_check::type_check
  33:        0x10a57f1d8 - rustc_borrowck[aa07daf8814d9f80]::nll::compute_regions
  34:        0x10a544db8 - rustc_borrowck[aa07daf8814d9f80]::do_mir_borrowck
  35:        0x10a53ba54 - rustc_borrowck[aa07daf8814d9f80]::mir_borrowck
  36:        0x10c0e29b4 - rustc_query_impl[d98edaeb063d7c4c]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d98edaeb063d7c4c]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1486d011505b3441]::query::erase::Erased<[u8; 8usize]>>
  37:        0x10c120934 - <rustc_query_impl[d98edaeb063d7c4c]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[fafc87a594706398]::ops::function::FnOnce<(rustc_middle[1486d011505b3441]::ty::context::TyCtxt, rustc_span[12a1c67e1f6abb]::def_id::LocalDefId)>>::call_once
  38:        0x10c096250 - rustc_query_system[1bcdf744069b5f02]::query::plumbing::try_execute_query::<rustc_query_impl[d98edaeb063d7c4c]::DynamicConfig<rustc_query_system[1bcdf744069b5f02]::query::caches::VecCache<rustc_span[12a1c67e1f6abb]::def_id::LocalDefId, rustc_middle[1486d011505b3441]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt, true>
  39:        0x10c170f64 - rustc_query_impl[d98edaeb063d7c4c]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace
  40:        0x10b4fbe7c - <rustc_data_structures[4379925a6ea25aa8]::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures[4379925a6ea25aa8]::sync::parallel::disabled::par_for_each_in<&[rustc_span[12a1c67e1f6abb]::def_id::LocalDefId], <rustc_middle[1486d011505b3441]::hir::map::Map>::par_body_owners<rustc_interface[8c972d485a8e2aa0]::passes::run_required_analyses::{closure#2}::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}::{closure#0}>
  41:        0x10b47d6c8 - rustc_interface[8c972d485a8e2aa0]::passes::analysis
  42:        0x10c0e99e0 - rustc_query_impl[d98edaeb063d7c4c]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d98edaeb063d7c4c]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1486d011505b3441]::query::erase::Erased<[u8; 1usize]>>
  43:        0x10c13a2a8 - <rustc_query_impl[d98edaeb063d7c4c]::query_impl::analysis::dynamic_query::{closure#2} as core[fafc87a594706398]::ops::function::FnOnce<(rustc_middle[1486d011505b3441]::ty::context::TyCtxt, ())>>::call_once
  44:        0x10c04f4b8 - rustc_query_system[1bcdf744069b5f02]::query::plumbing::try_execute_query::<rustc_query_impl[d98edaeb063d7c4c]::DynamicConfig<rustc_query_system[1bcdf744069b5f02]::query::caches::SingleCache<rustc_middle[1486d011505b3441]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt, true>
  45:        0x10c16269c - rustc_query_impl[d98edaeb063d7c4c]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  46:        0x10ac83608 - <rustc_middle[1486d011505b3441]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[d9f1096c2de14668]::run_compiler::{closure#0}::{closure#1}::{closure#5}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>
  47:        0x10ac23cc4 - <rustc_interface[8c972d485a8e2aa0]::interface::Compiler>::enter::<rustc_driver_impl[d9f1096c2de14668]::run_compiler::{closure#0}::{closure#1}, core[fafc87a594706398]::result::Result<core[fafc87a594706398]::option::Option<rustc_interface[8c972d485a8e2aa0]::queries::Linker>, rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>
  48:        0x10ac38200 - <scoped_tls[db9af8800088675c]::ScopedKey<rustc_span[12a1c67e1f6abb]::SessionGlobals>>::set::<rustc_interface[8c972d485a8e2aa0]::util::run_in_thread_with_globals<rustc_interface[8c972d485a8e2aa0]::interface::run_compiler<core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>, rustc_driver_impl[d9f1096c2de14668]::run_compiler::{closure#0}>::{closure#1}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>
  49:        0x10ac349fc - std[d8d90c69e022292b]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[8c972d485a8e2aa0]::util::run_in_thread_with_globals<rustc_interface[8c972d485a8e2aa0]::interface::run_compiler<core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>, rustc_driver_impl[d9f1096c2de14668]::run_compiler::{closure#0}>::{closure#1}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>
  50:        0x10ac410c0 - <<std[d8d90c69e022292b]::thread::Builder>::spawn_unchecked_<rustc_interface[8c972d485a8e2aa0]::util::run_in_thread_with_globals<rustc_interface[8c972d485a8e2aa0]::interface::run_compiler<core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>, rustc_driver_impl[d9f1096c2de14668]::run_compiler::{closure#0}>::{closure#1}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>::{closure#1} as core[fafc87a594706398]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  51:        0x10cb12d44 - std::sys::pal::unix::thread::Thread::new::thread_start::hd88bc8e95f2ca709
  52:        0x199dc72e4 - __pthread_deallocate

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.82.0 (f6e511eec 2024-10-15) running on aarch64-apple-darwin

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

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

query stack during panic:
#0 [type_op_prove_predicate] evaluating `type_op_prove_predicate` `ProvePredicate { predicate: Binder { value: TraitPredicate(<diesel::query_builder::update_statement::UpdateStatement<db_schema::schema::ob_configuration::table, diesel::query_builder::where_clause::WhereClause<diesel::expression::grouped::Grouped<diesel::expression::operators::And<diesel::expression::grouped::Grouped<diesel::expression::operators::And<diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<db_schema::schema::ob_configuration::columns::id, diesel::expression::bound::Bound<diesel::sql_types::Text, &newtypes::id::basic::ObConfigurationId>>>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<db_schema::schema::ob_configuration::columns::tenant_id, diesel::expression::bound::Bound<diesel::sql_types::Text, &newtypes::id::basic::TenantId>>>>>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<db_schema::schema::ob_configuration::columns::is_live, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>>>>, (core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::name>, diesel::expression::bound::Bound<diesel::sql_types::Text, alloc::string::String>>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::status>, diesel::expression::bound::Bound<diesel::sql_types::Text, newtypes::db_types::ob_config::ApiKeyStatus>>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::verification_checks>, diesel::expression::bound::Bound<diesel::sql_types::Nullable<diesel::pg::types::sql_types::Array<diesel::sql_types::Nullable<diesel::pg::types::sql_types::Jsonb>>>, alloc::vec::Vec<newtypes::db_types::verification_check::VerificationCheck>>>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::prompt_for_passkey>, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::allow_reonboard>, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::skip_confirm>, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>)> as diesel::query_builder::AsQuery>, polarity:Positive), bound_vars: [] } }`
#1 [mir_borrowck] borrow-checking `models::ob_configuration::<impl at components/db/core/src/models/ob_configuration.rs:450:1: 450:21>::update`
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 compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:23:54:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:        0x10cb04bdc - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::habbf9c4f641febb1
   1:        0x10a0d1770 - core::fmt::write::ha36a8060c13608ea
   2:        0x10caf8b0c - std::io::Write::write_fmt::h431832c8ebcc85c9
   3:        0x10cb072a4 - std::panicking::default_hook::{{closure}}::h4aa1f60327dfff6a
   4:        0x10cb06ef8 - std::panicking::default_hook::h4ebc6eb4ae179807
   5:        0x10ac42afc - <alloc[764fc8c78a1bb3e1]::boxed::Box<rustc_driver_impl[d9f1096c2de14668]::install_ice_hook::{closure#0}> as core[fafc87a594706398]::ops::function::Fn<(&dyn for<'a, 'b> core[fafc87a594706398]::ops::function::Fn<(&'a std[d8d90c69e022292b]::panic::PanicHookInfo<'b>,), Output = ()> + core[fafc87a594706398]::marker::Sync + core[fafc87a594706398]::marker::Send, &std[d8d90c69e022292b]::panic::PanicHookInfo)>>::call
   6:        0x10cb08428 - std::panicking::rust_panic_with_hook::h6a84efe4dcab239c
   7:        0x10cb07818 - std::panicking::begin_panic_handler::{{closure}}::h5eef292190467fef
   8:        0x10cb05084 - std::sys::backtrace::__rust_end_short_backtrace::hd7e7925203f20af9
   9:        0x10cb07514 - _rust_begin_unwind
  10:        0x10f183b60 - core::panicking::panic_fmt::h410d3f147658259b
  11:        0x10f183bcc - core::panicking::panic::hee236ca94fc05047
  12:        0x10f183ae8 - core::option::unwrap_failed::h187ebe480b20e6be
  13:        0x10b70adcc - <rustc_metadata[acfe361cc13a0072]::rmeta::decoder::cstore_impl::provide_cstore_hooks::{closure#0} as core[fafc87a594706398]::ops::function::FnOnce<(rustc_middle[1486d011505b3441]::query::plumbing::TyCtxtAt, rustc_span[12a1c67e1f6abb]::def_id::DefPathHash, rustc_span[12a1c67e1f6abb]::def_id::StableCrateId)>>::call_once
  14:        0x10b7f27c4 - <rustc_middle[1486d011505b3441]::ty::context::TyCtxt>::def_path_hash_to_def_id
  15:        0x10b4d9224 - rustc_interface[8c972d485a8e2aa0]::callbacks::dep_node_debug
  16:        0x10c2fb210 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::dep_node::DepNode as core[fafc87a594706398]::fmt::Debug>::fmt
  17:        0x10a0d1770 - core::fmt::write::ha36a8060c13608ea
  18:        0x10caf6eb0 - <&std::io::stdio::Stderr as std::io::Write>::write_fmt::hc885a26bdbfbb5f3
  19:        0x10caf7970 - std::io::stdio::_eprint::h1cab3cc779ae9153
  20:        0x10f315914 - rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::print_markframe_trace::<rustc_middle[1486d011505b3441]::dep_graph::DepsType>
  21:        0x10c1b9fcc - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  22:        0x10c1b9ee8 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  23:        0x10c1b9ee8 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  24:        0x10c1b9ee8 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  25:        0x10c1b9ee8 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_previous_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  26:        0x10c1b9cd4 - <rustc_query_system[1bcdf744069b5f02]::dep_graph::graph::DepGraphData<rustc_middle[1486d011505b3441]::dep_graph::DepsType>>::try_mark_green::<rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt>
  27:        0x10c0666d4 - rustc_query_system[1bcdf744069b5f02]::query::plumbing::try_execute_query::<rustc_query_impl[d98edaeb063d7c4c]::DynamicConfig<rustc_query_system[1bcdf744069b5f02]::query::caches::DefaultCache<rustc_type_ir[920e70aa31006d3f]::canonical::Canonical<rustc_middle[1486d011505b3441]::ty::context::TyCtxt, rustc_middle[1486d011505b3441]::ty::ParamEnvAnd<rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate>>, rustc_middle[1486d011505b3441]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt, true>
  28:        0x10c18a71c - rustc_query_impl[d98edaeb063d7c4c]::query_impl::type_op_prove_predicate::get_query_incr::__rust_end_short_backtrace
  29:        0x10c8a8398 - <rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate as rustc_trait_selection[59cf63c55545eaab]::traits::query::type_op::QueryTypeOp>::perform_query
  30:        0x10a6c3a10 - <rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate as rustc_trait_selection[59cf63c55545eaab]::traits::query::type_op::QueryTypeOp>::fully_perform_into
  31:        0x10a5d5614 - <rustc_infer[6bbdea83bea8e02f]::infer::InferCtxt>::commit_if_ok::<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed, rustc_trait_selection[59cf63c55545eaab]::traits::query::type_op::custom::scrape_region_constraints<rustc_middle[1486d011505b3441]::ty::ParamEnvAnd<rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate>, (), <rustc_middle[1486d011505b3441]::ty::ParamEnvAnd<rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate> as rustc_trait_selection[59cf63c55545eaab]::traits::query::type_op::TypeOp>::fully_perform::{closure#1}>::{closure#0}>
  32:        0x10a6b555c - <rustc_middle[1486d011505b3441]::ty::ParamEnvAnd<rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate> as rustc_trait_selection[59cf63c55545eaab]::traits::query::type_op::TypeOp>::fully_perform
  33:        0x10a6803e0 - <rustc_borrowck[aa07daf8814d9f80]::type_check::TypeChecker>::fully_perform_op::<(), rustc_middle[1486d011505b3441]::ty::ParamEnvAnd<rustc_middle[1486d011505b3441]::traits::query::type_op::ProvePredicate>>
  34:        0x10a6810cc - <rustc_borrowck[aa07daf8814d9f80]::type_check::TypeChecker>::normalize_and_prove_instantiated_predicates
  35:        0x10a67c5e4 - <rustc_borrowck[aa07daf8814d9f80]::type_check::TypeVerifier as rustc_middle[1486d011505b3441]::mir::visit::Visitor>::visit_const_operand
  36:        0x10a67d654 - <rustc_borrowck[aa07daf8814d9f80]::type_check::TypeVerifier as rustc_middle[1486d011505b3441]::mir::visit::Visitor>::visit_body
  37:        0x10a67751c - rustc_borrowck[aa07daf8814d9f80]::type_check::type_check
  38:        0x10a57f1d8 - rustc_borrowck[aa07daf8814d9f80]::nll::compute_regions
  39:        0x10a544db8 - rustc_borrowck[aa07daf8814d9f80]::do_mir_borrowck
  40:        0x10a53ba54 - rustc_borrowck[aa07daf8814d9f80]::mir_borrowck
  41:        0x10c0e29b4 - rustc_query_impl[d98edaeb063d7c4c]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d98edaeb063d7c4c]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1486d011505b3441]::query::erase::Erased<[u8; 8usize]>>
  42:        0x10c120934 - <rustc_query_impl[d98edaeb063d7c4c]::query_impl::mir_borrowck::dynamic_query::{closure#2} as core[fafc87a594706398]::ops::function::FnOnce<(rustc_middle[1486d011505b3441]::ty::context::TyCtxt, rustc_span[12a1c67e1f6abb]::def_id::LocalDefId)>>::call_once
  43:        0x10c096250 - rustc_query_system[1bcdf744069b5f02]::query::plumbing::try_execute_query::<rustc_query_impl[d98edaeb063d7c4c]::DynamicConfig<rustc_query_system[1bcdf744069b5f02]::query::caches::VecCache<rustc_span[12a1c67e1f6abb]::def_id::LocalDefId, rustc_middle[1486d011505b3441]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt, true>
  44:        0x10c170f64 - rustc_query_impl[d98edaeb063d7c4c]::query_impl::mir_borrowck::get_query_incr::__rust_end_short_backtrace
  45:        0x10b4fbe7c - <rustc_data_structures[4379925a6ea25aa8]::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures[4379925a6ea25aa8]::sync::parallel::disabled::par_for_each_in<&[rustc_span[12a1c67e1f6abb]::def_id::LocalDefId], <rustc_middle[1486d011505b3441]::hir::map::Map>::par_body_owners<rustc_interface[8c972d485a8e2aa0]::passes::run_required_analyses::{closure#2}::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}::{closure#0}>
  46:        0x10b47d6c8 - rustc_interface[8c972d485a8e2aa0]::passes::analysis
  47:        0x10c0e99e0 - rustc_query_impl[d98edaeb063d7c4c]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d98edaeb063d7c4c]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1486d011505b3441]::query::erase::Erased<[u8; 1usize]>>
  48:        0x10c13a2a8 - <rustc_query_impl[d98edaeb063d7c4c]::query_impl::analysis::dynamic_query::{closure#2} as core[fafc87a594706398]::ops::function::FnOnce<(rustc_middle[1486d011505b3441]::ty::context::TyCtxt, ())>>::call_once
  49:        0x10c04f4b8 - rustc_query_system[1bcdf744069b5f02]::query::plumbing::try_execute_query::<rustc_query_impl[d98edaeb063d7c4c]::DynamicConfig<rustc_query_system[1bcdf744069b5f02]::query::caches::SingleCache<rustc_middle[1486d011505b3441]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[d98edaeb063d7c4c]::plumbing::QueryCtxt, true>
  50:        0x10c16269c - rustc_query_impl[d98edaeb063d7c4c]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
  51:        0x10ac83608 - <rustc_middle[1486d011505b3441]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[d9f1096c2de14668]::run_compiler::{closure#0}::{closure#1}::{closure#5}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>
  52:        0x10ac23cc4 - <rustc_interface[8c972d485a8e2aa0]::interface::Compiler>::enter::<rustc_driver_impl[d9f1096c2de14668]::run_compiler::{closure#0}::{closure#1}, core[fafc87a594706398]::result::Result<core[fafc87a594706398]::option::Option<rustc_interface[8c972d485a8e2aa0]::queries::Linker>, rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>
  53:        0x10ac38200 - <scoped_tls[db9af8800088675c]::ScopedKey<rustc_span[12a1c67e1f6abb]::SessionGlobals>>::set::<rustc_interface[8c972d485a8e2aa0]::util::run_in_thread_with_globals<rustc_interface[8c972d485a8e2aa0]::interface::run_compiler<core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>, rustc_driver_impl[d9f1096c2de14668]::run_compiler::{closure#0}>::{closure#1}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>
  54:        0x10ac349fc - std[d8d90c69e022292b]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[8c972d485a8e2aa0]::util::run_in_thread_with_globals<rustc_interface[8c972d485a8e2aa0]::interface::run_compiler<core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>, rustc_driver_impl[d9f1096c2de14668]::run_compiler::{closure#0}>::{closure#1}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>
  55:        0x10ac410c0 - <<std[d8d90c69e022292b]::thread::Builder>::spawn_unchecked_<rustc_interface[8c972d485a8e2aa0]::util::run_in_thread_with_globals<rustc_interface[8c972d485a8e2aa0]::interface::run_compiler<core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>, rustc_driver_impl[d9f1096c2de14668]::run_compiler::{closure#0}>::{closure#1}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[fafc87a594706398]::result::Result<(), rustc_span[12a1c67e1f6abb]::ErrorGuaranteed>>::{closure#1} as core[fafc87a594706398]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  56:        0x10cb12d44 - std::sys::pal::unix::thread::Thread::new::thread_start::hd88bc8e95f2ca709
  57:        0x199dc72e4 - __pthread_deallocate

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.82.0 (f6e511eec 2024-10-15) running on aarch64-apple-darwin

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

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

query stack during panic:
#0 [type_op_prove_predicate] evaluating `type_op_prove_predicate` `ProvePredicate { predicate: Binder { value: TraitPredicate(<diesel::query_builder::update_statement::UpdateStatement<db_schema::schema::ob_configuration::table, diesel::query_builder::where_clause::WhereClause<diesel::expression::grouped::Grouped<diesel::expression::operators::And<diesel::expression::grouped::Grouped<diesel::expression::operators::And<diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<db_schema::schema::ob_configuration::columns::id, diesel::expression::bound::Bound<diesel::sql_types::Text, &newtypes::id::basic::ObConfigurationId>>>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<db_schema::schema::ob_configuration::columns::tenant_id, diesel::expression::bound::Bound<diesel::sql_types::Text, &newtypes::id::basic::TenantId>>>>>, diesel::expression::grouped::Grouped<diesel::expression::operators::Eq<db_schema::schema::ob_configuration::columns::is_live, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>>>>, (core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::name>, diesel::expression::bound::Bound<diesel::sql_types::Text, alloc::string::String>>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::status>, diesel::expression::bound::Bound<diesel::sql_types::Text, newtypes::db_types::ob_config::ApiKeyStatus>>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::verification_checks>, diesel::expression::bound::Bound<diesel::sql_types::Nullable<diesel::pg::types::sql_types::Array<diesel::sql_types::Nullable<diesel::pg::types::sql_types::Jsonb>>>, alloc::vec::Vec<newtypes::db_types::verification_check::VerificationCheck>>>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::prompt_for_passkey>, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::allow_reonboard>, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>, core::option::Option<diesel::query_builder::update_statement::changeset::Assign<diesel::query_builder::update_statement::changeset::ColumnWrapperForUpdate<db_schema::schema::ob_configuration::columns::skip_confirm>, diesel::expression::bound::Bound<diesel::sql_types::Bool, bool>>>)> as diesel::query_builder::AsQuery>, polarity:Positive), bound_vars: [] } }`
#1 [mir_borrowck] borrow-checking `models::ob_configuration::<impl at components/db/core/src/models/ob_configuration.rs:450:1: 450:21>::update`
end of query stack
error: could not compile `db` (lib)```

Crazily enough, Cargo build works!

<backtrace>

@lucasgelfond lucasgelfond 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 Nov 1, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 1, 2024
@matthiaskrgr matthiaskrgr added the A-incr-comp Area: Incremental compilation label Nov 1, 2024
@lucasgelfond
Copy link
Author

Notably, when I did cargo clean and ran it again, this went away.

@jieyouxu jieyouxu added S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ 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