Skip to content

regression: thread 'rustc' panicked, assertion left != right failed #142425

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

Open
BoxyUwU opened this issue Jun 12, 2025 · 4 comments
Open

regression: thread 'rustc' panicked, assertion left != right failed #142425

BoxyUwU opened this issue Jun 12, 2025 · 4 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@BoxyUwU
Copy link
Member

BoxyUwU commented Jun 12, 2025

[INFO] [stderr] thread 'rustc' panicked at compiler/rustc_span/src/symbol.rs:2356:9:
[INFO] [stderr] assertion `left != right` failed
[INFO] [stderr]   left: ""
[INFO] [stderr]  right: ""
[INFO] [stderr] stack backtrace:
[INFO] [stderr]    0:     0x752bb8549f33 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h6bed9dc66a5cec52
[INFO] [stderr]    1:     0x752bb8c05947 - core::fmt::write::h7d74dd6e449cae1f
[INFO] [stderr]    2:     0x752bb9cd7791 - std::io::Write::write_fmt::h68b3bc9d54a39d7f
[INFO] [stderr]    3:     0x752bb8549d92 - std::sys::backtrace::BacktraceLock::print::h6b5cffc33d0e9592
[INFO] [stderr]    4:     0x752bb854d98a - std::panicking::default_hook::{{closure}}::h5fc51e281b0877ca
[INFO] [stderr]    5:     0x752bb854d50f - std::panicking::default_hook::h03c499ee84a534f3
[INFO] [stderr]    6:     0x752bb75787b3 - std[4ece947bc34e96db]::panicking::update_hook::<alloc[fd9347d1b2560651]::boxed::Box<rustc_driver_impl[994997776c209ede]::install_ice_hook::{closure#1}>>::{closure#0}
[INFO] [stderr]    7:     0x752bb854e203 - std::panicking::rust_panic_with_hook::ha891520ba817caf1
[INFO] [stderr]    8:     0x752bb854defa - std::panicking::begin_panic_handler::{{closure}}::ha3354180cd64890f
[INFO] [stderr]    9:     0x752bb854a3f9 - std::sys::backtrace::__rust_end_short_backtrace::h3bc1bfbcac42a3a6
[INFO] [stderr]   10:     0x752bb854dbbd - __rustc[e3a6421a38efca84]::rust_begin_unwind
[INFO] [stderr]   11:     0x752bb4e85de0 - core::panicking::panic_fmt::h6ea58fee8777a3d1
[INFO] [stderr]   12:     0x752bb6efa17a - core::panicking::assert_failed_inner::h3da719a85b51b663
[INFO] [stderr]   13:     0x752bb6e30670 - core[bdde32e857371a49]::panicking::assert_failed::<rustc_span[ade2e571dc313a2f]::symbol::Symbol, rustc_span[ade2e571dc313a2f]::symbol::Symbol>
[INFO] [stderr]   14:     0x752bb95499da - <rustc_span[ade2e571dc313a2f]::symbol::Symbol>::to_ident_string
[INFO] [stderr]   15:     0x752bb9ad5438 - <rustc_errors[3e37cc015d94a130]::diagnostic::DiagInner>::arg::<&str, rustc_span[ade2e571dc313a2f]::symbol::Symbol>
[INFO] [stderr]   16:     0x752bb9ad4a56 - <rustc_lint[809156708517efa4]::lints::UnexpectedCfgValue as rustc_errors[3e37cc015d94a130]::diagnostic::LintDiagnostic<()>>::decorate_lint
[INFO] [stderr]   17:     0x752bb9ad56e6 - rustc_lint[809156708517efa4]::early::diagnostics::decorate_lint
[INFO] [stderr]   18:     0x752bb9ad55cc - <<rustc_lint[809156708517efa4]::early::EarlyContextAndPass<rustc_lint[809156708517efa4]::BuiltinCombinedEarlyLintPass>>::inlined_check_id::{closure#0} as core[bdde32e857371a49]::ops::function::FnOnce<(&mut rustc_errors[3e37cc015d94a130]::diagnostic::Diag<()>,)>>::call_once::{shim:vtable#0}
[INFO] [stderr]   19:     0x752bb939d210 - rustc_middle[78f1cb797b32985a]::lint::lint_level::lint_level_impl
[INFO] [stderr]   20:     0x752bb984dc7c - rustc_interface[debe5311a742862e]::passes::early_lint_checks
[INFO] [stderr]   21:     0x752bb984d38d - rustc_query_impl[5215c5451aacabe]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5215c5451aacabe]::query_impl::early_lint_checks::dynamic_query::{closure#2}::{closure#0}, rustc_middle[78f1cb797b32985a]::query::erase::Erased<[u8; 0usize]>>
[INFO] [stderr]   22:     0x752bb9b1253a - rustc_query_system[3588958cd15a526e]::query::plumbing::try_execute_query::<rustc_query_impl[5215c5451aacabe]::DynamicConfig<rustc_query_system[3588958cd15a526e]::query::caches::SingleCache<rustc_middle[78f1cb797b32985a]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[5215c5451aacabe]::plumbing::QueryCtxt, false>
[INFO] [stderr]   23:     0x752bb9b12299 - rustc_query_impl[5215c5451aacabe]::query_impl::early_lint_checks::get_query_non_incr::__rust_end_short_backtrace
[INFO] [stderr]   24:     0x752bb90c0e6a - rustc_ast_lowering[db5f2990f914eadc]::lower_to_hir
[INFO] [stderr]   25:     0x752bb9acbb2a - rustc_query_impl[5215c5451aacabe]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5215c5451aacabe]::query_impl::hir_crate::dynamic_query::{closure#2}::{closure#0}, rustc_middle[78f1cb797b32985a]::query::erase::Erased<[u8; 8usize]>>
[INFO] [stderr]   26:     0x752bb9b14901 - rustc_query_system[3588958cd15a526e]::query::plumbing::try_execute_query::<rustc_query_impl[5215c5451aacabe]::DynamicConfig<rustc_query_system[3588958cd15a526e]::query::caches::SingleCache<rustc_middle[78f1cb797b32985a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[5215c5451aacabe]::plumbing::QueryCtxt, false>
[INFO] [stderr]   27:     0x752bb9b13d88 - rustc_query_impl[5215c5451aacabe]::query_impl::hir_crate::get_query_non_incr::__rust_end_short_backtrace
[INFO] [stderr]   28:     0x752bb974215c - rustc_interface[debe5311a742862e]::passes::run_required_analyses
[INFO] [stderr]   29:     0x752bb9b1045e - rustc_interface[debe5311a742862e]::passes::analysis
[INFO] [stderr]   30:     0x752bb9b10435 - rustc_query_impl[5215c5451aacabe]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[5215c5451aacabe]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[78f1cb797b32985a]::query::erase::Erased<[u8; 0usize]>>
[INFO] [stderr]   31:     0x752bb9b1253a - rustc_query_system[3588958cd15a526e]::query::plumbing::try_execute_query::<rustc_query_impl[5215c5451aacabe]::DynamicConfig<rustc_query_system[3588958cd15a526e]::query::caches::SingleCache<rustc_middle[78f1cb797b32985a]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[5215c5451aacabe]::plumbing::QueryCtxt, false>
[INFO] [stderr]   32:     0x752bb9b1220f - rustc_query_impl[5215c5451aacabe]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
[INFO] [stderr]   33:     0x752bb9de1447 - rustc_interface[debe5311a742862e]::passes::create_and_enter_global_ctxt::<core[bdde32e857371a49]::option::Option<rustc_interface[debe5311a742862e]::queries::Linker>, rustc_driver_impl[994997776c209ede]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
[INFO] [stderr]   34:     0x752bb9d26566 - rustc_interface[debe5311a742862e]::interface::run_compiler::<(), rustc_driver_impl[994997776c209ede]::run_compiler::{closure#0}>::{closure#1}
[INFO] [stderr]   35:     0x752bb9ccb3be - std[4ece947bc34e96db]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[debe5311a742862e]::util::run_in_thread_with_globals<rustc_interface[debe5311a742862e]::util::run_in_thread_pool_with_globals<rustc_interface[debe5311a742862e]::interface::run_compiler<(), rustc_driver_impl[994997776c209ede]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
[INFO] [stderr]   36:     0x752bb9ccb834 - <<std[4ece947bc34e96db]::thread::Builder>::spawn_unchecked_<rustc_interface[debe5311a742862e]::util::run_in_thread_with_globals<rustc_interface[debe5311a742862e]::util::run_in_thread_pool_with_globals<rustc_interface[debe5311a742862e]::interface::run_compiler<(), rustc_driver_impl[994997776c209ede]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[bdde32e857371a49]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stderr]   37:     0x752bb9cccc2b - std::sys::pal::unix::thread::Thread::new::thread_start::hd325dd57d8c72c6b
[INFO] [stderr]   38:     0x752bb3a8aaa4 - <unknown>
[INFO] [stderr]   39:     0x752bb3b17a34 - clone
[INFO] [stderr]   40:                0x0 - <unknown>
[INFO] [stderr] 
[INFO] [stderr] error: the compiler unexpectedly panicked. this is a bug.
[INFO] [stderr] 
[INFO] [stderr] 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
[INFO] [stderr] 
[INFO] [stderr] note: rustc 1.88.0-beta.4 (95597e848 2025-05-25) running on x86_64-unknown-linux-gnu
[INFO] [stderr] 
[INFO] [stderr] note: compiler flags: -C opt-level=2 -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=on
[INFO] [stderr] 
[INFO] [stderr] note: some of the compiler flags provided by cargo are hidden
[INFO] [stderr] 
[INFO] [stderr] query stack during panic:
[INFO] [stderr] #0 [early_lint_checks] perform lints prior to AST lowering
[INFO] [stderr] #1 [hir_crate] getting the crate HIR
[INFO] [stderr] #2 [analysis] running analysis passes on this crate
[INFO] [stderr] end of query stack
@BoxyUwU BoxyUwU added 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. regression-from-stable-to-beta Performance or correctness regression from stable to beta. C-bug Category: This is a bug. labels Jun 12, 2025
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jun 12, 2025
@cuviper cuviper added this to the 1.88.0 milestone Jun 12, 2025
@bjorn3
Copy link
Member

bjorn3 commented Jun 12, 2025

Likely caused by the #137978 refactorings. cc @nnethercote

@matthiaskrgr
Copy link
Member

this is probably #140884 which was fixed via #141318

@apiraino
Copy link
Contributor

I am not clear why I can't reproduce this (cargo +beta build on the mcuboot crate). If it's because the fix #141318 merged ~3 weeks ago in already in the latest beta, why can't I reproduce with the previous 2025-04-13 beta?

@cuviper
Copy link
Member

cuviper commented Jun 13, 2025

I am not clear why I can't reproduce this (cargo +beta build on the mcuboot crate).

The crater log succeeded at cargo build, but failed at cargo test, and I can reproduce this myself, even just cargo check --tests.

It looks like this just barely snuck into beta. The first 1.88.0-beta.1 is beta-2025-05-09, which does reproduce the assertion. On the nightly side, nightly-2025-05-09 passes and nightly-2025-05-10 fails. Bisected:

searched nightlies: from nightly-2025-05-09 to nightly-2025-05-10
regressed nightly: nightly-2025-05-10
searched commit range: 50aa041...dcecb99
regressed commit: a7b1b24

bisected with cargo-bisect-rustc v0.6.10

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --start 2025-05-09 --end 2025-05-10 -- check --tests

And then bisecting for the fix:

searched nightlies: from nightly-2025-05-10 to nightly-2025-06-13
regressed nightly: nightly-2025-05-11
searched commit range: dcecb99...7b84c9e
regressed commit: 7e432c4

bisected with cargo-bisect-rustc v0.6.10

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --regress success --start 2025-05-10 -- check --tests

But that just changed it to a debug-assertion -- #141318 is probably still the better fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. regression-from-stable-to-beta Performance or correctness regression from stable to beta. 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

6 participants