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 caused by failed assertion in on_disk_cache.rs #71733

Closed
caelunshun opened this issue May 1, 2020 · 3 comments
Closed

ICE caused by failed assertion in on_disk_cache.rs #71733

caelunshun opened this issue May 1, 2020 · 3 comments
Assignees
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

@caelunshun
Copy link

caelunshun commented May 1, 2020

My CI run (cargo test) failed spuriously on Windows with the following ICE:

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `82`,
 right: `1002111927320821928687967599834759150`', src\librustc\ty\query\on_disk_cache.rs:491:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.43.0 (4fb7144ed 2020-04-20) running on x86_64-pc-windows-msvc

note: compiler flags: -C opt-level=1 -C debuginfo=2 -C debug-assertions=on -C incremental -C opt-level=0 --crate-type lib

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

Unfortunately I've been unable to reproduce the crash, despite no code having changed. As such, I'm not sure if the issue still exists on the latest nightly.

For reference, the entirety of the crate which failed to compile can be found here.

@jonas-schievink jonas-schievink added A-incr-comp Area: Incremental compilation 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 1, 2020
@JohnTitor JohnTitor added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label May 18, 2020
@tdyas
Copy link

tdyas commented Dec 22, 2020

I encountered a similar rustc panic with that cache code while running clippy. rust-lang/rust-clippy#6493

The issue did not reoccur after I wiped the on-disk cache with cargo clean.

@Enselic
Copy link
Member

Enselic commented Sep 3, 2023

Triage: Thank you for reporting. Without a way for others to reproduce this ICE, there is not much that can be done. Closing this issue for now. Feel free to reopen if a way for others to reproduce if found.

@Enselic Enselic closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2023
@saethlin saethlin self-assigned this Apr 29, 2024
@saethlin saethlin reopened this Apr 29, 2024
@saethlin
Copy link
Member

As far as I can tell, the ICE reported in this issue is caused by another process damaging rustc's build artifacts or by a buggy filesystem. That other process could be anything from an IDE running the compiler at the same time as a manual build to a find-and-replace that accidentally edits files in the target directory.

#124686 contains a mitigation for this situation; the compiler now has a crude way to detect and ignore damaged incremental compilation files. You will still get a warning about the damaged file, but the build should proceed normally. That change shipped in Rust 1.80 which released today, so I am closing this issue and a few others which as far as I can tell all have the same root cause. You shouldn't see this ICE anymore, but please file a new issue if you see something like it on 1.80 or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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
Development

No branches or pull requests

6 participants