Open thynson opened 8 months ago
I'm trying to make a small reproducible. Currently what can be provided is the following info:
rustc --version --verbose:
rustc --version --verbose
rustc 1.76.0 (07dca489a 2024-02-04)
thread 'rustc' panicked at compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs:22:85: called `Option::unwrap()` on a `None` value
``` stack backtrace: 0: 0x1048406b5 - ::fmt::hbd71adb7a72f4105 1: 0x10488d5a3 - core::fmt::write::h30346430340bc336 2: 0x104836a9e - std::io::Write::write_fmt::heb3d6316c565d5b1 3: 0x104840489 - std::sys_common::backtrace::print::h67e51ff2e3d5cfbd 4: 0x104843775 - std::panicking::default_hook::{{closure}}::hc666c9a55318d1f1 5: 0x1048434ee - std::panicking::default_hook::hf980b1da49948523 6: 0x10e30ef4e - as core[fdc98393f43b060c]::ops::function::Fn<(&dyn for<'a, 'b> core[fdc98393f43b060c]::ops::function::Fn<(&'a core[fdc98393f43b060c]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[fdc98393f43b060c]::marker::Send + core[fdc98393f43b060c]::marker::Sync, &core[fdc98393f43b060c]::panic::panic_info::PanicInfo)>>::call 7: 0x104843e35 - std::panicking::rust_panic_with_hook::h683bce980186bbbe 8: 0x104843b8c - std::panicking::begin_panic_handler::{{closure}}::ha6dbd11ba0ec8af1 9: 0x104840ba9 - std::sys_common::backtrace::__rust_end_short_backtrace::h889430bddc786c98 10: 0x104843902 - _rust_begin_unwind 11: 0x1048a9b05 - core::panicking::panic_fmt::hff768cef35397791 12: 0x1048a9bd7 - core::panicking::panic::h4b431f82891b8f60 13: 0x10ece03a8 - ::def_path_hash_to_def_id 14: 0x10ee4577c - ::def_path_hash_to_def_id 15: 0x10f74ce01 - ::{closure#0} as core[fdc98393f43b060c]::ops::function::FnOnce<(rustc_middle[461b0e2f47a02e98]::ty::context::TyCtxt, rustc_query_system[b3462f551eed1440]::dep_graph::dep_node::DepNode)>>::call_once 16: 0x10f7b030c - >::try_mark_previous_green:: 17: 0x10f7b036e - >::try_mark_previous_green:: 18: 0x10f7b036e - >::try_mark_previous_green:: 19: 0x10f7b036e - >::try_mark_previous_green:: 20: 0x10f7b036e - >::try_mark_previous_green:: 21: 0x10f7b036e - >::try_mark_previous_green:: 22: 0x10f7b036e - >::try_mark_previous_green:: 23: 0x10f7b036e - >::try_mark_previous_green:: 24: 0x10f7b036e - >::try_mark_previous_green:: 25: 0x10f7b036e - >::try_mark_previous_green:: 26: 0x10f7b036e - >::try_mark_previous_green:: 27: 0x10f7b036e - >::try_mark_previous_green:: 28: 0x10f7b036e - >::try_mark_previous_green:: 29: 0x10f7b036e - >::try_mark_previous_green:: 30: 0x10f7b00a6 - >::try_mark_green:: 31: 0x10f6cef4e - rustc_query_system[b3462f551eed1440]::query::plumbing::try_execute_query::>, rustc_middle[461b0e2f47a02e98]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[149d578d97f1150d]::plumbing::QueryCtxt, true> 32: 0x10f93a8c2 - rustc_query_impl[149d578d97f1150d]::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace 33: 0x10fe01c34 - ::evaluate_obligation 34: 0x10fe01ff1 - ::evaluate_obligation_no_overflow 35: 0x10fedeb11 - ::process_trait_obligation 36: 0x10fedd4c2 - ::process_obligation 37: 0x10fec448a - >::process_obligations:: 38: 0x10feda657 - ::select_where_possible 39: 0x10e609a93 - rustc_hir_analysis[53aeebf088699e77]::check::compare_impl_item::collect_return_position_impl_trait_in_trait_tys 40: 0x10f76a751 - rustc_query_impl[149d578d97f1150d]::plumbing::__rust_begin_short_backtrace::> 41: 0x10f946eef - >::call_once 42: 0x10f6f49b5 - rustc_query_system[b3462f551eed1440]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[149d578d97f1150d]::plumbing::QueryCtxt, true> 43: 0x10f6a8ad3 - rustc_query_system[b3462f551eed1440]::query::plumbing::force_query::>, false, false, false>, rustc_query_impl[149d578d97f1150d]::plumbing::QueryCtxt> 44: 0x10f74c219 - ::{closure#0} as core[fdc98393f43b060c]::ops::function::FnOnce<(rustc_middle[461b0e2f47a02e98]::ty::context::TyCtxt, rustc_query_system[b3462f551eed1440]::dep_graph::dep_node::DepNode)>>::call_once 45: 0x10f7b030c - >::try_mark_previous_green:: 46: 0x10f7b036e - >::try_mark_previous_green:: 47: 0x10f7b00a6 - >::try_mark_green:: 48: 0x10f6ac12d - rustc_query_system[b3462f551eed1440]::query::plumbing::ensure_must_run::>, false, false, false>, rustc_query_impl[149d578d97f1150d]::plumbing::QueryCtxt> 49: 0x10f91c246 - rustc_query_impl[149d578d97f1150d]::query_impl::check_mod_impl_wf::get_query_incr::__rust_end_short_backtrace 50: 0x10e623ea9 - ::for_each_module:: 51: 0x10e5d8d38 - rustc_hir_analysis[53aeebf088699e77]::check_crate 52: 0x10eb14cdf - rustc_interface[b53b3eb5bb998bb1]::passes::analysis 53: 0x10f76a96d - rustc_query_impl[149d578d97f1150d]::plumbing::__rust_begin_short_backtrace::> 54: 0x10f8015e9 - >::call_once 55: 0x10f6b3a23 - rustc_query_system[b3462f551eed1440]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[149d578d97f1150d]::plumbing::QueryCtxt, true> 56: 0x10f90b714 - rustc_query_impl[149d578d97f1150d]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace 57: 0x10e2a8151 - ::enter::> 58: 0x10e2d4b72 - ::enter::, rustc_span[bbb3e06ffdf798f9]::ErrorGuaranteed>> 59: 0x10e2c0672 - rustc_span[bbb3e06ffdf798f9]::create_session_globals_then::, rustc_interface[b53b3eb5bb998bb1]::interface::run_compiler, rustc_driver_impl[12f52051d44d1c06]::run_compiler::{closure#0}>::{closure#0}> 60: 0x10e2fff75 - std[ccb858c55971878c]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[12f52051d44d1c06]::run_compiler::{closure#0}>::{closure#0}, core[fdc98393f43b060c]::result::Result<(), rustc_span[bbb3e06ffdf798f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[fdc98393f43b060c]::result::Result<(), rustc_span[bbb3e06ffdf798f9]::ErrorGuaranteed>> 61: 0x10e2ca16e - <::spawn_unchecked_, rustc_driver_impl[12f52051d44d1c06]::run_compiler::{closure#0}>::{closure#0}, core[fdc98393f43b060c]::result::Result<(), rustc_span[bbb3e06ffdf798f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[fdc98393f43b060c]::result::Result<(), rustc_span[bbb3e06ffdf798f9]::ErrorGuaranteed>>::{closure#1} as core[fdc98393f43b060c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 62: 0x10484d249 - std::sys::unix::thread::Thread::new::thread_start::hcdd70219a480b010 63: 0x7ff81aee0202 - __pthread_start 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 x86_64-apple-darwin note: compiler flags: --crate-type bin -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 ```
I tried to reproduce it with rust 1.75.0, and it succeeded, then I switched back to rust 1.76.0 and the panic cannot be reproduced anymore.
I'm trying to make a small reproducible. Currently what can be provided is the following info:
Meta
rustc --version --verbose
:Error output
Backtrace
``` stack backtrace: 0: 0x1048406b5 -::fmt::hbd71adb7a72f4105
1: 0x10488d5a3 - core::fmt::write::h30346430340bc336
2: 0x104836a9e - std::io::Write::write_fmt::heb3d6316c565d5b1
3: 0x104840489 - std::sys_common::backtrace::print::h67e51ff2e3d5cfbd
4: 0x104843775 - std::panicking::default_hook::{{closure}}::hc666c9a55318d1f1
5: 0x1048434ee - std::panicking::default_hook::hf980b1da49948523
6: 0x10e30ef4e - as core[fdc98393f43b060c]::ops::function::Fn<(&dyn for<'a, 'b> core[fdc98393f43b060c]::ops::function::Fn<(&'a core[fdc98393f43b060c]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[fdc98393f43b060c]::marker::Send + core[fdc98393f43b060c]::marker::Sync, &core[fdc98393f43b060c]::panic::panic_info::PanicInfo)>>::call
7: 0x104843e35 - std::panicking::rust_panic_with_hook::h683bce980186bbbe
8: 0x104843b8c - std::panicking::begin_panic_handler::{{closure}}::ha6dbd11ba0ec8af1
9: 0x104840ba9 - std::sys_common::backtrace::__rust_end_short_backtrace::h889430bddc786c98
10: 0x104843902 - _rust_begin_unwind
11: 0x1048a9b05 - core::panicking::panic_fmt::hff768cef35397791
12: 0x1048a9bd7 - core::panicking::panic::h4b431f82891b8f60
13: 0x10ece03a8 - ::def_path_hash_to_def_id
14: 0x10ee4577c - ::def_path_hash_to_def_id
15: 0x10f74ce01 - ::{closure#0} as core[fdc98393f43b060c]::ops::function::FnOnce<(rustc_middle[461b0e2f47a02e98]::ty::context::TyCtxt, rustc_query_system[b3462f551eed1440]::dep_graph::dep_node::DepNode)>>::call_once
16: 0x10f7b030c - >::try_mark_previous_green::
17: 0x10f7b036e - >::try_mark_previous_green::
18: 0x10f7b036e - >::try_mark_previous_green::
19: 0x10f7b036e - >::try_mark_previous_green::
20: 0x10f7b036e - >::try_mark_previous_green::
21: 0x10f7b036e - >::try_mark_previous_green::
22: 0x10f7b036e - >::try_mark_previous_green::
23: 0x10f7b036e - >::try_mark_previous_green::
24: 0x10f7b036e - >::try_mark_previous_green::
25: 0x10f7b036e - >::try_mark_previous_green::
26: 0x10f7b036e - >::try_mark_previous_green::
27: 0x10f7b036e - >::try_mark_previous_green::
28: 0x10f7b036e - >::try_mark_previous_green::
29: 0x10f7b036e - >::try_mark_previous_green::
30: 0x10f7b00a6 - >::try_mark_green::
31: 0x10f6cef4e - rustc_query_system[b3462f551eed1440]::query::plumbing::try_execute_query::>, rustc_middle[461b0e2f47a02e98]::query::erase::Erased<[u8; 2usize]>>, false, false, false>, rustc_query_impl[149d578d97f1150d]::plumbing::QueryCtxt, true>
32: 0x10f93a8c2 - rustc_query_impl[149d578d97f1150d]::query_impl::evaluate_obligation::get_query_incr::__rust_end_short_backtrace
33: 0x10fe01c34 - ::evaluate_obligation
34: 0x10fe01ff1 - ::evaluate_obligation_no_overflow
35: 0x10fedeb11 - ::process_trait_obligation
36: 0x10fedd4c2 - ::process_obligation
37: 0x10fec448a - >::process_obligations::
38: 0x10feda657 - ::select_where_possible
39: 0x10e609a93 - rustc_hir_analysis[53aeebf088699e77]::check::compare_impl_item::collect_return_position_impl_trait_in_trait_tys
40: 0x10f76a751 - rustc_query_impl[149d578d97f1150d]::plumbing::__rust_begin_short_backtrace::>
41: 0x10f946eef - >::call_once
42: 0x10f6f49b5 - rustc_query_system[b3462f551eed1440]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[149d578d97f1150d]::plumbing::QueryCtxt, true>
43: 0x10f6a8ad3 - rustc_query_system[b3462f551eed1440]::query::plumbing::force_query::>, false, false, false>, rustc_query_impl[149d578d97f1150d]::plumbing::QueryCtxt>
44: 0x10f74c219 - ::{closure#0} as core[fdc98393f43b060c]::ops::function::FnOnce<(rustc_middle[461b0e2f47a02e98]::ty::context::TyCtxt, rustc_query_system[b3462f551eed1440]::dep_graph::dep_node::DepNode)>>::call_once
45: 0x10f7b030c - >::try_mark_previous_green::
46: 0x10f7b036e - >::try_mark_previous_green::
47: 0x10f7b00a6 - >::try_mark_green::
48: 0x10f6ac12d - rustc_query_system[b3462f551eed1440]::query::plumbing::ensure_must_run::>, false, false, false>, rustc_query_impl[149d578d97f1150d]::plumbing::QueryCtxt>
49: 0x10f91c246 - rustc_query_impl[149d578d97f1150d]::query_impl::check_mod_impl_wf::get_query_incr::__rust_end_short_backtrace
50: 0x10e623ea9 - ::for_each_module::
51: 0x10e5d8d38 - rustc_hir_analysis[53aeebf088699e77]::check_crate
52: 0x10eb14cdf - rustc_interface[b53b3eb5bb998bb1]::passes::analysis
53: 0x10f76a96d - rustc_query_impl[149d578d97f1150d]::plumbing::__rust_begin_short_backtrace::>
54: 0x10f8015e9 - >::call_once
55: 0x10f6b3a23 - rustc_query_system[b3462f551eed1440]::query::plumbing::try_execute_query::>, false, false, false>, rustc_query_impl[149d578d97f1150d]::plumbing::QueryCtxt, true>
56: 0x10f90b714 - rustc_query_impl[149d578d97f1150d]::query_impl::analysis::get_query_incr::__rust_end_short_backtrace
57: 0x10e2a8151 - ::enter::>
58: 0x10e2d4b72 - ::enter::, rustc_span[bbb3e06ffdf798f9]::ErrorGuaranteed>>
59: 0x10e2c0672 - rustc_span[bbb3e06ffdf798f9]::create_session_globals_then::, rustc_interface[b53b3eb5bb998bb1]::interface::run_compiler, rustc_driver_impl[12f52051d44d1c06]::run_compiler::{closure#0}>::{closure#0}>
60: 0x10e2fff75 - std[ccb858c55971878c]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver_impl[12f52051d44d1c06]::run_compiler::{closure#0}>::{closure#0}, core[fdc98393f43b060c]::result::Result<(), rustc_span[bbb3e06ffdf798f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[fdc98393f43b060c]::result::Result<(), rustc_span[bbb3e06ffdf798f9]::ErrorGuaranteed>>
61: 0x10e2ca16e - <::spawn_unchecked_, rustc_driver_impl[12f52051d44d1c06]::run_compiler::{closure#0}>::{closure#0}, core[fdc98393f43b060c]::result::Result<(), rustc_span[bbb3e06ffdf798f9]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[fdc98393f43b060c]::result::Result<(), rustc_span[bbb3e06ffdf798f9]::ErrorGuaranteed>>::{closure#1} as core[fdc98393f43b060c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
62: 0x10484d249 - std::sys::unix::thread::Thread::new::thread_start::hcdd70219a480b010
63: 0x7ff81aee0202 - __pthread_start
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 x86_64-apple-darwin
note: compiler flags: --crate-type bin -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
```