You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
builds with remote caching sometimes fails on incomplete downloads #5047
Sometimes builds with http remote caching enabled fail with Failed to delete output files after incomplete download. Cannot continue with local execution.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I've had some difficulty making this bug reproducible unfortunately, you need to have remote caching enabled and fail to download to an entry, which often still succeeds and falls back to local building.
What operating system are you running Bazel on?
A debian jessie based docker container.
What's the output of bazel info release?
release 0.11.0
Any other information, logs, or outputs that you want to share?
cc @buchgr@ixdy@rmmh
I've spent a fair bit of time trying to make this reproducible, unsuccesfuly. even digging through our logs most runs are either successful or actual failures, but this happens often enough to be a bad experience.
ERROR: /bazel-scratch/.cache/bazel/_bazel_root/27a95fe2fc68aa1195ddf1a4bbaaea62/external/io_bazel_rules_go/BUILD.bazel:9:1: GoStdlib external/io_bazel_rules_go/linux_amd64_race_stripped/stdlib~/pkg failed: Failed to delete output files after incomplete download. Cannot continue with local execution.: /bazel-scratch/.cache/bazel/_bazel_root/27a95fe2fc68aa1195ddf1a4bbaaea62/execroot/main/bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_race_stripped/stdlib~/pkg/linux_amd64_race (Directory not empty)
Per the logs these tests ran in the image gcr.io/k8s-testimages/kubekins-e2e:v20180627-0ed738715-experimental which is definitely 0.15.0:
$ docker run --rm -it --entrypoint=/bin/sh gcr.io/k8s-testimages/kubekins-e2e:v20180627-0ed738715-experimental
# bazel version
Extracting Bazel installation...
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
Build label: 0.15.0
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jun 26 12:10:19 2018 (1530015019)
Build timestamp: 1530015019
Build timestamp as int: 1530015019
I've personally hit this 3x today, I think we will downgrade to 0.14.0 in the short term..
Edit: I can't be completely certain yet, but AFAICT this regressed somewhere between 0.14.0 and 0.15.0
@BenTheElder sorry about that :(. I don't understand what's happening there yet. Can you try running with --remote_max_connections=200. I think this will avoid the failures in the first place.
I'm still seeing this issue using Bazel 0.17.1 and a medium sized iOS application (using rules_apple 0.7.0 and rules_swift as of 7bbcf9584613169cda709b9c217f5ac29cc5a089). Unfortunately I can't share the app but I'd be happy to help debug the issue.
ERROR: /Users/obonilla/r/learning-ios_trunk/LearningDataModel/BUILD.bazel:2:1: C++ compilation of rule '//LearningDataModel:LearningDataModel_ObjC' failed: Unexpected IO error.: Exhaused retry attempts (0)
This time though, I noticed that buried in the compilation output there is this:
WARNING: Error reading from the remote cache:
ClosedChannelException
However, the output seems wrong since I can't tell if it retried, and if so how many times it retried. I also ran it adding the flag --remote_local_fallback, which I expected would fail back to building if there was a problem with the remote cache, but it didn't appear to do anything.
Maybe this is a different issue... should I open a new Issue?
That's actually a different error, as the output does not contain Failed to delete output files after incomplete download. Cannot continue with local execution.. It's possible that local fallback is broken :. Please open a new issue.
That's actually a different error, as the output does not contain Failed to delete output files after incomplete download. Cannot continue with local execution.. It's possible that local fallback is broken :. Please open a new issue.
I am getting a ClosedChannelException error when trying to use bazel remote cache deployed on k8s. Was a separate issue opened for this?
Activity
BenTheElder commentedon Apr 18, 2018
cc @buchgr @ixdy @rmmh
I've spent a fair bit of time trying to make this reproducible, unsuccesfuly. even digging through our logs most runs are either successful or actual failures, but this happens often enough to be a bad experience.
buchgr commentedon Apr 19, 2018
Thanks for reporting. I ll take a look!
ixdy commentedon May 15, 2018
Still happening occasionally in in bazel 0.13.0. Failure from this morning: https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/54372/pull-kubernetes-e2e-gce-device-plugin-gpu/31984/
remote: recursively delete incomplete downloaded output directory.
BenTheElder commentedon May 16, 2018
Thanks @buchgr!
remote: recursively delete incomplete downloaded output directory.
remote: recursively delete incomplete downloaded output directory.
BenTheElder commentedon Jun 28, 2018
we're seeing this again with 0.15.0 :(
Test run a and b both hit an error like:
Per the logs these tests ran in the image
gcr.io/k8s-testimages/kubekins-e2e:v20180627-0ed738715-experimentalwhich is definitely0.15.0:BenTheElder commentedon Jun 29, 2018
I've personally hit this 3x today, I think we will downgrade to 0.14.0 in the short term..
Edit: I can't be completely certain yet, but AFAICT this regressed somewhere between 0.14.0 and 0.15.0
buchgr commentedon Jun 29, 2018
@BenTheElder sorry about that :(. I don't understand what's happening there yet. Can you try running with
--remote_max_connections=200. I think this will avoid the failures in the first place.I will try to reproduce the error.
36 remaining items
remote: fix race on download error. Fixes bazelbuild#5047
Release 0.16.0 (2018-07-31)
remote: limit number of open tcp connections by default. Fixes #5491
remote: fix race on download error. Fixes #5047
remote: limit number of open tcp connections by default. Fixes bazelb…
remote: fix race on download error. Fixes bazelbuild#5047
Release 0.16.1 (2018-08-13)
remote: limit number of open tcp connections by default. Fixes #5491
remote: fix race on download error. Fixes #5047
ob commentedon Sep 18, 2018
I'm still seeing this issue using Bazel 0.17.1 and a medium sized iOS application (using rules_apple 0.7.0 and rules_swift as of 7bbcf9584613169cda709b9c217f5ac29cc5a089). Unfortunately I can't share the app but I'd be happy to help debug the issue.
My config:
And I'm building with the command:
Where
Learningis anios_application. The error message is:buchgr commentedon Sep 19, 2018
Can you run with --verbose_failures and see if you get the same error message?
ob commentedon Sep 19, 2018
Same error message.
This time though, I noticed that buried in the compilation output there is this:
However, the output seems wrong since I can't tell if it retried, and if so how many times it retried. I also ran it adding the flag
--remote_local_fallback, which I expected would fail back to building if there was a problem with the remote cache, but it didn't appear to do anything.Maybe this is a different issue... should I open a new Issue?
buchgr commentedon Sep 20, 2018
That's actually a different error, as the output does not contain
Failed to delete output files after incomplete download. Cannot continue with local execution.. It's possible that local fallback is broken :. Please open a new issue.ob commentedon Dec 8, 2018
I'm seeing this one with Bazel 0.20.0. I think a failure in the remote cache:
triggered this again:
this was with
--jobs 2000so it might be that same race?rijosimon commentedon Mar 27, 2019
I am getting a ClosedChannelException error when trying to use bazel remote cache deployed on k8s. Was a separate issue opened for this?