-
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
Failure to clean up incremental compilation artifacts should not be a hard error #57958
Comments
r? @Zoxc |
Yeah, that could be handled more robustly. Especially if the error indicates that the file does not exist. However, this is a strange case. The only code path triggering this just tries to delete all files in the directory: rust/src/librustc_incremental/persist/fs.rs Lines 378 to 385 in 79d8a0f
And the code even double-checks if that the file exists before trying to delete it. Is there some other process messing the incr. comp. dir? |
I don't think so, I've turned off RLS in my editor because it's too much overhead for Servo, so there shouldn't be. I think the directory may not have existed, I don't recall what the precise setup was (and that target dir is long gone now) |
How often does this occur? I've never seen it. |
I've seen it happen once
…On Fri, Feb 1, 2019, 3:10 AM Michael Woerister ***@***.*** wrote:
How often does this occur? I've never seen it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#57958 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABivSKBEHT1b9UeiRtmo7Yq8GVh6Z8t_ks5vJCCUgaJpZM4aW3OG>
.
|
I ran into this, and I was using rustup to switch rustc versions and rebuild a project. Also on a |
Seeing this frequently when building inside docker on travis https://travis-ci.org/gluon-lang/gluon-lang.org |
Should fix the intermittent errors reported in rust-lang#57958 cc rust-lang#48614
Which systems are you using? |
This build were using https://github.com/rust-lang/docker-rust/blob/master/1.33.0/stretch/slim/Dockerfile (though it was the 1.32 version of rust) |
fix: Make incremental artifact deletion more robust Should fix the intermittent errors reported in rust-lang#57958 cc rust-lang#48614
fix: Make incremental artifact deletion more robust Should fix the intermittent errors reported in rust-lang#57958 cc rust-lang#48614
@Manishearth @michaelwoerister I see this issue is still open; did anyone ever find a workaround for this? This error breaks my CI consistently, having to do with the base image for my builds having several pre-built crates on the image. I saw a few references to setting |
I haven't seen the error in a while |
I thought that #59449 fixed this issue. |
I think I see how this error could still be thrown. Working backwards:
Never in this whole sequence is there a check to see if the directory containing This leaves the question of why the directory would not exist in the first place... |
…build, correcting an issue described here: rust-lang#57958
Hi Daniel, |
Doesn't appear so (we're on GCP), although we switched to Rook recently so perhaps our fs type changed with that: Other factors to compare might be we are using Drone for CI, Skaffold + Helm for build & deploy into GKE Also we've not seen this issue since we made this patch, so unsure if it's gone away: p.s. we've been experimenting with Docker build bind mounts, which potentially remove the need for our pre-baked build image, and have confirmed this is not an issue of you go this route:
hope that is helpful |
Hi, indeed that is helpful. Using docker image sha256:5ebf5da012391d1556e312fb199d7172c202c7d6b51bac71d423ff7d4a64645e for registry.gitlab.com/veloren/veloren-docker-ci:latest ...
ln -s /dockercache/cache-all target
$ cargo test
Compiling veloren-common v0.6.0 (/builds/veloren/veloren/common)
Compiling veloren-voxygen v0.6.0 (/builds/veloren/veloren/voxygen)
Compiling veloren_network v0.1.0 (/builds/veloren/veloren/network)
Compiling veloren-world v0.6.0 (/builds/veloren/veloren/world)
Compiling veloren-client v0.6.0 (/builds/veloren/veloren/client)
Compiling veloren-server v0.6.0 (/builds/veloren/veloren/server)
Compiling veloren-chat-cli v0.6.0 (/builds/veloren/veloren/chat-cli)
error: Failed to delete invalidated or incompatible incremental compilation session directory contents `/dockercache/cache-all/debug/incremental/veloren_voxygen-29cc5aon4ib6e/s-foe120g0hi-17gfq9r-working/dep-graph.bin`: No such file or directory (os error 2).
error: aborting due to previous error
error: could not compile `veloren-voxygen`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed Interestingly you can get our docker image and see that the file does not exist! We are linking our cache docker container into the CI execution. Docker bind mounts might be feasible for us in the future, lets see. |
Same experience here with Jenkins and building inside a Docker container... it happens totally randomly. Hopefully someone turns this into a warning or something like that. Soon. |
This is basically rustc attempting to delete a file that no longer exists. This breaks the build, perhaps it should be a warning instead?
(I think you can get this kind of error if you keep around target dirs post rustup.)
The text was updated successfully, but these errors were encountered: