rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.27k stars 12.71k forks source link

ICE when resolving auto traits during incremental compilation #102749

Open tylerhawkes opened 2 years ago

tylerhawkes commented 2 years ago

Possibly related: https://github.com/rust-lang/rust/issues/102739

Code

Unfortunately, this is probably an incremental compilation issue, so probably not reproducible. This is the 3rd time I've run into this in the last day. cargo clean -p <my-crate> seems to fix it. The previous issues were also with Send and Sync so it appears to be an issue with resolving auto traits. The UserComparison struct is auto generated by a proc-macro that had changes made to it.

Meta

rustc --version --verbose:

rustc 1.65.0-beta.1 (2a65764f2 2022-09-19)
binary: rustc
commit-hash: 2a65764f21cf10b7e03c645f1ad0946e42758e0a
commit-date: 2022-09-19
host: aarch64-apple-darwin
release: 1.65.0-beta.1
LLVM version: 15.0.0

Error output

This is everything except the stack trace

error: internal compiler error: unexpected panic

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

note: rustc 1.65.0-beta.1 (2a65764f2 2022-09-19) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C opt-level=3 -C lto=off -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C debug-assertions=on -C linker=clang -C incremental=[REDACTED] -C link-arg=-fuse-ld=mold -C target-cpu=native

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `subgraph::UserComparison: core::marker::Sync`  |  = note: this failure-note originates in the attribute macro `entity` (in Nightly builds, run with -Z macro-backtrace for more info)

#1 [check_well_formed] checking that `subgraph::<impl at src/subgraph.rs:272:1: 277:3>` is well-formed
#2 [check_mod_type_wf] checking that types are well-formed in module `subgraph`
#3 [analysis] running analysis passes on this crate
end of query stack
Backtrace

``` thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:23:62 stack backtrace: 0: 0x101563774 - ::fmt::hc14c2fbe7eab7edd 1: 0x1015adca4 - core::fmt::write::hf7ba2d9322b02f7b 2: 0x101556714 - std::io::Write::write_fmt::hcbbe9804d68b1866 3: 0x101565ff0 - std::panicking::default_hook::{{closure}}::h074c918006a712d7 4: 0x101565d14 - std::panicking::default_hook::hcb4fc0515f47d0e1 5: 0x1092d5c74 - rustc_driver[51b00cac61f89616]::DEFAULT_HOOK::{closure#0}::{closure#0} 6: 0x1015666b4 - std::panicking::rust_panic_with_hook::hda85dfcaf11e28f6 7: 0x101566524 - std::panicking::begin_panic_handler::{{closure}}::hacac2c8511d70f3d 8: 0x101563bdc - std::sys_common::backtrace::__rust_end_short_backtrace::h1f4cf35d9dc62d33 9: 0x1015662b4 - _rust_begin_unwind 10: 0x1015d7714 - core::panicking::panic_fmt::h7cea19b1cbddf8d1 11: 0x1015d7634 - core::panicking::panic::h231bcc5267006a51 12: 0x10c87adb8 - ::def_path_hash_to_def_id 13: 0x10cf8f3ec - ::def_path_hash_to_def_id 14: 0x10cfb4e4c - as rustc_middle[6ad8a970aa6bf88a]::dep_graph::dep_node::DepNodeExt>::extract_def_id 15: 0x10c51dfa0 - rustc_query_impl[bef29f7fed8c56d5]::plumbing::force_from_dep_node:: 16: 0x10cf7aef4 - ::try_force_from_dep_node 17: 0x10c472cbc - >::try_mark_previous_green:: 18: 0x10c472c8c - >::try_mark_previous_green:: 19: 0x10c472c8c - >::try_mark_previous_green:: 20: 0x10c472c8c - >::try_mark_previous_green:: 21: 0x10c443108 - >::try_mark_green:: 22: 0x10c2dcb18 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_load_from_disk_and_cache_in_memory::>, core[7341f3703d0d347b]::result::Result> 23: 0x10c245038 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_execute_query::>, core[7341f3703d0d347b]::result::Result>> 24: 0x10c30c214 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::get_query:: 25: 0x10c56c008 - ::evaluate_obligation 26: 0x10cc98b2c - ::evaluate_obligation 27: 0x10cc98c14 - ::evaluate_obligation_no_overflow 28: 0x10cd4a8fc - ::process_trait_obligation 29: 0x10cd4a3d8 - ::process_obligation 30: 0x10cd0a918 - >::process_obligations::> 31: 0x10cd45d3c - ::select_where_possible 32: 0x10cd45c5c - ::select_all_or_error 33: 0x10cd45214 - ::select_all_or_error 34: 0x10ba8445c - ::enter::<(), rustc_typeck[a5d00582971cd053]::check::wfcheck::enter_wf_checking_ctxt::{closure#0}> 35: 0x10ba38718 - rustc_typeck[a5d00582971cd053]::check::wfcheck::check_well_formed 36: 0x10c486344 - >::with_task:: 37: 0x10c25fa88 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_execute_query::> 38: 0x10c30992c - rustc_query_system[f65373cf6a3466fe]::query::plumbing::get_query:: 39: 0x10b9d9dec - rustc_data_structures[309676ed709479c3]::sync::par_for_each_in::<&[rustc_hir[f788c0200d65aab0]::hir::ItemId], ::par_items::{closure#0}> 40: 0x10ba3e768 - rustc_typeck[a5d00582971cd053]::check::wfcheck::check_mod_type_wf 41: 0x10c486344 - >::with_task:: 42: 0x10c25fa88 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_execute_query::> 43: 0x10c3097f0 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::get_query:: 44: 0x10b9d9a5c - rustc_data_structures[309676ed709479c3]::sync::par_for_each_in::<&[rustc_span[81520514b41fb732]::def_id::LocalDefId], ::par_for_each_module::{closure#0}> 45: 0x10b9863d8 - ::track_errors:: 46: 0x10baa5acc - rustc_typeck[a5d00582971cd053]::check_crate 47: 0x1093e6830 - rustc_interface[2fa9866cf3cf12fa]::passes::analysis 48: 0x10c4a87dc - >::with_task::> 49: 0x10c2b52d0 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_execute_query::>> 50: 0x10c31c92c - rustc_query_system[f65373cf6a3466fe]::query::plumbing::get_query:: 51: 0x1093066f0 - ::enter::> 52: 0x1092db704 - rustc_interface[2fa9866cf3cf12fa]::interface::create_compiler_and_run::, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}> 53: 0x1093407d4 - >::set::, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>> 54: 0x10930a464 - std[65493a5d9e125887]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>> 55: 0x10930d2e8 - <::spawn_unchecked_, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>>::{closure#1} as core[7341f3703d0d347b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 56: 0x10156e550 - std::sys::unix::thread::Thread::new::thread_start::h24b04cb1ad6e937f 57: 0x1870a426c - __pthread_deallocate ```

tylerhawkes commented 2 years ago

I just rsync'd the code to an aws graviton instance (haven't done the work to cross-compile on my m1) and ran into the exact same issue on the other machine that had previously built the exact same code. This is using the stable compiler on aarch64-unknown-linux-gnu.

Backtrace

``` thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:23:85 stack backtrace: 0: rust_begin_unwind at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5 1: core::panicking::panic_fmt at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14 2: core::panicking::panic at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:48:5 3: ::def_path_hash_to_def_id 4: ::def_path_hash_to_def_id 5: as rustc_middle::dep_graph::dep_node::DepNodeExt>::extract_def_id 6: rustc_query_impl::query_callbacks::type_of::force_from_dep_node 7: ::try_force_from_dep_node 8: >::try_mark_previous_green:: 9: >::try_mark_previous_green:: 10: >::try_mark_previous_green:: 11: >::try_mark_previous_green:: 12: rustc_query_system::query::plumbing::try_load_from_disk_and_cache_in_memory::>, core::result::Result> 13: rustc_query_system::query::plumbing::get_query:: 14: ::evaluate_obligation 15: ::evaluate_obligation 16: ::evaluate_obligation_no_overflow 17: ::process_trait_obligation 18: ::process_obligation 19: >::process_obligations::> 20: ::select_where_possible 21: ::select_all_or_error 22: ::select_all_or_error 23: ::enter::<(), rustc_typeck::check::wfcheck::enter_wf_checking_ctxt::{closure#0}> 24: rustc_typeck::check::wfcheck::check_well_formed 25: >::with_task:: 26: rustc_query_system::query::plumbing::try_execute_query::> 27: rustc_query_system::query::plumbing::get_query:: 28: rustc_data_structures::sync::par_for_each_in::<&[rustc_hir::hir::ForeignItemId], ::par_foreign_items::{closure#0}> 29: rustc_typeck::check::wfcheck::check_mod_type_wf 30: >::with_task:: 31: rustc_query_system::query::plumbing::try_execute_query::> 32: rustc_query_system::query::plumbing::get_query:: 33: ::track_errors:: 34: rustc_typeck::check_crate 35: rustc_interface::passes::analysis 36: >::with_task::> 37: rustc_query_system::query::plumbing::try_execute_query::>> 38: rustc_query_system::query::plumbing::get_query:: 39: ::enter::> 40: ::enter::, rustc_errors::ErrorGuaranteed>> 41: rustc_span::with_source_map::, rustc_interface::interface::create_compiler_and_run, rustc_driver::run_compiler::{closure#1}>::{closure#1}> 42: >::set::, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>> note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md note: rustc 1.64.0 (a55dd71d5 2022-09-19) running on aarch64-unknown-linux-gnu note: compiler flags: --crate-type lib -C opt-level=3 -C lto=off -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=on -C linker=clang -C incremental -C link-arg=-fuse-ld=/usr/bin/mold -C target-cpu=native note: some of the compiler flags provided by cargo are hidden query stack during panic: #0 [evaluate_obligation] evaluating trait selection obligation `subgraph::UserComparison: core::marker::Sync` | = note: this failure-note originates in the attribute macro `entity` (in Nightly builds, run with -Z macro-backtrace for more info) #1 [check_well_formed] checking that `subgraph::` is well-formed #2 [check_mod_type_wf] checking that types are well-formed in module `subgraph` #3 [analysis] running analysis passes on this crate end of query stack ```

tylerhawkes commented 2 years ago

Turns out this is kind of reproducible. I just got a panic in a test crate and then compiled a crate that depends on on the library that generates code and ended up with this stack trace. They looked identical. All I did was rename some fields and a struct in the derived code.

Backtrace

``` thread 'rustc' panicked at 'Failed to extract DefId: local_def_id_to_hir_id a0695fa769b73be4-41ed76b2573fb53e', compiler/rustc_middle/src/dep_graph/dep_node.rs:267:17 stack backtrace: 0: 0x10513f774 - ::fmt::hc14c2fbe7eab7edd 1: 0x105189ca4 - core::fmt::write::hf7ba2d9322b02f7b 2: 0x105132714 - std::io::Write::write_fmt::hcbbe9804d68b1866 3: 0x105141ff0 - std::panicking::default_hook::{{closure}}::h074c918006a712d7 4: 0x105141d14 - std::panicking::default_hook::hcb4fc0515f47d0e1 5: 0x10ceb1c74 - rustc_driver[51b00cac61f89616]::DEFAULT_HOOK::{closure#0}::{closure#0} 6: 0x1051426b4 - std::panicking::rust_panic_with_hook::hda85dfcaf11e28f6 7: 0x105142560 - std::panicking::begin_panic_handler::{{closure}}::hacac2c8511d70f3d 8: 0x10513fbdc - std::sys_common::backtrace::__rust_end_short_backtrace::h1f4cf35d9dc62d33 9: 0x1051422b4 - _rust_begin_unwind 10: 0x1051b3714 - core::panicking::panic_fmt::h7cea19b1cbddf8d1 11: 0x110b90ecc - as rustc_middle[6ad8a970aa6bf88a]::dep_graph::dep_node::DepNodeExt>::extract_def_id::{closure#0} 12: 0x110b6b410 - ::def_path_hash_to_def_id 13: 0x110b90e4c - as rustc_middle[6ad8a970aa6bf88a]::dep_graph::dep_node::DepNodeExt>::extract_def_id 14: 0x1100f7308 - rustc_query_impl[bef29f7fed8c56d5]::plumbing::force_from_dep_node:: 15: 0x110b56ef4 - ::try_force_from_dep_node 16: 0x11004ecbc - >::try_mark_previous_green:: 17: 0x11004ec8c - >::try_mark_previous_green:: 18: 0x11004ec8c - >::try_mark_previous_green:: 19: 0x11004ec8c - >::try_mark_previous_green:: 20: 0x11004ec8c - >::try_mark_previous_green:: 21: 0x11004ec8c - >::try_mark_previous_green:: 22: 0x11004ec8c - >::try_mark_previous_green:: 23: 0x11004ec8c - >::try_mark_previous_green:: 24: 0x11004ec8c - >::try_mark_previous_green:: 25: 0x11004ec8c - >::try_mark_previous_green:: 26: 0x11001f108 - >::try_mark_green:: 27: 0x10feb8b18 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_load_from_disk_and_cache_in_memory::>, core[7341f3703d0d347b]::result::Result> 28: 0x10fe21038 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_execute_query::>, core[7341f3703d0d347b]::result::Result>> 29: 0x10fee8214 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::get_query:: 30: 0x110148008 - ::evaluate_obligation 31: 0x110874b2c - ::evaluate_obligation 32: 0x110874c14 - ::evaluate_obligation_no_overflow 33: 0x1109268fc - ::process_trait_obligation 34: 0x1109263d8 - ::process_obligation 35: 0x1108e6918 - >::process_obligations::> 36: 0x110921d3c - ::select_where_possible 37: 0x110921c5c - ::select_all_or_error 38: 0x110845d7c - ::enter::, rustc_middle[6ad8a970aa6bf88a]::traits::CodegenObligationError>, rustc_trait_selection[a20044fd431323a2]::traits::codegen::codegen_select_candidate::{closure#0}> 39: 0x1108983f8 - rustc_trait_selection[a20044fd431323a2]::traits::codegen::codegen_select_candidate 40: 0x10ff26134 - ::with_deps::<>::with_task_impl), core[7341f3703d0d347b]::result::Result<&rustc_middle[6ad8a970aa6bf88a]::traits::ImplSource<()>, rustc_middle[6ad8a970aa6bf88a]::traits::CodegenObligationError>>::{closure#0}, core[7341f3703d0d347b]::result::Result<&rustc_middle[6ad8a970aa6bf88a]::traits::ImplSource<()>, rustc_middle[6ad8a970aa6bf88a]::traits::CodegenObligationError>> 41: 0x11007e4d0 - >::with_task::), core[7341f3703d0d347b]::result::Result<&rustc_middle[6ad8a970aa6bf88a]::traits::ImplSource<()>, rustc_middle[6ad8a970aa6bf88a]::traits::CodegenObligationError>> 42: 0x10fe8342c - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_execute_query::), core[7341f3703d0d347b]::result::Result<&rustc_middle[6ad8a970aa6bf88a]::traits::ImplSource<()>, rustc_middle[6ad8a970aa6bf88a]::traits::CodegenObligationError>>> 43: 0x10fef0d78 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::get_query:: 44: 0x110147610 - ::codegen_select_candidate 45: 0x10f17e5ac - rustc_monomorphize[e2793dfaccd47a08]::custom_coerce_unsize_info 46: 0x10f16ee70 - rustc_monomorphize[e2793dfaccd47a08]::collector::find_vtable_types_for_unsizing 47: 0x10f16c958 - ::visit_rvalue 48: 0x10f173280 - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_neighbours 49: 0x10f1717e4 - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 50: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 51: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 52: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 53: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 54: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 55: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 56: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 57: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 58: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 59: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 60: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 61: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 62: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 63: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 64: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 65: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 66: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 67: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 68: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 69: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 70: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 71: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 72: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 73: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 74: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 75: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 76: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 77: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 78: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 79: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 80: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 81: 0x10f171c4c - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 82: 0x10f196054 - std[65493a5d9e125887]::panicking::try::<(), core[7341f3703d0d347b]::panic::unwind_safe::AssertUnwindSafe, rustc_monomorphize[e2793dfaccd47a08]::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#0}>> 83: 0x10f180d34 - ::time::<(), rustc_monomorphize[e2793dfaccd47a08]::collector::collect_crate_mono_items::{closure#1}> 84: 0x10f16f840 - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_crate_mono_items 85: 0x10f17d498 - rustc_monomorphize[e2793dfaccd47a08]::partitioning::collect_and_partition_mono_items 86: 0x11008d108 - >::with_task::>, &[rustc_middle[6ad8a970aa6bf88a]::mir::mono::CodegenUnit])> 87: 0x10fe9b6b4 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_execute_query::>, &[rustc_middle[6ad8a970aa6bf88a]::mir::mono::CodegenUnit])>> 88: 0x10fef5dd8 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::get_query:: 89: 0x110147e1c - ::collect_and_partition_mono_items 90: 0x10d09f084 - rustc_codegen_ssa[8a671eaa69332e41]::base::codegen_crate:: 91: 0x10d12c9ec - ::codegen_crate 92: 0x10cfc3b24 - ::time::, rustc_interface[2fa9866cf3cf12fa]::passes::start_codegen::{closure#0}> 93: 0x10cfc1df0 - ::enter::<::ongoing_codegen::{closure#0}::{closure#0}, core[7341f3703d0d347b]::result::Result, rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>> 94: 0x10cfa3678 - ::ongoing_codegen 95: 0x10ceb7744 - rustc_interface[2fa9866cf3cf12fa]::interface::create_compiler_and_run::, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}> 96: 0x10cf1c7d4 - >::set::, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>> 97: 0x10cee6464 - std[65493a5d9e125887]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>> 98: 0x10cee92e8 - <::spawn_unchecked_, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>>::{closure#1} as core[7341f3703d0d347b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 99: 0x10514a550 - std::sys::unix::thread::Thread::new::thread_start::h24b04cb1ad6e937f 100: 0x1870a426c - __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.65.0-beta.1 (2a65764f2 2022-09-19) running on aarch64-apple-darwin note: compiler flags: --crate-type lib -C opt-level=3 -C lto=off -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C debug-assertions=on -C linker=clang -C incremental=[REDACTED] -C link-arg=-fuse-ld=mold -C target-cpu=native note: some of the compiler flags provided by cargo are hidden query stack during panic: #0 [evaluate_obligation] evaluating trait selection obligation `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20, 't21, 't22, 't23, 't24> {core::future::ResumeTy, polarsync_core::graphql::GraphqlQueryBuilder, &'r async_graphql::context::ContextBase<'s, &'t0 async_graphql_parser::pos::Positioned>, &'t1 polarsync_core::types::H<20>, bool, polarsync_ethereum::network::block_number::EthereumBlockNumber, &'t2 str, core::option::Option, core::option::Option, polarsync_core::graphql::order_direction::GraphqlOrderDirection, core::option::Option, &'t3 polarsync_core::persistence::SharedPgPool, &'t4 async_graphql::dataloader::DataLoader, either::Either>, polarsync_core::sql::relational_query::RelationComparison<&'t6 polarsync_core::types::H<20>>>, &'t7 polarsync_core::persistence::table_descriptor::TableDescriptor, polarsync_core::persistence::partition_querying::ResolverLoadLocation, polarsync_core::sql::query_builder::QueryBuilder<'t8, polarsync_core::sql::query_builder::WhereClause, sqlx_core::query_builder::QueryBuilder<'t9, sqlx_core::postgres::database::Postgres>>, subgraph::LlamaPayContractComparison, core::pin::Pin Output = core::result::Result>, async_graphql::error::Error>> + core::marker::Send + 't12)>>, (), sqlx_core::query_builder::QueryBuilder<'t13, sqlx_core::postgres::database::Postgres>, &'t14 mut sqlx_core::query_builder::QueryBuilder<'t15, sqlx_core::postgres::database::Postgres>, sqlx_core::query::Query<'t16, sqlx_core::postgres::database::Postgres, sqlx_core::postgres::arguments::PgArguments>, impl for<'t17, 't18, 't19, 't20, 't21, 't22, 't23> core::future::future::Future::Row>, sqlx_core::error::Error>>, alloc::vec::Vec, impl for<'t24> core::future::future::Future::Graphql>, async_graphql::error::Error>>}: core::marker::Send` #1 [codegen_select_candidate] computing candidate for `>> as core::ops::unsize::CoerceUnsized, async_graphql::error::ServerError>> + core::marker::Send>>>>` #2 [collect_and_partition_mono_items] collect_and_partition_mono_items end of query stack thread 'rustc' panicked at 'Failed to extract DefId: local_def_id_to_hir_id a0695fa769b73be4-f9f27d77bc77eb68', compiler/rustc_middle/src/dep_graph/dep_node.rs:267:17 stack backtrace: 0: 0x10513f774 - ::fmt::hc14c2fbe7eab7edd 1: 0x105189ca4 - core::fmt::write::hf7ba2d9322b02f7b 2: 0x105132714 - std::io::Write::write_fmt::hcbbe9804d68b1866 3: 0x105141ff0 - std::panicking::default_hook::{{closure}}::h074c918006a712d7 4: 0x105141d14 - std::panicking::default_hook::hcb4fc0515f47d0e1 5: 0x10ceb1c74 - rustc_driver[51b00cac61f89616]::DEFAULT_HOOK::{closure#0}::{closure#0} 6: 0x1051426b4 - std::panicking::rust_panic_with_hook::hda85dfcaf11e28f6 7: 0x105142560 - std::panicking::begin_panic_handler::{{closure}}::hacac2c8511d70f3d 8: 0x10513fbdc - std::sys_common::backtrace::__rust_end_short_backtrace::h1f4cf35d9dc62d33 9: 0x1051422b4 - _rust_begin_unwind 10: 0x1051b3714 - core::panicking::panic_fmt::h7cea19b1cbddf8d1 11: 0x110b90ecc - as rustc_middle[6ad8a970aa6bf88a]::dep_graph::dep_node::DepNodeExt>::extract_def_id::{closure#0} 12: 0x110b6b410 - ::def_path_hash_to_def_id 13: 0x110b90e4c - as rustc_middle[6ad8a970aa6bf88a]::dep_graph::dep_node::DepNodeExt>::extract_def_id 14: 0x1100f7308 - rustc_query_impl[bef29f7fed8c56d5]::plumbing::force_from_dep_node:: 15: 0x110b56ef4 - ::try_force_from_dep_node 16: 0x11004ecbc - >::try_mark_previous_green:: 17: 0x11004ec8c - >::try_mark_previous_green:: 18: 0x11004ec8c - >::try_mark_previous_green:: 19: 0x11004ec8c - >::try_mark_previous_green:: 20: 0x11004ec8c - >::try_mark_previous_green:: 21: 0x11004ec8c - >::try_mark_previous_green:: 22: 0x11004ec8c - >::try_mark_previous_green:: 23: 0x11004ec8c - >::try_mark_previous_green:: 24: 0x11004ec8c - >::try_mark_previous_green:: 25: 0x11004ec8c - >::try_mark_previous_green:: 26: 0x11001f108 - >::try_mark_green:: 27: 0x10feb8b18 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_load_from_disk_and_cache_in_memory::>, core[7341f3703d0d347b]::result::Result> 28: 0x10fe21038 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_execute_query::>, core[7341f3703d0d347b]::result::Result>> 29: 0x10fee8214 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::get_query:: 30: 0x110148008 - ::evaluate_obligation 31: 0x110874b2c - ::evaluate_obligation 32: 0x110874c14 - ::evaluate_obligation_no_overflow 33: 0x1109268fc - ::process_trait_obligation 34: 0x1109263d8 - ::process_obligation 35: 0x1108e6918 - >::process_obligations::> 36: 0x110921d3c - ::select_where_possible 37: 0x110921c5c - ::select_all_or_error 38: 0x110845d7c - ::enter::, rustc_middle[6ad8a970aa6bf88a]::traits::CodegenObligationError>, rustc_trait_selection[a20044fd431323a2]::traits::codegen::codegen_select_candidate::{closure#0}> 39: 0x1108983f8 - rustc_trait_selection[a20044fd431323a2]::traits::codegen::codegen_select_candidate 40: 0x10ff26134 - ::with_deps::<>::with_task_impl), core[7341f3703d0d347b]::result::Result<&rustc_middle[6ad8a970aa6bf88a]::traits::ImplSource<()>, rustc_middle[6ad8a970aa6bf88a]::traits::CodegenObligationError>>::{closure#0}, core[7341f3703d0d347b]::result::Result<&rustc_middle[6ad8a970aa6bf88a]::traits::ImplSource<()>, rustc_middle[6ad8a970aa6bf88a]::traits::CodegenObligationError>> 41: 0x11007e4d0 - >::with_task::), core[7341f3703d0d347b]::result::Result<&rustc_middle[6ad8a970aa6bf88a]::traits::ImplSource<()>, rustc_middle[6ad8a970aa6bf88a]::traits::CodegenObligationError>> 42: 0x10fe8342c - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_execute_query::), core[7341f3703d0d347b]::result::Result<&rustc_middle[6ad8a970aa6bf88a]::traits::ImplSource<()>, rustc_middle[6ad8a970aa6bf88a]::traits::CodegenObligationError>>> 43: 0x10fef0d78 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::get_query:: 44: 0x110147610 - ::codegen_select_candidate 45: 0x10f17e5ac - rustc_monomorphize[e2793dfaccd47a08]::custom_coerce_unsize_info 46: 0x10f16ee70 - rustc_monomorphize[e2793dfaccd47a08]::collector::find_vtable_types_for_unsizing 47: 0x10f16c958 - ::visit_rvalue 48: 0x10f173280 - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_neighbours 49: 0x10f1717e4 - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_items_rec 50: 0x10f196054 - std[65493a5d9e125887]::panicking::try::<(), core[7341f3703d0d347b]::panic::unwind_safe::AssertUnwindSafe, rustc_monomorphize[e2793dfaccd47a08]::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#0}>> 51: 0x10f180d34 - ::time::<(), rustc_monomorphize[e2793dfaccd47a08]::collector::collect_crate_mono_items::{closure#1}> 52: 0x10f16f840 - rustc_monomorphize[e2793dfaccd47a08]::collector::collect_crate_mono_items 53: 0x10f17d498 - rustc_monomorphize[e2793dfaccd47a08]::partitioning::collect_and_partition_mono_items 54: 0x11008d108 - >::with_task::>, &[rustc_middle[6ad8a970aa6bf88a]::mir::mono::CodegenUnit])> 55: 0x10fe9b6b4 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::try_execute_query::>, &[rustc_middle[6ad8a970aa6bf88a]::mir::mono::CodegenUnit])>> 56: 0x10fef5dd8 - rustc_query_system[f65373cf6a3466fe]::query::plumbing::get_query:: 57: 0x110147e1c - ::collect_and_partition_mono_items 58: 0x10d09f084 - rustc_codegen_ssa[8a671eaa69332e41]::base::codegen_crate:: 59: 0x10d12c9ec - ::codegen_crate 60: 0x10cfc3b24 - ::time::, rustc_interface[2fa9866cf3cf12fa]::passes::start_codegen::{closure#0}> 61: 0x10cfc1df0 - ::enter::<::ongoing_codegen::{closure#0}::{closure#0}, core[7341f3703d0d347b]::result::Result, rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>> 62: 0x10cfa3678 - ::ongoing_codegen 63: 0x10ceb7744 - rustc_interface[2fa9866cf3cf12fa]::interface::create_compiler_and_run::, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}> 64: 0x10cf1c7d4 - >::set::, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>> 65: 0x10cee6464 - std[65493a5d9e125887]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>> 66: 0x10cee92e8 - <::spawn_unchecked_, rustc_driver[51b00cac61f89616]::run_compiler::{closure#1}>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>>::{closure#0}, core[7341f3703d0d347b]::result::Result<(), rustc_errors[e87086a6cb9e4ec1]::ErrorGuaranteed>>::{closure#1} as core[7341f3703d0d347b]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 67: 0x10514a550 - std::sys::unix::thread::Thread::new::thread_start::h24b04cb1ad6e937f 68: 0x1870a426c - __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.65.0-beta.1 (2a65764f2 2022-09-19) running on aarch64-apple-darwin note: compiler flags: --crate-type lib -C opt-level=3 -C lto=off -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C debug-assertions=on -C linker=clang -C incremental=[REDACTED] -C link-arg=-fuse-ld=mold -C target-cpu=native note: some of the compiler flags provided by cargo are hidden query stack during panic: #0 [evaluate_obligation] evaluating trait selection obligation `for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5, 't6, 't7, 't8, 't9, 't10, 't11, 't12, 't13, 't14, 't15, 't16, 't17, 't18, 't19, 't20> {core::future::ResumeTy, polarsync_core::graphql::GraphqlQueryBuilder, &'r async_graphql::context::ContextBase<'s, &'t0 async_graphql_parser::pos::Positioned>, polarsync_ethereum::network::block_number::EthereumBlockNumber, &'t1 polarsync_core::persistence::SharedPgPool, core::option::Option, core::option::Option, polarsync_core::graphql::order_direction::GraphqlOrderDirection, core::option::Option, &'t2 polarsync_core::persistence::table_descriptor::TableDescriptor, polarsync_core::persistence::partition_querying::ResolverLoadLocation, polarsync_core::sql::query_builder::QueryBuilder<'t3, polarsync_core::sql::query_builder::WhereClause, sqlx_core::query_builder::QueryBuilder<'t4, sqlx_core::postgres::database::Postgres>>, subgraph::LlamaPayFactoryComparison, bool, core::pin::Pin Output = core::result::Result>, async_graphql::error::Error>> + core::marker::Send + 't7)>>, (), sqlx_core::query_builder::QueryBuilder<'t8, sqlx_core::postgres::database::Postgres>, &'t9 mut sqlx_core::query_builder::QueryBuilder<'t10, sqlx_core::postgres::database::Postgres>, sqlx_core::query::Query<'t11, sqlx_core::postgres::database::Postgres, sqlx_core::postgres::arguments::PgArguments>, impl for<'t12, 't13, 't14, 't15, 't16, 't17, 't18> core::future::future::Future::Row>, sqlx_core::error::Error>>, alloc::vec::Vec, &'t19 async_graphql::dataloader::DataLoader, impl for<'t20> core::future::future::Future::Graphql>, async_graphql::error::Error>>}: core::marker::Send` #1 [codegen_select_candidate] computing candidate for `>> as core::ops::unsize::CoerceUnsized, async_graphql::error::ServerError>> + core::marker::Send>>>>` #2 [collect_and_partition_mono_items] collect_and_partition_mono_items end of query stack ```

kpreid commented 10 months ago

@rustbot label +A-incr-comp