Skip to content

Compiler unexpectedly panics occasionally on Windows #48700

Closed as not planned
Closed as not planned
@igmanthony

Description

@igmanthony

Within all of my projects, when I run "cargo run" while in the directory of the project, the compiler occasionally panics and outputs:

warning: error copying object file `C:\Users\Ian_Anthony\svd2\target\debug\deps\svd2-6e54b28804aea753.3s4d4kekc4aqhd.rcgu.o` to incremental directory as `\\?\C:\Users\Ian_Anthony\svd2\target\debug\incremental\svd2-3ho7dmdfxg9p9\s-eytrqlmgkk-1skg6ha-working\3s4d4kekc4aqhd.o`: Access is denied. (os error 5)

warning: file-system error deleting outdated file `\\?\C:\Users\Ian_Anthony\svd2\target\debug\incremental\svd2-3ho7dmdfxg9p9\s-eytrqlmgkk-1skg6ha-working\3s4d4kekc4aqhd.o`: The system cannot find the file specified. (os error 2)

error: failed to remove C:\Users\Ian_Anthony\svd2\target\debug\deps\svd2-6e54b28804aea753.49lx1q7cxvpykyv0.rcgu.o: The process cannot access the file because it is being used by another process. (os error 32)

warning: Error finalizing incremental compilation session directory `\\?\C:\Users\Ian_Anthony\svd2\target\debug\incremental\svd2-3ho7dmdfxg9p9\s-eytrqlmgkk-1skg6ha-working`: The system cannot find the file specified. (os error 2)

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 (4d90ac38c 2018-02-12) running on x86_64-pc-windows-msvc

thread 'rustc' panicked at 'src\librustc\session\mod.rs:650: Trying to invalidate IncrCompSession `InvalidBecauseOfErrors { session_directory: "\\\\?\\C:\\Users\\Ian_Anthony\\svd2\\target\\debug\\incremental\\svd2-3ho7dmdfxg9p9\\s-eytrqlmgkk-1skg6ha-working" }`', src\librustc\session\mod.rs:1141:26
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: Could not compile `svd2`.

Previous to 1.24 I did not experience this. Generally if I re-run the code without changing anything (i.e., I see the error/panic, retype "cargo run" and hit enter in the console) it compiles properly (so the compilation error / panic is annoying, but not critical in my case). I use Windows at work and Linux (Xubuntu 17.10) at home. If I work on the same code at home (on my linux box) the compiler error doesn't ever occur. My thoughts are that it might be something due to incremental compilation on Windows, but I'm new to Rust (and compiled code in general) so I'm not sure.

`rustc --version --verbose`:

rustc 1.24.0 (4d90ac38c 2018-02-12)
binary: rustc
commit-hash: 4d90ac38c0b61bb69470b61ea2cccea0df48d9e5
commit-date: 2018-02-12
host: x86_64-pc-windows-msvc
release: 1.24.0
LLVM version: 4.0

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) ❄️O-windowsOperating system: WindowsS-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions