Sorry, but I'm unable to provide reproducible here. AFAICT, the ICE happens after merging a branch and then cargo build, and it persists until running cargo clean.
Meta
rustc --version --verbose:
cargo 1.76.0 (c84b36747 2024-01-18)
Error output
thread 'rustc' panicked at compiler/rustc_middle/src/dep_graph/dep_node.rs:198:17:
Failed to extract DefId: def_kind a21015eb3ae0d18d-789660714c7f911e
Code
Sorry, but I'm unable to provide reproducible here. AFAICT, the ICE happens after merging a branch and then
cargo build
, and it persists until runningcargo clean
.Meta
rustc --version --verbose
:Error output
Backtrace
``` stack backtrace: 0: 0x101460594 -::fmt::hb478ebbfb46e27ce
1: 0x1014a29ac - core::fmt::write::he4d5fa2daff1f531
2: 0x101456d9c - std::io::Write::write_fmt::hc5a47a68eba63d9f
3: 0x1014603c8 - std::sys_common::backtrace::print::h79bd952cc5812e7a
4: 0x101462e90 - std::panicking::default_hook::{{closure}}::h82301f6222887737
5: 0x101462bd8 - std::panicking::default_hook::h1e49abbb3f1d7dbf
6: 0x109b7e070 - as core[18650a1770591c75]::ops::function::Fn<(&dyn for<'a, 'b> core[18650a1770591c75]::ops::function::Fn<(&'a core[18650a1770591c75]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[18650a1770591c75]::marker::Sync + core[18650a1770591c75]::marker::Send, &core[18650a1770591c75]::panic::panic_info::PanicInfo)>>::call
7: 0x101463528 - std::panicking::rust_panic_with_hook::h1e70c5d905e30e9d
8: 0x1014632e4 - std::panicking::begin_panic_handler::{{closure}}::h399e32952efd26a4
9: 0x101460a18 - std::sys_common::backtrace::__rust_end_short_backtrace::h2ab87f841a2323e7
10: 0x10146306c - _rust_begin_unwind
11: 0x1014bcbd0 - core::panicking::panic_fmt::h33e40d2a93cab78f
12: 0x10dcbe7a8 - ::extract_def_id::{closure#0}
13: 0x10dc20670 - ::def_path_hash_to_def_id
14: 0x10dcbe738 - ::extract_def_id
15: 0x10cfde354 - ::{closure#0} as core[18650a1770591c75]::ops::function::FnOnce<(rustc_middle[35a781f9bda42497]::ty::context::TyCtxt, rustc_query_system[201a503e095b67cb]::dep_graph::dep_node::DepNode)>>::call_once
16: 0x10d065f1c - >::try_mark_previous_green::
17: 0x10d065f64 - >::try_mark_previous_green::
18: 0x10d065f64 - >::try_mark_previous_green::
19: 0x10d065f64 - >::try_mark_previous_green::
20: 0x10d065f64 - >::try_mark_previous_green::
21: 0x10d065f64 - >::try_mark_previous_green::
22: 0x10d065f64 - >::try_mark_previous_green::
23: 0x10d065f64 - >::try_mark_previous_green::
24: 0x10d065f64 - >::try_mark_previous_green::
25: 0x10d065f64 - >::try_mark_previous_green::
26: 0x10d065f64 - >::try_mark_previous_green::
27: 0x10d065f64 - >::try_mark_previous_green::
28: 0x10d065f64 - >::try_mark_previous_green::
29: 0x10d065f64 - >::try_mark_previous_green::
30: 0x10d065f64 - >::try_mark_previous_green::
31: 0x10d065cf4 - >::try_mark_green::
32: 0x10cf7d96c - rustc_query_system[201a503e095b67cb]::query::plumbing::try_execute_query::>, rustc_middle[35a781f9bda42497]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[ab66d2f3916826ca]::plumbing::QueryCtxt, true>
33: 0x10d19560c - rustc_query_impl[ab66d2f3916826ca]::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
34: 0x10d334b34 - ::evaluate_obligation
35: 0x10d334d54 - ::evaluate_obligation_no_overflow
36: 0x10d3e1aa4 - ::process_trait_obligation
37: 0x10d3e0a00 - ::process_obligation
38: 0x10d3d3e10 - >::process_obligations::
39: 0x10d3df59c - ::select_where_possible
40: 0x10d3ade28 - ::select_all_or_error
41: 0x10c439ed0 - rustc_hir_analysis[ce071f7e1f2c6ad1]::check::compare_impl_item::collect_return_position_impl_trait_in_trait_tys
42: 0x10cff89fc - rustc_query_impl[ab66d2f3916826ca]::plumbing::__rust_begin_short_backtrace::>
43: 0x10d03ffcc - >::call_once
44: 0x10cf9a12c - rustc_query_system[201a503e095b67cb]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ab66d2f3916826ca]::plumbing::QueryCtxt, true>
45: 0x10cf5d6f8 - rustc_query_system[201a503e095b67cb]::query::plumbing::force_query::>, false, false, false>, rustc_query_impl[ab66d2f3916826ca]::plumbing::QueryCtxt>
46: 0x10cfdd8f0 - ::{closure#0} as core[18650a1770591c75]::ops::function::FnOnce<(rustc_middle[35a781f9bda42497]::ty::context::TyCtxt, rustc_query_system[201a503e095b67cb]::dep_graph::dep_node::DepNode)>>::call_once
47: 0x10d065f1c - >::try_mark_previous_green::
48: 0x10d065f64 - >::try_mark_previous_green::
49: 0x10d065cf4 - >::try_mark_green::
50: 0x10cf60d50 - rustc_query_system[201a503e095b67cb]::query::plumbing::ensure_must_run::>, false, false, false>, rustc_query_impl[ab66d2f3916826ca]::plumbing::QueryCtxt>
51: 0x10d17b708 - rustc_query_impl[ab66d2f3916826ca]::query_impl::check_mod_impl_wf::get_query_incr::__rust_end_short_backtrace
52: 0x10c461944 - ::for_each_module::
53: 0x10c4e3350 - rustc_hir_analysis[ce071f7e1f2c6ad1]::check_crate
54: 0x109ce6b7c - rustc_interface[9ecbacebda51131]::passes::analysis
55: 0x10cff8c98 - rustc_query_impl[ab66d2f3916826ca]::plumbing::__rust_begin_short_backtrace::>
56: 0x10d16998c - >::call_once
57: 0x10cf67c00 - rustc_query_system[201a503e095b67cb]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ab66d2f3916826ca]::plumbing::QueryCtxt, true>
58: 0x10d16d268 - rustc_query_impl[ab66d2f3916826ca]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
59: 0x109b63978 - ::enter::>
60: 0x109ba46f8 - ::enter::, rustc_span[d844dabcc0d15e78]::ErrorGuaranteed>>
61: 0x109b6b06c - rustc_span[d844dabcc0d15e78]::create_session_globals_then::, rustc_interface[9ecbacebda51131]::interface::run_compiler, rustc_driver_impl[d723ad74a265baf3]::run_compiler::{closure#0}>::{closure#0}>
62: 0x109ba1628 - std[fcd23fca98dce159]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[d723ad74a265baf3]::run_compiler::{closure#0}>::{closure#0}, core[18650a1770591c75]::result::Result<(), rustc_span[d844dabcc0d15e78]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[18650a1770591c75]::result::Result<(), rustc_span[d844dabcc0d15e78]::ErrorGuaranteed>>
63: 0x109b73d7c - <::spawn_unchecked_, rustc_driver_impl[d723ad74a265baf3]::run_compiler::{closure#0}>::{closure#0}, core[18650a1770591c75]::result::Result<(), rustc_span[d844dabcc0d15e78]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[18650a1770591c75]::result::Result<(), rustc_span[d844dabcc0d15e78]::ErrorGuaranteed>>::{closure#1} as core[18650a1770591c75]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
64: 0x10146b7d0 - std::sys::unix::thread::Thread::new::thread_start::h8dda2af345bab446
65: 0x18243bfa8 - __pthread_joiner_wake
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.76.0 (07dca489a 2024-02-04) running on aarch64-apple-darwin
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `{coroutine witness@service_discovery::static_discovery::StaticServiceRegistryBuilder::spawn_task::{closure#0}}: core::marker::Send`
#1 [collect_return_position_impl_trait_in_trait_tys] comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process
#2 [analysis] running analysis passes on this crate
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 type_of(thread 'rustc' panicked at compiler/rustc_middle/src/dep_graph/dep_node.rs:198:17:
Failed to extract DefId: type_of a21015eb3ae0d18d-789660714c7f911e
stack backtrace:
0: 0x101460594 - ::fmt::hb478ebbfb46e27ce
1: 0x1014a29ac - core::fmt::write::he4d5fa2daff1f531
2: 0x101456d9c - std::io::Write::write_fmt::hc5a47a68eba63d9f
3: 0x1014603c8 - std::sys_common::backtrace::print::h79bd952cc5812e7a
4: 0x101462e90 - std::panicking::default_hook::{{closure}}::h82301f6222887737
5: 0x101462bd8 - std::panicking::default_hook::h1e49abbb3f1d7dbf
6: 0x109b7e070 - as core[18650a1770591c75]::ops::function::Fn<(&dyn for<'a, 'b> core[18650a1770591c75]::ops::function::Fn<(&'a core[18650a1770591c75]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[18650a1770591c75]::marker::Sync + core[18650a1770591c75]::marker::Send, &core[18650a1770591c75]::panic::panic_info::PanicInfo)>>::call
7: 0x101463528 - std::panicking::rust_panic_with_hook::h1e70c5d905e30e9d
8: 0x1014632e4 - std::panicking::begin_panic_handler::{{closure}}::h399e32952efd26a4
9: 0x101460a18 - std::sys_common::backtrace::__rust_end_short_backtrace::h2ab87f841a2323e7
10: 0x10146306c - _rust_begin_unwind
11: 0x1014bcbd0 - core::panicking::panic_fmt::h33e40d2a93cab78f
12: 0x10dcbe7a8 - ::extract_def_id::{closure#0}
13: 0x10dc20670 - ::def_path_hash_to_def_id
14: 0x10dcbe738 - ::extract_def_id
15: 0x109d3f524 - rustc_interface[9ecbacebda51131]::callbacks::dep_node_debug
16: 0x10ddb2ef4 - ::fmt
17: 0x1014a29ac - core::fmt::write::he4d5fa2daff1f531
18: 0x101454f60 - <&std::io::stdio::Stderr as std::io::Write>::write_fmt::he1949e2e69580cce
19: 0x101455868 - std::io::stdio::_eprint::h1c951d35316f84c2
20: 0x10e1f7454 - rustc_query_system[201a503e095b67cb]::dep_graph::graph::print_markframe_trace::
21: 0x10d0665c8 - >::try_mark_previous_green::
22: 0x10d065f64 - >::try_mark_previous_green::
23: 0x10d065f64 - >::try_mark_previous_green::
24: 0x10d065f64 - >::try_mark_previous_green::
25: 0x10d065f64 - >::try_mark_previous_green::
26: 0x10d065f64 - >::try_mark_previous_green::
27: 0x10d065f64 - >::try_mark_previous_green::
28: 0x10d065f64 - >::try_mark_previous_green::
29: 0x10d065f64 - >::try_mark_previous_green::
30: 0x10d065f64 - >::try_mark_previous_green::
31: 0x10d065f64 - >::try_mark_previous_green::
32: 0x10d065f64 - >::try_mark_previous_green::
33: 0x10d065f64 - >::try_mark_previous_green::
34: 0x10d065f64 - >::try_mark_previous_green::
35: 0x10d065f64 - >::try_mark_previous_green::
36: 0x10d065cf4 - >::try_mark_green::
37: 0x10cf7d96c - rustc_query_system[201a503e095b67cb]::query::plumbing::try_execute_query::>, rustc_middle[35a781f9bda42497]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[ab66d2f3916826ca]::plumbing::QueryCtxt, true>
38: 0x10d19560c - rustc_query_impl[ab66d2f3916826ca]::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
39: 0x10d334b34 - ::evaluate_obligation
40: 0x10d334d54 - ::evaluate_obligation_no_overflow
41: 0x10d3e1aa4 - ::process_trait_obligation
42: 0x10d3e0a00 - ::process_obligation
43: 0x10d3d3e10 - >::process_obligations::
44: 0x10d3df59c - ::select_where_possible
45: 0x10d3ade28 - ::select_all_or_error
46: 0x10c439ed0 - rustc_hir_analysis[ce071f7e1f2c6ad1]::check::compare_impl_item::collect_return_position_impl_trait_in_trait_tys
47: 0x10cff89fc - rustc_query_impl[ab66d2f3916826ca]::plumbing::__rust_begin_short_backtrace::>
48: 0x10d03ffcc - >::call_once
49: 0x10cf9a12c - rustc_query_system[201a503e095b67cb]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ab66d2f3916826ca]::plumbing::QueryCtxt, true>
50: 0x10cf5d6f8 - rustc_query_system[201a503e095b67cb]::query::plumbing::force_query::>, false, false, false>, rustc_query_impl[ab66d2f3916826ca]::plumbing::QueryCtxt>
51: 0x10cfdd8f0 - ::{closure#0} as core[18650a1770591c75]::ops::function::FnOnce<(rustc_middle[35a781f9bda42497]::ty::context::TyCtxt, rustc_query_system[201a503e095b67cb]::dep_graph::dep_node::DepNode)>>::call_once
52: 0x10d065f1c - >::try_mark_previous_green::
53: 0x10d065f64 - >::try_mark_previous_green::
54: 0x10d065cf4 - >::try_mark_green::
55: 0x10cf60d50 - rustc_query_system[201a503e095b67cb]::query::plumbing::ensure_must_run::>, false, false, false>, rustc_query_impl[ab66d2f3916826ca]::plumbing::QueryCtxt>
56: 0x10d17b708 - rustc_query_impl[ab66d2f3916826ca]::query_impl::check_mod_impl_wf::get_query_incr::__rust_end_short_backtrace
57: 0x10c461944 - ::for_each_module::
58: 0x10c4e3350 - rustc_hir_analysis[ce071f7e1f2c6ad1]::check_crate
59: 0x109ce6b7c - rustc_interface[9ecbacebda51131]::passes::analysis
60: 0x10cff8c98 - rustc_query_impl[ab66d2f3916826ca]::plumbing::__rust_begin_short_backtrace::>
61: 0x10d16998c - >::call_once
62: 0x10cf67c00 - rustc_query_system[201a503e095b67cb]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[ab66d2f3916826ca]::plumbing::QueryCtxt, true>
63: 0x10d16d268 - rustc_query_impl[ab66d2f3916826ca]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
64: 0x109b63978 - ::enter::>
65: 0x109ba46f8 - ::enter::, rustc_span[d844dabcc0d15e78]::ErrorGuaranteed>>
66: 0x109b6b06c - rustc_span[d844dabcc0d15e78]::create_session_globals_then::, rustc_interface[9ecbacebda51131]::interface::run_compiler, rustc_driver_impl[d723ad74a265baf3]::run_compiler::{closure#0}>::{closure#0}>
67: 0x109ba1628 - std[fcd23fca98dce159]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[d723ad74a265baf3]::run_compiler::{closure#0}>::{closure#0}, core[18650a1770591c75]::result::Result<(), rustc_span[d844dabcc0d15e78]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[18650a1770591c75]::result::Result<(), rustc_span[d844dabcc0d15e78]::ErrorGuaranteed>>
68: 0x109b73d7c - <::spawn_unchecked_, rustc_driver_impl[d723ad74a265baf3]::run_compiler::{closure#0}>::{closure#0}, core[18650a1770591c75]::result::Result<(), rustc_span[d844dabcc0d15e78]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[18650a1770591c75]::result::Result<(), rustc_span[d844dabcc0d15e78]::ErrorGuaranteed>>::{closure#1} as core[18650a1770591c75]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
69: 0x10146b7d0 - std::sys::unix::thread::Thread::new::thread_start::h8dda2af345bab446
70: 0x18243bfa8 - __pthread_joiner_wake
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.76.0 (07dca489a 2024-02-04) running on aarch64-apple-darwin
note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED]
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `{coroutine witness@service_discovery::static_discovery::StaticServiceRegistryBuilder::spawn_task::{closure#0}}: core::marker::Send`
#1 [collect_return_position_impl_trait_in_trait_tys] comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process
#2 [analysis] running analysis passes on this crate
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 type_of(quic_load_balancer[a210]::static_service_discovery::{impl#2}::{opaque#0})
#1 check_mod_impl_wf(quic_load_balancer[a210]::static_service_discovery)
end of try_mark_green dep node stack
```