Skip to content

ICE expected abort due to worker thread errors #1664

Description

@matthiaskrgr

snippet:

//@compile-flags: -Zcodegen-backend=cranelift
const SZ: usize = 64_000_000;
type BigDrop = [String; SZ];
fn f2(_moveme: BigDrop) -> String {
    let [a, ..] = _moveme;
    a
}
fn main() {
    f2(std::array::from_fn(|_| String::new()));
}

Version information

rustc 1.98.0-nightly (43a4909ee 2026-06-07)
binary: rustc
commit-hash: 43a4909ee98ed4d006d9d773f5d94dc58e34f846
commit-date: 2026-06-07
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6

Possibly related line of code:
https://github.com/rust-lang/rust/blob/43a4909ee98ed4d006d9d773f5d94dc58e34f846/compiler/rustc_codegen_ssa/src/back/write.rs#L2107-L2119

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zcodegen-backend=cranelift

Program output

error: backend implementation limit exceeded while compiling _RINvNtCslXUzWlqvauF_4core5array11try_from_fnINtNtNtB4_3ops9try_trait17NeverShortCircuitNtNtCskgHWY1ejRYb_5alloc6string6StringEKj3d09000_NCINvMBJ_BG_10wrap_mut_1jNCNvCs15CMijXIseV_4mvce4main0E0EB2D_


thread 'rustc' (3850296) panicked at /rustc-dev/43a4909ee98ed4d006d9d773f5d94dc58e34f846/compiler/rustc_codegen_ssa/src/back/write.rs:2113:17:
expected abort due to worker thread errors
stack backtrace:
   0:     0x7f6189092c59 - <<std[94ce253409a2fa44]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[ffdaff015e106f9f]::fmt::Display>::fmt
   1:     0x7f6189822b88 - core[ffdaff015e106f9f]::fmt::write
   2:     0x7f61890a8ce6 - <std[94ce253409a2fa44]::sys::stdio::unix::Stderr as std[94ce253409a2fa44]::io::Write>::write_fmt
   3:     0x7f618906841e - std[94ce253409a2fa44]::panicking::default_hook::{closure#0}
   4:     0x7f6189085b23 - std[94ce253409a2fa44]::panicking::default_hook
   5:     0x7f6187e7a641 - std[94ce253409a2fa44]::panicking::update_hook::<alloc[ec1764d6676b5491]::boxed::Box<rustc_driver_impl[cf9483b81b3cc6d1]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f6189085e02 - std[94ce253409a2fa44]::panicking::panic_with_hook
   7:     0x7f6189068514 - std[94ce253409a2fa44]::panicking::panic_handler::{closure#0}
   8:     0x7f618905ca09 - std[94ce253409a2fa44]::sys::backtrace::__rust_end_short_backtrace::<std[94ce253409a2fa44]::panicking::panic_handler::{closure#0}, !>
   9:     0x7f6189069f4d - __rustc[926e37eea3b2551b]::rust_begin_unwind
  10:     0x7f6185b2090c - core[ffdaff015e106f9f]::panicking::panic_fmt
  11:     0x7f617691e59d - <rustc_codegen_cranelift[bcdb3e3c850e4ee6]::CraneliftCodegenBackend as rustc_codegen_ssa[1de79dad3f3f70f1]::traits::backend::CodegenBackend>::join_codegen
  12:     0x7f618aaab193 - <rustc_interface[a961539a930605b7]::queries::Linker>::link
  13:     0x7f618a9c47b0 - rustc_interface[a961539a930605b7]::interface::run_compiler::<(), rustc_driver_impl[cf9483b81b3cc6d1]::run_compiler::{closure#0}>::{closure#1}
  14:     0x7f618a95373e - std[94ce253409a2fa44]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[a961539a930605b7]::util::run_in_thread_with_globals<rustc_interface[a961539a930605b7]::util::run_in_thread_pool_with_globals<rustc_interface[a961539a930605b7]::interface::run_compiler<(), rustc_driver_impl[cf9483b81b3cc6d1]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  15:     0x7f618a953e2d - <std[94ce253409a2fa44]::thread::lifecycle::spawn_unchecked<rustc_interface[a961539a930605b7]::util::run_in_thread_with_globals<rustc_interface[a961539a930605b7]::util::run_in_thread_pool_with_globals<rustc_interface[a961539a930605b7]::interface::run_compiler<(), rustc_driver_impl[cf9483b81b3cc6d1]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[ffdaff015e106f9f]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  16:     0x7f618a954c2c - <std[94ce253409a2fa44]::sys::thread::unix::Thread>::new::thread_start
  17:     0x7f6183e981b9 - <unknown>
  18:     0x7f6183f1d21c - <unknown>
  19:                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: please make sure that you have updated to the latest nightly

note: rustc 1.98.0-nightly (43a4909ee 2026-06-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z codegen-backend=cranelift -Z dump-mir-dir=dir

query stack during panic:
end of query stack

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions