-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 panic while reading incremental index #48847
Labels
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) ❄️
WG-incr-comp
Working group: Incremental compilation
Comments
Centril
added
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
A-incr-comp
Area: Incremental compilation
C-bug
Category: This is a bug.
WG-incr-comp
Working group: Incremental compilation
labels
Mar 8, 2018
wesleywiser
added a commit
to wesleywiser/rust
that referenced
this issue
Mar 28, 2018
If the cached data can't be loaded from disk, just issue a warning to the user so they know why compilation is taking longer than usual but don't fail the entire compilation since we can recover by ignorning the on disk cache. In the same way, if the disk cache can't be deserialized (because it has been corrupted for some reason), report the issue as a warning and continue without failing the compilation. `Decodable::decode()` tends to panic with various errors like "entered unreachable code" or "index out of range" if the input data is corrupted. Work around this by catching panics from the `decode()` calls when joining the thread and continuing without the cached data. Fixes rust-lang#48847
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Mar 28, 2018
…e, r=michaelwoerister [incremental] Don't panic if decoding the cache fails If the cached data can't be loaded from disk, just issue a warning to the user so they know why compilation is taking longer than usual but don't fail the entire compilation since we can recover by ignorning the on disk cache. In the same way, if the disk cache can't be deserialized (because it has been corrupted for some reason), report the issue as a warning and continue without failing the compilation. `Decodable::decode()` tends to panic with various errors like "entered unreachable code" or "index out of range" if the input data is corrupted. Work around this by catching panics from the `decode()` calls and continuing without the cached data. Fixes rust-lang#48847
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.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
WG-incr-comp
Working group: Incremental compilation
rustc crashed during compilation with:
(This is a locally built rustc 1.24.0, compiled in the dev channel. It is being invoked from Buck in a custom build system, which is why the paths are atypical.)
It appears that the file is truncated, or corrupt in some way that makes it try to parse off the end of the file. This was on a machine that had been running into out-of-memory conditions, so its possible its a left-over from a previous failed compilation attempt.
I think rustc should handle corrupted incremental data by handling the error, deleting the file and compiling non-incrementally.
The text was updated successfully, but these errors were encountered: