bazelbuild / bazelbuild/bazel

Downloading from remote cache could result in corrupted content.

Open
#19,005 5 comments 1 reaction 0 assignees View on GitHub
P3 stale team-Remote-Exec type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

```
[6 / 10] JavaToolchainCompileBootClasspath external/rules_java_builtin/toolchains/platformclasspath.jar; Downloading external/rules_java_builtin/toolchains/platformclasspath.jar, 203.3 MiB / 110.8 MiB; 106s remote
ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/ec321eb2cc2d0f8f91b676b6d4c66c29/sandbox/linux-sandbox/7126/execroot/io_bazel/_tmp/16e31ecd8e8fba871881f3f525083f34/root/ea091b9b7c388e139419c07b03c63cfd/external/rules_java_builtin/toolchains/BUILD:201:14: JavaToolchainCompileBootClasspath external/rules_java_builtin/toolchains/platformclasspath.jar failed: (Exit 34): Output bazel-out/k8-fastbuild/bin/external/rules_java_builtin/toolchains/platformclasspath.jar download failed: Expected digest '9a3960f467bf5458d7e1e62551853d4771660bc88fff9812dd06a0116ff48dc5/116164439' does not match received digest '713b7ab1c158b9f0446597b80d8e08708e5f5cc8705c3fe23baf22bb70f7cb00/226281303'.
```

Full log: https://storage.googleapis.com/bazel-untrusted-buildkite-artifacts/01897290-542f-43b8-8a0f-478ca58e3ba4/src/test/shell/bazel/remote/build_without_the_bytes_test/shard_2_of_5/test_attempts/attempt_1.log

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Not sure. The error is transient but maybe it is because we didn't fully clean up state before retry.

### Which operating system are you running Bazel on?

_No response_

### What is the output of `bazel info release`?

_No response_

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?

_No response_

### Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

_No response_

### Have you found anything relevant by searching the web?

_No response_

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the full log linked from the issue and the remote cache scenario in src/test/shell/bazel/remote/build_without_the_bytes_test. Examine the platformclasspath.jar download failure, especially the expected versus received digests and the note about incomplete cleanup before retrying; done means identifying and reproducing the corruption path and adding a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.