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

-Z meta-stats + RUSTC_LOG=info ICEs on next build #135935

Open
klensy opened this issue Jan 23, 2025 · 2 comments
Open

-Z meta-stats + RUSTC_LOG=info ICEs on next build #135935

klensy opened this issue Jan 23, 2025 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. S-has-bisection Status: a bisection has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@klensy
Copy link
Contributor

klensy commented Jan 23, 2025

  1. run cargo new --bin meta to prepare.

main.rs:

fn main() {
    println!("Hello, world!");
} 
  1. first run RUSTC_LOG=info RUSTFLAGS=-Zmeta-stats cargo b
  2. next run cargo b, which ICEs.

Meta

rustc --version --verbose:

rustc 1.86.0-nightly (649b995a9 2025-01-22)
binary: rustc
commit-hash: 649b995a9febd658b2570160703dff6fdc038ab2
commit-date: 2025-01-22
host: x86_64-pc-windows-msvc
release: 1.86.0-nightly
LLVM version: 19.1.7
Backtrace

thread 'rustc' panicked at compiler\rustc_errors\src\lib.rs:645:17:
`trimmed_def_paths` called, diagnostics were expected but none were emitted. Use `with_no_trimmed_paths` for debugging. Backtraces are currently disabled: set `RUST_BACKTRACE=1` and re-run to see where it happened.
stack backtrace:
   0:     0x7ffc38211473 - std::backtrace_rs::backtrace::dbghelp64::trace
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
   1:     0x7ffc38211473 - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ffc38211473 - std::backtrace::Backtrace::create
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\backtrace.rs:331
   3:     0x7ffc382113ba - std::backtrace::Backtrace::force_capture
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\backtrace.rs:312
   4:     0x7ffc3983d05b - core[991f9e90141a1bf]::slice::sort::unstable::heapsort::heapsort::<((rustc_lint_defs[bb1ce1a6c5adb18f]::Level, &str), usize), <((rustc_lint_defs[bb1ce1a6c5adb18f]::Level, &str), usize) as core[991f9e90141a1bf]::cmp::PartialOrd>::lt>
   5:     0x7ffc3822d61e - alloc::boxed::impl$30::call
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\alloc\src\boxed.rs:2027
   6:     0x7ffc3822d61e - std::panicking::rust_panic_with_hook
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\panicking.rs:839
   7:     0x7ffc3822d379 - std::panicking::begin_panic_handler::closure$0
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\panicking.rs:704
   8:     0x7ffc3822a77f - std::sys::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\sys\backtrace.rs:168
   9:     0x7ffc3822cf7e - std::panicking::begin_panic_handler
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\panicking.rs:695
  10:     0x7ffc3b0fed41 - core::panicking::panic_fmt
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\core\src\panicking.rs:75
  11:     0x7ffc38199a51 - <rustc_errors[42171fc74e8af5b8]::DiagCtxtInner as core[991f9e90141a1bf]::ops::drop::Drop>::drop
  12:     0x7ffc35215040 - _rust_alloc_error_handler
  13:     0x7ffc3523956d - _rust_alloc_error_handler
  14:     0x7ffc35236ca6 - _rust_alloc_error_handler
  15:     0x7ffc35247492 - RINvNtNtCsdilRq3JDxER_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6threadNtB1h_7Builder16spawn_unchecked_INtNtCs3tVoUkX7Cwz_5alloc5boxed3BoxDINtNtNtCsOWpfTZVyMJ_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECslzhJ
  16:     0x7ffc35240259 - RINvNtNtCsdilRq3JDxER_3std3sys9backtrace28___rust_begin_short_backtraceNCNCINvNtCs3zgY6wvIJ9S_15rustc_interface4util26run_in_thread_with_globalsNCINvB1e_31run_in_thread_pool_with_globalsNCINvNtB1g_9interface12run_compileruNCNvCslzhJIxFyRmJ_17rustc_driver_i
  17:     0x7ffc35253583 - RINvNtNtCsdilRq3JDxER_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6threadNtB1h_7Builder16spawn_unchecked_INtNtCs3tVoUkX7Cwz_5alloc5boxed3BoxDINtNtNtCsOWpfTZVyMJ_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECslzhJ
  18:     0x7ffc3823f6ad - alloc::boxed::impl$28::call_once
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\alloc\src\boxed.rs:2013
  19:     0x7ffc3823f6ad - alloc::boxed::impl$28::call_once
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\alloc\src\boxed.rs:2013
  20:     0x7ffc3823f6ad - std::sys::pal::windows::thread::impl$0::new::thread_start
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\sys\pal\windows\thread.rs:56
  21:     0x7ffc97117374 - BaseThreadInitThunk
  22:     0x7ffc9725cc91 - RtlUserThreadStart


rustc version: 1.86.0-nightly (649b995a9 2025-01-22)
platform: x86_64-pc-windows-msvc

Backtrace with RUST_BACKTRACE=1

thread 'rustc' panicked at compiler\rustc_errors\src\lib.rs:645:17:
`trimmed_def_paths` called, diagnostics were expected but none were emitted. Use `with_no_trimmed_paths` for debugging. This happened in the following `must_produce_diag` call's backtrace:
   0: std::backtrace_rs::backtrace::dbghelp64::trace
             at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
   1: std::backtrace_rs::backtrace::trace_unsynchronized
             at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2: std::backtrace::Backtrace::create
             at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\backtrace.rs:331
   3: std::backtrace::Backtrace::capture
             at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\backtrace.rs:296
   4: <rustc_errors::DiagCtxtHandle>::set_must_produce_diag
   5: <rustc_session::session::Session>::record_trimmed_def_paths
   6: rustc_middle::ty::print::pretty::trimmed_def_paths
   7: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::depth_limit_error
   8: RINvNtNtCsapybXMd6BZ5_18rustc_query_system5query8plumbing17try_execute_queryINtCscpBx8nL7yzV_16rustc_query_impl13DynamicConfigINtNtB4_6caches11SingleCacheINtNtNtCs3PZcMoxADy4_12rustc_middle5query5erase6ErasedAhj8_EEKb0_KB3s_KB3s_ENtNtB1f_8plumbing9QueryCtx
   9: <alloc::raw_vec::RawVec<(rustc_query_system::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::query::on_disk_cache::AbsoluteBytePos)>>::grow_one
  10: <rustc_query_system::query::plumbing::JobOwner<()> as core::ops::drop::Drop>::drop
  11: RINvMs6_NtCs9qXCY6i3qbL_9hashbrown3rawINtB6_8RawTableTTNtNtNtCs3PZcMoxADy4_12rustc_middle2ty8instance8InstanceNtNtNtBX_3mir4mono14CollectionModeETINtNtNtBX_5query5erase6ErasedAhj20_ENtNtNtCsapybXMd6BZ5_18rustc_query_system9dep_graph5graph12DepNodeIndexEEE1
  12: RINvMs6_NtCs9qXCY6i3qbL_9hashbrown3rawINtB6_8RawTableTTNtNtNtCs3PZcMoxADy4_12rustc_middle2ty8instance8InstanceNtNtNtBX_3mir4mono14CollectionModeETINtNtNtBX_5query5erase6ErasedAhj20_ENtNtNtCsapybXMd6BZ5_18rustc_query_system9dep_graph5graph12DepNodeIndexEEE1
  13: RINvMs6_NtCs9qXCY6i3qbL_9hashbrown3rawINtB6_8RawTableTTNtNtNtCs3PZcMoxADy4_12rustc_middle2ty8instance8InstanceNtNtNtBX_3mir4mono14CollectionModeETINtNtNtBX_5query5erase6ErasedAhj20_ENtNtNtCsapybXMd6BZ5_18rustc_query_system9dep_graph5graph12DepNodeIndexEEE1
  14: RINvNtNtCsapybXMd6BZ5_18rustc_query_system5query8plumbing15ensure_must_runINtCscpBx8nL7yzV_16rustc_query_impl13DynamicConfigINtNtCshneqGBW248W_21rustc_data_structures9vec_cache8VecCacheNtNtCsc129ZB59tsZ_10rustc_span6def_id10LocalDefIdINtNtNtCs3PZcMoxADy4_1
  15: rustc_query_impl::query_system
  16: rustc_interface::passes::resolver_for_lowering_raw
  17: rustc_interface::passes::analysis
  18: <alloc::raw_vec::RawVec<(rustc_query_system::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::query::on_disk_cache::AbsoluteBytePos)>>::grow_one
  19: RINvNtNtCsapybXMd6BZ5_18rustc_query_system5query8plumbing17try_execute_queryINtCscpBx8nL7yzV_16rustc_query_impl13DynamicConfigINtNtB4_6caches11SingleCacheINtNtNtCs3PZcMoxADy4_12rustc_middle5query5erase6ErasedAhj0_EEKb0_KB3s_KB3s_ENtNtB1f_8plumbing9QueryCtx
  20: rustc_query_impl::query_system
  21: RINvNtNtCsdilRq3JDxER_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6threadNtB1h_7Builder16spawn_unchecked_INtNtCs3tVoUkX7Cwz_5alloc5boxed3BoxDINtNtNtCsOWpfTZVyMJ_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECslzhJ
  22: RINvNtNtCsdilRq3JDxER_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6threadNtB1h_7Builder16spawn_unchecked_INtNtCs3tVoUkX7Cwz_5alloc5boxed3BoxDINtNtNtCsOWpfTZVyMJ_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECslzhJ
  23: RINvNtNtCsdilRq3JDxER_3std3sys9backtrace28___rust_begin_short_backtraceNCNCINvNtCs3zgY6wvIJ9S_15rustc_interface4util26run_in_thread_with_globalsNCINvB1e_31run_in_thread_pool_with_globalsNCINvNtB1g_9interface12run_compileruNCNvCslzhJIxFyRmJ_17rustc_driver_i
  24: RINvNtNtCsdilRq3JDxER_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6threadNtB1h_7Builder16spawn_unchecked_INtNtCs3tVoUkX7Cwz_5alloc5boxed3BoxDINtNtNtCsOWpfTZVyMJ_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECslzhJ
  25: alloc::boxed::impl$28::call_once
             at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\alloc\src\boxed.rs:2013
  26: alloc::boxed::impl$28::call_once
             at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\alloc\src\boxed.rs:2013
  27: std::sys::pal::windows::thread::impl$0::new::thread_start
             at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\sys\pal\windows\thread.rs:56
  28: BaseThreadInitThunk
  29: RtlUserThreadStart

stack backtrace:
   0:     0x7ffc38211473 - std::backtrace_rs::backtrace::dbghelp64::trace
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:91
   1:     0x7ffc38211473 - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ffc38211473 - std::backtrace::Backtrace::create
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\backtrace.rs:331
   3:     0x7ffc382113ba - std::backtrace::Backtrace::force_capture
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\backtrace.rs:312
   4:     0x7ffc3983d05b - core[991f9e90141a1bf]::slice::sort::unstable::heapsort::heapsort::<((rustc_lint_defs[bb1ce1a6c5adb18f]::Level, &str), usize), <((rustc_lint_defs[bb1ce1a6c5adb18f]::Level, &str), usize) as core[991f9e90141a1bf]::cmp::PartialOrd>::lt>
   5:     0x7ffc3822d61e - alloc::boxed::impl$30::call
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\alloc\src\boxed.rs:2027
   6:     0x7ffc3822d61e - std::panicking::rust_panic_with_hook
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\panicking.rs:839
   7:     0x7ffc3822d379 - std::panicking::begin_panic_handler::closure$0
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\panicking.rs:704
   8:     0x7ffc3822a77f - std::sys::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\sys\backtrace.rs:168
   9:     0x7ffc3822cf7e - std::panicking::begin_panic_handler
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\panicking.rs:695
  10:     0x7ffc3b0fed41 - core::panicking::panic_fmt
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\core\src\panicking.rs:75
  11:     0x7ffc38199a51 - <rustc_errors[42171fc74e8af5b8]::DiagCtxtInner as core[991f9e90141a1bf]::ops::drop::Drop>::drop
  12:     0x7ffc35215040 - _rust_alloc_error_handler
  13:     0x7ffc3523956d - _rust_alloc_error_handler
  14:     0x7ffc35236ca6 - _rust_alloc_error_handler
  15:     0x7ffc35247492 - RINvNtNtCsdilRq3JDxER_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6threadNtB1h_7Builder16spawn_unchecked_INtNtCs3tVoUkX7Cwz_5alloc5boxed3BoxDINtNtNtCsOWpfTZVyMJ_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECslzhJ
  16:     0x7ffc35240259 - RINvNtNtCsdilRq3JDxER_3std3sys9backtrace28___rust_begin_short_backtraceNCNCINvNtCs3zgY6wvIJ9S_15rustc_interface4util26run_in_thread_with_globalsNCINvB1e_31run_in_thread_pool_with_globalsNCINvNtB1g_9interface12run_compileruNCNvCslzhJIxFyRmJ_17rustc_driver_i
  17:     0x7ffc35253583 - RINvNtNtCsdilRq3JDxER_3std3sys9backtrace28___rust_begin_short_backtraceNCNCNCINvMNtB6_6threadNtB1h_7Builder16spawn_unchecked_INtNtCs3tVoUkX7Cwz_5alloc5boxed3BoxDINtNtNtCsOWpfTZVyMJ_4core3ops8function6FnOnceuEp6OutputuNtNtB2G_6marker4SendEL_EuEs_000uECslzhJ
  18:     0x7ffc3823f6ad - alloc::boxed::impl$28::call_once
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\alloc\src\boxed.rs:2013
  19:     0x7ffc3823f6ad - alloc::boxed::impl$28::call_once
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\alloc\src\boxed.rs:2013
  20:     0x7ffc3823f6ad - std::sys::pal::windows::thread::impl$0::new::thread_start
                               at /rustc/649b995a9febd658b2570160703dff6fdc038ab2/library\std\src\sys\pal\windows\thread.rs:56
  21:     0x7ffc97117374 - BaseThreadInitThunk
  22:     0x7ffc9725cc91 - RtlUserThreadStart


rustc version: 1.86.0-nightly (649b995a9 2025-01-22)
platform: x86_64-pc-windows-msvc

@klensy klensy 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 Jan 23, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 23, 2025
@jieyouxu jieyouxu added E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc requires-nightly This issue requires a nightly compiler in some way. labels Jan 23, 2025
@klensy
Copy link
Contributor Author

klensy commented Jan 23, 2025

Bisected to:

Regression in nightly-2020-09-05

get_commits_between returning commits, len: 8
  commit[0] 2020-09-03: Auto merge of #70793 - the8472:in-place-iter-collect, r=Amanieu
  commit[1] 2020-09-03: Auto merge of #73996 - da-x:short-unique-paths, r=petrochenkov
  commit[2] 2020-09-04: Auto merge of #76004 - richkadel:llvm-coverage-map-gen-6b.5, r=tmandry
  commit[3] 2020-09-04: Auto merge of #75207 - dylni:add-slice-check-range, r=KodrAus
  commit[4] 2020-09-04: Auto merge of #75655 - nielx:fix/haiku-llvm-libz, r=Mark-Simulacrum
  commit[5] 2020-09-04: Auto merge of #75077 - LeSeulArtichaut:tys-kind, r=nikomatsakis
  commit[6] 2020-09-04: Auto merge of #76315 - lcnr:map-track-caller, r=Mark-Simulacrum
  commit[7] 2020-09-04: Auto merge of #76292 - Aaron1011:fix/proc-macro-panic-hide, r=petrochenkov

@bjorn3
Copy link
Member

bjorn3 commented Jan 23, 2025

This is #73996. That is the PR introducing path trimming. It probably forgot to apply with_no_trimmed_paths somewhere in the -Zmeta-stats impl.

@jieyouxu jieyouxu added A-diagnostics Area: Messages for errors, warnings, and lints S-has-bisection Status: a bisection has been found for this issue and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. A-diagnostics Area: Messages for errors, warnings, and lints E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. S-has-bisection Status: a bisection has been found for this issue 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