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

rustc 1.74 (stable) compiler panics #122250

Closed
garretfick opened this issue Mar 9, 2024 · 2 comments
Closed

rustc 1.74 (stable) compiler panics #122250

garretfick opened this issue Mar 9, 2024 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@garretfick
Copy link

The issue reported here only happens in stable. The issue does not occur with nightly.

Code

To reproduce:

  1. Clone the repository:
    git clone https://github.com/ironplc/ironplc.git
    
  2. Checkout the feature branch
    git checkout feature/RUSTC_CRASH
    
  3. Change the directory to the directory containing the Rust project
    cd compiler
    
  4. Compile
     cargo build
    

Meta

rustc --version --verbose:

rustc 1.74.1 (a28077b28 2023-12-04)
binary: rustc
commit-hash: a28077b28a02b92985b3a3faecf92813155f1ea1
commit-date: 2023-12-04
host: aarch64-unknown-linux-gnu
release: 1.74.1
LLVM version: 17.0.4

Error output

cargo build
warning: unused variable: `init`
   --> plc2plc/src/renderer.rs:214:21
    |
214 |         if let Some(init) = &node.init {
    |                     ^^^^ help: if this is intentional, prefix it with an underscore: `_init`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: `ironplc-plc2plc` (lib) generated 1 warning (run `cargo fix --lib -p ironplc-plc2plc` to apply 1 suggestion)
   Compiling ironplcc v0.49.0 (/workspaces/ironplc/compiler/plc2x)
thread 'cpy 2ppympwhu2d64vjg' panicked at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/compiler/rustc_codegen_ssa/src/back/write.rs:920:45:
no saved object file in work product
stack backtrace:
   0:     0xffffad678d98 - std::backtrace_rs::backtrace::libunwind::trace::heef1386c69141c0e
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0xffffad678d98 - std::backtrace_rs::backtrace::trace_unsynchronized::hf52898491dc115b3
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0xffffad678d98 - std::sys_common::backtrace::_print_fmt::h54a977219eb084db
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:67:5
   3:     0xffffad678d98 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h14034993f2dfde80
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:44:22
   4:     0xffffad6d4dc4 - core::fmt::rt::Argument::fmt::hc7ab06fc179a0538
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/rt.rs:138:9
   5:     0xffffad6d4dc4 - core::fmt::write::h5c1b4d7dd1fe1297
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/mod.rs:1114:21
   6:     0xffffad66dc3c - std::io::Write::write_fmt::h5288162c5e42a3a2
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/io/mod.rs:1763:15
   7:     0xffffad678bcc - std::sys_common::backtrace::_print::he08b7cac662e6bf2
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:47:5
   8:     0xffffad678bcc - std::sys_common::backtrace::print::hfc02f4f778cfba10
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:34:9
   9:     0xffffad67b6dc - std::panicking::default_hook::{{closure}}::ha5e3ccf8ff24afce
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:272:22
  10:     0xffffad67b3f0 - std::panicking::default_hook::h8515e68938392e65
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:292:9
  11:     0xffffae27e564 - std[6b8b961216ba2a7f]::panicking::update_hook::<alloc[4f8e73ea9b6a9722]::boxed::Box<rustc_driver_impl[cea993793326056d]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0xffffad67befc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h765c9f0a4b156b2b
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/alloc/src/boxed.rs:2021:9
  13:     0xffffad67befc - std::panicking::rust_panic_with_hook::hc79d39f29b02a8f2
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:735:13
  14:     0xffffad67bc88 - std::panicking::begin_panic_handler::{{closure}}::hc334b8544d985752
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:609:13
  15:     0xffffad67927c - std::sys_common::backtrace::__rust_end_short_backtrace::h1479ad9e3d67013a
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:170:18
  16:     0xffffad67b9e0 - rust_begin_unwind
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:597:5
  17:     0xffffad643fc4 - core::panicking::panic_fmt::h35c6be226eceb7e0
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:72:14
  18:     0xffffad643f90 - core::panicking::panic_display::heb0e30aa3e4c0954
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:168:5
  19:     0xffffad643f90 - core::panicking::panic_str::hddd5c9a965e591d2
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:152:5
  20:     0xffffad643f90 - core::option::expect_failed::h49543b963a95f22b
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/option.rs:1988:5
  21:     0xffffae52879c - rustc_codegen_ssa[aebf214b54425532]::back::write::execute_copy_from_cache_work_item::<rustc_codegen_llvm[884a093d3a22bb6e]::LlvmCodegenBackend>
  22:     0xffffae53cfd4 - std[6b8b961216ba2a7f]::sys_common::backtrace::__rust_begin_short_backtrace::<<rustc_codegen_llvm[884a093d3a22bb6e]::LlvmCodegenBackend as rustc_codegen_ssa[aebf214b54425532]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[aebf214b54425532]::back::write::spawn_work<rustc_codegen_llvm[884a093d3a22bb6e]::LlvmCodegenBackend>::{closure#0}, ()>::{closure#0}, ()>
  23:     0xffffae52a96c - <<std[6b8b961216ba2a7f]::thread::Builder>::spawn_unchecked_<<rustc_codegen_llvm[884a093d3a22bb6e]::LlvmCodegenBackend as rustc_codegen_ssa[aebf214b54425532]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[aebf214b54425532]::back::write::spawn_work<rustc_codegen_llvm[884a093d3a22bb6e]::LlvmCodegenBackend>::{closure#0}, ()>::{closure#0}, ()>::{closure#1} as core[f5820ae382bd3d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  24:     0xffffad685d44 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hecfad312c6eb2bd9
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/alloc/src/boxed.rs:2007:9
  25:     0xffffad685d44 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h16e8d93f3daf4d79
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/alloc/src/boxed.rs:2007:9
  26:     0xffffad685d44 - std::sys::unix::thread::Thread::new::thread_start::he57adeb5083c7c94
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys/unix/thread.rs:108:17
  27:     0xffffad49ee18 - <unknown>
  28:     0xffffad507e9c - <unknown>
  29:                0x0 - <unknown>

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.74.1 (a28077b28 2023-12-04) running on aarch64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
thread 'coordinator' panicked at compiler/rustc_middle/src/util/bug.rs:36:26:
/rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/compiler/rustc_codegen_ssa/src/back/write.rs:1594:29: worker thread panicked
stack backtrace:
   0:     0xffffad678d98 - std::backtrace_rs::backtrace::libunwind::trace::heef1386c69141c0e
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0xffffad678d98 - std::backtrace_rs::backtrace::trace_unsynchronized::hf52898491dc115b3
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0xffffad678d98 - std::sys_common::backtrace::_print_fmt::h54a977219eb084db
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:67:5
   3:     0xffffad678d98 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h14034993f2dfde80
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:44:22
   4:     0xffffad6d4dc4 - core::fmt::rt::Argument::fmt::hc7ab06fc179a0538
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/rt.rs:138:9
   5:     0xffffad6d4dc4 - core::fmt::write::h5c1b4d7dd1fe1297
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/mod.rs:1114:21
   6:     0xffffad66dc3c - std::io::Write::write_fmt::h5288162c5e42a3a2
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/io/mod.rs:1763:15
   7:     0xffffad678bcc - std::sys_common::backtrace::_print::he08b7cac662e6bf2
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:47:5
   8:     0xffffad678bcc - std::sys_common::backtrace::print::hfc02f4f778cfba10
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:34:9
   9:     0xffffad67b6dc - std::panicking::default_hook::{{closure}}::ha5e3ccf8ff24afce
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:272:22
  10:     0xffffad67b3f0 - std::panicking::default_hook::h8515e68938392e65
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:292:9
  11:     0xffffae27e564 - std[6b8b961216ba2a7f]::panicking::update_hook::<alloc[4f8e73ea9b6a9722]::boxed::Box<rustc_driver_impl[cea993793326056d]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0xffffad67befc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h765c9f0a4b156b2b
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/alloc/src/boxed.rs:2021:9
  13:     0xffffad67befc - std::panicking::rust_panic_with_hook::hc79d39f29b02a8f2
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:735:13
  14:     0xffffb2e19760 - std[6b8b961216ba2a7f]::panicking::begin_panic::<alloc[4f8e73ea9b6a9722]::string::String>::{closure#0}
  15:     0xffffb2e18b54 - std[6b8b961216ba2a7f]::sys_common::backtrace::__rust_end_short_backtrace::<std[6b8b961216ba2a7f]::panicking::begin_panic<alloc[4f8e73ea9b6a9722]::string::String>::{closure#0}, !>
  16:     0xffffae1630d8 - std[6b8b961216ba2a7f]::panicking::begin_panic::<alloc[4f8e73ea9b6a9722]::string::String>
  17:     0xffffb2ed4148 - rustc_middle[5cd7730d9c586083]::util::bug::opt_span_bug_fmt::<rustc_span[81ab1e5a2bd706f8]::span_encoding::Span>::{closure#0}
  18:     0xffffb2ed0cc4 - rustc_middle[5cd7730d9c586083]::ty::context::tls::with_opt::<rustc_middle[5cd7730d9c586083]::util::bug::opt_span_bug_fmt<rustc_span[81ab1e5a2bd706f8]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  19:     0xffffb2ed0c90 - rustc_middle[5cd7730d9c586083]::ty::context::tls::with_context_opt::<rustc_middle[5cd7730d9c586083]::ty::context::tls::with_opt<rustc_middle[5cd7730d9c586083]::util::bug::opt_span_bug_fmt<rustc_span[81ab1e5a2bd706f8]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  20:     0xffffae16d260 - rustc_middle[5cd7730d9c586083]::util::bug::bug_fmt
  21:     0xffffae53eea8 - std[6b8b961216ba2a7f]::sys_common::backtrace::__rust_begin_short_backtrace::<<rustc_codegen_llvm[884a093d3a22bb6e]::LlvmCodegenBackend as rustc_codegen_ssa[aebf214b54425532]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[aebf214b54425532]::back::write::start_executing_work<rustc_codegen_llvm[884a093d3a22bb6e]::LlvmCodegenBackend>::{closure#5}, core[f5820ae382bd3d]::result::Result<rustc_codegen_ssa[aebf214b54425532]::back::write::CompiledModules, ()>>::{closure#0}, core[f5820ae382bd3d]::result::Result<rustc_codegen_ssa[aebf214b54425532]::back::write::CompiledModules, ()>>
  22:     0xffffae52abbc - <<std[6b8b961216ba2a7f]::thread::Builder>::spawn_unchecked_<<rustc_codegen_llvm[884a093d3a22bb6e]::LlvmCodegenBackend as rustc_codegen_ssa[aebf214b54425532]::traits::backend::ExtraBackendMethods>::spawn_named_thread<rustc_codegen_ssa[aebf214b54425532]::back::write::start_executing_work<rustc_codegen_llvm[884a093d3a22bb6e]::LlvmCodegenBackend>::{closure#5}, core[f5820ae382bd3d]::result::Result<rustc_codegen_ssa[aebf214b54425532]::back::write::CompiledModules, ()>>::{closure#0}, core[f5820ae382bd3d]::result::Result<rustc_codegen_ssa[aebf214b54425532]::back::write::CompiledModules, ()>>::{closure#1} as core[f5820ae382bd3d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  23:     0xffffad685d44 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hecfad312c6eb2bd9
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/alloc/src/boxed.rs:2007:9
  24:     0xffffad685d44 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h16e8d93f3daf4d79
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/alloc/src/boxed.rs:2007:9
  25:     0xffffad685d44 - std::sys::unix::thread::Thread::new::thread_start::he57adeb5083c7c94
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys/unix/thread.rs:108:17
  26:     0xffffad49ee18 - <unknown>
  27:     0xffffad507e9c - <unknown>
  28:                0x0 - <unknown>

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.74.1 (a28077b28 2023-12-04) running on aarch64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
thread 'rustc' panicked at compiler/rustc_middle/src/util/bug.rs:36:26:
/rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/compiler/rustc_codegen_ssa/src/back/write.rs:1968:17: panic during codegen/LLVM phase
stack backtrace:
   0:     0xffffad678d98 - std::backtrace_rs::backtrace::libunwind::trace::heef1386c69141c0e
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0xffffad678d98 - std::backtrace_rs::backtrace::trace_unsynchronized::hf52898491dc115b3
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0xffffad678d98 - std::sys_common::backtrace::_print_fmt::h54a977219eb084db
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:67:5
   3:     0xffffad678d98 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h14034993f2dfde80
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:44:22
   4:     0xffffad6d4dc4 - core::fmt::rt::Argument::fmt::hc7ab06fc179a0538
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/rt.rs:138:9
   5:     0xffffad6d4dc4 - core::fmt::write::h5c1b4d7dd1fe1297
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/mod.rs:1114:21
   6:     0xffffad66dc3c - std::io::Write::write_fmt::h5288162c5e42a3a2
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/io/mod.rs:1763:15
   7:     0xffffad678bcc - std::sys_common::backtrace::_print::he08b7cac662e6bf2
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:47:5
   8:     0xffffad678bcc - std::sys_common::backtrace::print::hfc02f4f778cfba10
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:34:9
   9:     0xffffad67b6dc - std::panicking::default_hook::{{closure}}::ha5e3ccf8ff24afce
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:272:22
  10:     0xffffad67b3f0 - std::panicking::default_hook::h8515e68938392e65
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:292:9
  11:     0xffffae27e564 - std[6b8b961216ba2a7f]::panicking::update_hook::<alloc[4f8e73ea9b6a9722]::boxed::Box<rustc_driver_impl[cea993793326056d]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0xffffad67befc - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h765c9f0a4b156b2b
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/alloc/src/boxed.rs:2021:9
  13:     0xffffad67befc - std::panicking::rust_panic_with_hook::hc79d39f29b02a8f2
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:735:13
  14:     0xffffb2e19760 - std[6b8b961216ba2a7f]::panicking::begin_panic::<alloc[4f8e73ea9b6a9722]::string::String>::{closure#0}
  15:     0xffffb2e18b54 - std[6b8b961216ba2a7f]::sys_common::backtrace::__rust_end_short_backtrace::<std[6b8b961216ba2a7f]::panicking::begin_panic<alloc[4f8e73ea9b6a9722]::string::String>::{closure#0}, !>
  16:     0xffffae1630d8 - std[6b8b961216ba2a7f]::panicking::begin_panic::<alloc[4f8e73ea9b6a9722]::string::String>
  17:     0xffffb2ed4148 - rustc_middle[5cd7730d9c586083]::util::bug::opt_span_bug_fmt::<rustc_span[81ab1e5a2bd706f8]::span_encoding::Span>::{closure#0}
  18:     0xffffb2ed0cc4 - rustc_middle[5cd7730d9c586083]::ty::context::tls::with_opt::<rustc_middle[5cd7730d9c586083]::util::bug::opt_span_bug_fmt<rustc_span[81ab1e5a2bd706f8]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  19:     0xffffb2ed0c90 - rustc_middle[5cd7730d9c586083]::ty::context::tls::with_context_opt::<rustc_middle[5cd7730d9c586083]::ty::context::tls::with_opt<rustc_middle[5cd7730d9c586083]::util::bug::opt_span_bug_fmt<rustc_span[81ab1e5a2bd706f8]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  20:     0xffffae16d260 - rustc_middle[5cd7730d9c586083]::util::bug::bug_fmt
  21:     0xffffae52c06c - <rustc_codegen_ssa[aebf214b54425532]::back::write::OngoingCodegen<rustc_codegen_llvm[884a093d3a22bb6e]::LlvmCodegenBackend>>::join
  22:     0xffffae557624 - <rustc_codegen_llvm[884a093d3a22bb6e]::LlvmCodegenBackend as rustc_codegen_ssa[aebf214b54425532]::traits::backend::CodegenBackend>::join_codegen
  23:     0xffffae3bf830 - <rustc_interface[42246dc7ebab8ec4]::queries::Linker>::link
  24:     0xffffae28d868 - rustc_span[81ab1e5a2bd706f8]::set_source_map::<core[f5820ae382bd3d]::result::Result<(), rustc_span[81ab1e5a2bd706f8]::ErrorGuaranteed>, rustc_interface[42246dc7ebab8ec4]::interface::run_compiler<core[f5820ae382bd3d]::result::Result<(), rustc_span[81ab1e5a2bd706f8]::ErrorGuaranteed>, rustc_driver_impl[cea993793326056d]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  25:     0xffffae27d860 - std[6b8b961216ba2a7f]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[42246dc7ebab8ec4]::util::run_in_thread_with_globals<rustc_interface[42246dc7ebab8ec4]::interface::run_compiler<core[f5820ae382bd3d]::result::Result<(), rustc_span[81ab1e5a2bd706f8]::ErrorGuaranteed>, rustc_driver_impl[cea993793326056d]::run_compiler::{closure#1}>::{closure#0}, core[f5820ae382bd3d]::result::Result<(), rustc_span[81ab1e5a2bd706f8]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f5820ae382bd3d]::result::Result<(), rustc_span[81ab1e5a2bd706f8]::ErrorGuaranteed>>
  26:     0xffffae27e9cc - <<std[6b8b961216ba2a7f]::thread::Builder>::spawn_unchecked_<rustc_interface[42246dc7ebab8ec4]::util::run_in_thread_with_globals<rustc_interface[42246dc7ebab8ec4]::interface::run_compiler<core[f5820ae382bd3d]::result::Result<(), rustc_span[81ab1e5a2bd706f8]::ErrorGuaranteed>, rustc_driver_impl[cea993793326056d]::run_compiler::{closure#1}>::{closure#0}, core[f5820ae382bd3d]::result::Result<(), rustc_span[81ab1e5a2bd706f8]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f5820ae382bd3d]::result::Result<(), rustc_span[81ab1e5a2bd706f8]::ErrorGuaranteed>>::{closure#1} as core[f5820ae382bd3d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  27:     0xffffad685d44 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hecfad312c6eb2bd9
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/alloc/src/boxed.rs:2007:9
  28:     0xffffad685d44 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h16e8d93f3daf4d79
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/alloc/src/boxed.rs:2007:9
  29:     0xffffad685d44 - std::sys::unix::thread::Thread::new::thread_start::he57adeb5083c7c94
                               at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys/unix/thread.rs:108:17
  30:     0xffffad49ee18 - <unknown>
  31:     0xffffad507e9c - <unknown>
  32:                0x0 - <unknown>

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.74.1 (a28077b28 2023-12-04) running on aarch64-unknown-linux-gnu

note: compiler flags: --crate-type bin -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

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

query stack during panic:
end of query stack
error: could not compile `ironplcc` (bin "ironplcc")
Backtrace

   0: rust_begin_unwind
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:597:5
   1: core::panicking::panic_fmt
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:72:14
   2: core::panicking::panic_display
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:168:5
   3: core::panicking::panic_str
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:152:5
   4: core::option::expect_failed
             at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/option.rs:1988:5
   5: rustc_codegen_ssa::back::write::execute_copy_from_cache_work_item::<rustc_codegen_llvm::LlvmCodegenBackend>

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

You should never see this ICE on nightly, because I turned it into a slightly more helpful error instead: #120865

I can't reproduce this ICE by following your directions. Are you sure you can reproduce it with a fresh clone? Are you using something like sccache? I think this arises from something getting jumbled in the target directory, almost certainly running cargo clean will clear out the errant state locally, but if the errant state came from an external caching system, it might be a bit harder to evict it.

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 10, 2024
@fee1-dead fee1-dead added the S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. label Mar 10, 2024
@garretfick
Copy link
Author

You are right that cleaning my workspace caused the issue to no longer reproduce. I am not knowingly using anything such as sccache (I've not heard of it). One possibility is I do run in a devcontainer and it is possible that there were writes from the container host and within container itself that could corrupt some cache.

I'm glad to see that there is a more helpful error. Because I cannot reproduce the issue, I will thus close this.

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) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. 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