Skip to content

rustc panic while reading incremental index #48847

Closed
@jsgf

Description

@jsgf

rustc crashed during compilation with:

$ buck test scm/mononoke/tests/integration                                                                                                             
error: could not load dep-graph from `buck-out/tmp/rust-incremental/bundle2_resolver-2xb5l9oneofqa/s-eyz77d7pz2-4k21tt-working/dep-graph.bin`: failed to fill whole buffer


thread '<unnamed>' panicked at 'index out of bounds: the len is 4194304 but the index is 4194304', rust/1.24.0/src/rust/src/libserialize/leb128.rs:59:20
note: Run with `RUST_BACKTRACE=1` for 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.24.0-dev running on x86_64-unknown-linux-gnu

thread 'rustc' panicked at 'Could not join with background dep_graph thread: Any', rust/src/libcore/result.rs:916:5

(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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️WG-incr-compWorking group: Incremental compilation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions