[ICE]: Missing incremental LTO work product panics instead of rebuilding
@saberoueslati is already working on this.
Since Sep 18, 2026.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Reproduction
The minimal self-verifying reproducer is available at:
https://github.com/ashi009/rustc-missing-incremental-work-product-repro
git clone https://github.com/ashi009/rustc-missing-incremental-work-product-repro.git
cd rustc-missing-incremental-work-product-repro
rustup run nightly bash repro.sh
The script populates an incremental cache, removes one cached .pre-lto.bc
work product, and repeats the identical compilation. It exits successfully only
when it observes the expected failed to open LTO bitcode file ICE.
Since incremental state is a cache, I expected rustc to discard the unusable
session and rebuild successfully.
This provides a deterministic reproducer for #94943, which was closed because
no reproducer was available.
Meta
Reproduces with stable:
rustc 1.98.0 (88d9e12ae 2026-08-18)
host: aarch64-apple-darwin
Also reproduces with current nightly:
rustc 1.100.0-nightly (a36d05efa 2026-09-09)
Error output
thread 'coordinator' panicked at compiler/rustc_codegen_ssa/src/back/lto.rs:56:13:
failed to open LTO bitcode file `.../s-...-working/....pre-lto.bc`:
No such file or directory (os error 2)
error: the compiler unexpectedly panicked. This is a bug
Backtrace
rustc_codegen_ssa::back::lto::SerializedModule::from_file
rustc_codegen_llvm::back::lto::thin_lto
rustc_codegen_llvm::LlvmCodegenBackend::run_thin_lto
rustc_codegen_ssa::back::write::do_thin_lto
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.