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

ICE on nightly-2024-05-28 during link stage #125707

Closed
PureWhiteWu opened this issue May 29, 2024 · 1 comment · Fixed by #126068
Closed

ICE on nightly-2024-05-28 during link stage #125707

PureWhiteWu opened this issue May 29, 2024 · 1 comment · Fixed by #126068
Labels
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.

Comments

@PureWhiteWu
Copy link

PureWhiteWu commented May 29, 2024

This ICE both exists on macOS aarch64 and linux amd64.

Code

Internal code, cannot public.

Meta

rustc --version --verbose:

rustc 1.80.0-nightly (da159eb33 2024-05-28)
binary: rustc
commit-hash: da159eb331b27df528185c616b394bb0e1d2a4bd
commit-date: 2024-05-28
host: aarch64-apple-darwin
release: 1.80.0-nightly
LLVM version: 18.1.6

Error output

thread 'rustc' panicked at compiler/rustc_codegen_ssa/src/back/link.rs:2700:27:
index out of bounds: the len is 308 but the index is 308
stack backtrace:
   0:        0x1019253ac - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hee5d3add81f8769b
   1:        0x1019699e4 - core::fmt::write::h9dc0a212068c4487
   2:        0x10191b750 - std::io::Write::write_fmt::h1601e9a4a36351ca
   3:        0x101925204 - std::sys_common::backtrace::print::h9535b2af8a100aec
   4:        0x101927810 - std::panicking::default_hook::{{closure}}::hdd85190914d7518f
   5:        0x1019274dc - std::panicking::default_hook::h9798bf625bf54a9e
   6:        0x10b1a8c70 - <alloc[bce90598dd3f4dd3]::boxed::Box<rustc_driver_impl[c4bab6df5b4b3fba]::install_ice_hook::{closure#0}> as core[9e7a2f7b9a3a4c06]::ops::function::Fn<(&dyn for<'a, 'b> core[9e7a2f7b9a3a4c06]::ops::function::Fn<(&'a core[9e7a2f7b9a3a4c06]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[9e7a2f7b9a3a4c06]::marker::Sync + core[9e7a2f7b9a3a4c06]::marker::Send, &core[9e7a2f7b9a3a4c06]::panic::panic_info::PanicInfo)>>::call
   7:        0x1019281fc - std::panicking::rust_panic_with_hook::hea32a016165e022b
   8:        0x101927c10 - std::panicking::begin_panic_handler::{{closure}}::he55e42119f08366c
   9:        0x101925830 - std::sys_common::backtrace::__rust_end_short_backtrace::h2ec39936dd320eff
  10:        0x101927980 - _rust_begin_unwind
  11:        0x101985260 - core::panicking::panic_fmt::hdd0a8c3eb8088208
  12:        0x1019853f0 - core::panicking::panic_bounds_check::h4e28ad5c5971d664
  13:        0x10af1668c - rustc_codegen_ssa[b068ff2a868a000c]::back::link::linker_with_args
  14:        0x10af0d504 - rustc_codegen_ssa[b068ff2a868a000c]::back::link::link_natively
  15:        0x10af0978c - rustc_codegen_ssa[b068ff2a868a000c]::back::link::link_binary
  16:        0x10aeaa15c - <rustc_codegen_llvm[7dd9e7fd145dc8ba]::LlvmCodegenBackend as rustc_codegen_ssa[b068ff2a868a000c]::traits::backend::CodegenBackend>::link
  17:        0x10b988674 - <rustc_interface[c016e796069c9104]::queries::Linker>::link
  18:        0x10b170e54 - <scoped_tls[7b6fdb05fca54dc0]::ScopedKey<rustc_span[fb448f34252b061b]::SessionGlobals>>::set::<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>
  19:        0x10b17afe8 - rustc_span[fb448f34252b061b]::create_session_globals_then::<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
  20:        0x10b179a14 - std[aa6988fe294f8aab]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>
  21:        0x10b17a0ac - <<std[aa6988fe294f8aab]::thread::Builder>::spawn_unchecked_<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#2} as core[9e7a2f7b9a3a4c06]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  22:        0x101930d18 - std::sys::pal::unix::thread::Thread::new::thread_start::h2c9944774d079220
  23:        0x1964baf94 - __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: please make sure that you have updated to the latest nightly

note: please attach the file at `/Users/purewhite/rust/xxx/rustc-ice-2024-05-29T09_07_49-55168.txt` to your bug report

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C incremental=[REDACTED] -C target-cpu=native

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

query stack during panic:
end of query stack

The file:

rustc-ice-2024-05-29T09_13_04-56076.txt

Backtrace

Backtrace with RUST_BACKTRACE=full:

thread 'rustc' panicked at compiler/rustc_codegen_ssa/src/back/link.rs:2700:27:
index out of bounds: the len is 308 but the index is 308
stack backtrace:
   0:        0x1058693ac - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hee5d3add81f8769b
   1:        0x1058ad9e4 - core::fmt::write::h9dc0a212068c4487
   2:        0x10585f750 - std::io::Write::write_fmt::h1601e9a4a36351ca
   3:        0x105869204 - std::sys_common::backtrace::print::h9535b2af8a100aec
   4:        0x10586b810 - std::panicking::default_hook::{{closure}}::hdd85190914d7518f
   5:        0x10586b4dc - std::panicking::default_hook::h9798bf625bf54a9e
   6:        0x10f0ecc70 - <alloc[bce90598dd3f4dd3]::boxed::Box<rustc_driver_impl[c4bab6df5b4b3fba]::install_ice_hook::{closure#0}> as core[9e7a2f7b9a3a4c06]::ops::function::Fn<(&dyn for<'a, 'b> core[9e7a2f7b9a3a4c06]::ops::function::Fn<(&'a core[9e7a2f7b9a3a4c06]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[9e7a2f7b9a3a4c06]::marker::Sync + core[9e7a2f7b9a3a4c06]::marker::Send, &core[9e7a2f7b9a3a4c06]::panic::panic_info::PanicInfo)>>::call
   7:        0x10586c1fc - std::panicking::rust_panic_with_hook::hea32a016165e022b
   8:        0x10586bc10 - std::panicking::begin_panic_handler::{{closure}}::he55e42119f08366c
   9:        0x105869830 - std::sys_common::backtrace::__rust_end_short_backtrace::h2ec39936dd320eff
  10:        0x10586b980 - _rust_begin_unwind
  11:        0x1058c9260 - core::panicking::panic_fmt::hdd0a8c3eb8088208
  12:        0x1058c93f0 - core::panicking::panic_bounds_check::h4e28ad5c5971d664
  13:        0x10ee5a68c - rustc_codegen_ssa[b068ff2a868a000c]::back::link::linker_with_args
  14:        0x10ee51504 - rustc_codegen_ssa[b068ff2a868a000c]::back::link::link_natively
  15:        0x10ee4d78c - rustc_codegen_ssa[b068ff2a868a000c]::back::link::link_binary
  16:        0x10edee15c - <rustc_codegen_llvm[7dd9e7fd145dc8ba]::LlvmCodegenBackend as rustc_codegen_ssa[b068ff2a868a000c]::traits::backend::CodegenBackend>::link
  17:        0x10f8cc674 - <rustc_interface[c016e796069c9104]::queries::Linker>::link
  18:        0x10f0b4e54 - <scoped_tls[7b6fdb05fca54dc0]::ScopedKey<rustc_span[fb448f34252b061b]::SessionGlobals>>::set::<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>
  19:        0x10f0befe8 - rustc_span[fb448f34252b061b]::create_session_globals_then::<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
  20:        0x10f0bda14 - std[aa6988fe294f8aab]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>
  21:        0x10f0be0ac - <<std[aa6988fe294f8aab]::thread::Builder>::spawn_unchecked_<rustc_interface[c016e796069c9104]::util::run_in_thread_with_globals<rustc_interface[c016e796069c9104]::util::run_in_thread_pool_with_globals<rustc_interface[c016e796069c9104]::interface::run_compiler<core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>, rustc_driver_impl[c4bab6df5b4b3fba]::run_compiler::{closure#0}>::{closure#1}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[9e7a2f7b9a3a4c06]::result::Result<(), rustc_span[fb448f34252b061b]::ErrorGuaranteed>>::{closure#2} as core[9e7a2f7b9a3a4c06]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  22:        0x105874d18 - std::sys::pal::unix::thread::Thread::new::thread_start::h2c9944774d079220
  23:        0x1964baf94 - __pthread_joiner_wake

@PureWhiteWu PureWhiteWu 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 May 29, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 29, 2024
@lqd
Copy link
Member

lqd commented May 29, 2024

This should also be a duplicate of #125474, #125484 and #125646 and will be fixed by #125493

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 30, 2024
fmease added a commit to fmease/rust that referenced this issue Jun 6, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by rust-lang#124976 than will be fixed by rust-lang#125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang#125474
fixes rust-lang#125484
fixes rust-lang#125646
fixes rust-lang#125707
fixes rust-lang#126066
fixes rust-lang#125934
fixes rust-lang#126021

r? `@petrochenkov`
`@bors` p=1
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jun 6, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by rust-lang#124976 than will be fixed by rust-lang#125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang#125474
fixes rust-lang#125484
fixes rust-lang#125646
fixes rust-lang#125707
fixes rust-lang#126066
fixes rust-lang#125934
fixes rust-lang#126021

r? ``@petrochenkov``
``@bors`` p=1
@bors bors closed this as completed in 98489f2 Jun 6, 2024
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Jun 7, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by #124976 than will be fixed by #125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang/rust#125474
fixes rust-lang/rust#125484
fixes rust-lang/rust#125646
fixes rust-lang/rust#125707
fixes #126066
fixes #125934
fixes rust-lang/rust#126021

r? `@petrochenkov`
`@bors` p=1
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Jun 13, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by #124976 than will be fixed by #125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang/rust#125474
fixes rust-lang/rust#125484
fixes rust-lang/rust#125646
fixes rust-lang/rust#125707
fixes #126066
fixes #125934
fixes rust-lang/rust#126021

r? `@petrochenkov`
`@bors` p=1
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Jun 28, 2024
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by #124976 than will be fixed by #125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes rust-lang/rust#125474
fixes rust-lang/rust#125484
fixes rust-lang/rust#125646
fixes rust-lang/rust#125707
fixes #126066
fixes #125934
fixes rust-lang/rust#126021

r? `@petrochenkov`
`@bors` p=1
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) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
4 participants