Skip to content

Commit

Permalink
[2/3] Bump grpc to 1.33.1 to fix corruption when downloading CAS blobs
Browse files Browse the repository at this point in the history
Part 2: Switch to grpc 1.33.1.

grpc-java versions 1.27 through 1.32 had a bug where messages could arrive
after the call was reported clsoed.  In the case of bazel, this meant that
in GrpcCacheClient, onNext could be called after onError.  This leads to
offset bookkeeping getting out of sync, and corrupts the CAS blob download.

#12927
  • Loading branch information
scele authored and philwo committed Mar 15, 2021
1 parent a6eff39 commit 848a517
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ distdir_tar(
# protocolbuffers/protobuf
"v3.13.0.tar.gz",
# grpc/grpc
"v1.32.0.tar.gz",
"v1.33.1.tar.gz",
# c-ares/c-ares
"e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz",
# protocolbuffers/upb
Expand Down Expand Up @@ -215,7 +215,7 @@ distdir_tar(
# protocolbuffers/protobuf
"v3.13.0.tar.gz": "9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a",
# grpc/grpc
"v1.32.0.tar.gz": "f880ebeb2ccf0e47721526c10dd97469200e40b5f101a0d9774eb69efa0bd07a",
"v1.33.1.tar.gz": "58eaee5c0f1bd0b92ebe1fa0606ec8f14798500620e7444726afcaf65041cb63",
# c-ares/c-ares
"e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz": "e8c2751ddc70fed9dc6f999acd92e232d5846f009ee1674f8aee81f19b2b915a",
# protocolbuffers/upb
Expand Down Expand Up @@ -298,9 +298,9 @@ distdir_tar(
"https://github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz",
],
# grpc/grpc
"v1.32.0.tar.gz": [
"https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.32.0.tar.gz",
"https://github.com/grpc/grpc/archive/v1.32.0.tar.gz",
"v1.33.1.tar.gz": [
"https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.33.1.tar.gz",
"https://github.com/grpc/grpc/archive/v1.33.1.tar.gz",
],
# c-ares/c-ares
"e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz": [
Expand Down Expand Up @@ -567,7 +567,7 @@ distdir_tar(
# protocolbuffers/protobuf
"v3.13.0.tar.gz",
# grpc/grpc
"v1.32.0.tar.gz",
"v1.33.1.tar.gz",
# c-ares/c-ares
"e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz",
# protocolbuffers/upb
Expand Down Expand Up @@ -601,7 +601,7 @@ distdir_tar(
# protocolbuffers/protobuf
"v3.13.0.tar.gz": "9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a",
# grpc/grpc
"v1.32.0.tar.gz": "f880ebeb2ccf0e47721526c10dd97469200e40b5f101a0d9774eb69efa0bd07a",
"v1.33.1.tar.gz": "58eaee5c0f1bd0b92ebe1fa0606ec8f14798500620e7444726afcaf65041cb63",
# c-ares/c-ares
"e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz": "e8c2751ddc70fed9dc6f999acd92e232d5846f009ee1674f8aee81f19b2b915a",
# protocolbuffers/upb
Expand Down Expand Up @@ -654,9 +654,9 @@ distdir_tar(
"https://github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz",
],
# grpc/grpc
"v1.32.0.tar.gz": [
"https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.32.0.tar.gz",
"https://github.com/grpc/grpc/archive/v1.32.0.tar.gz",
"v1.33.1.tar.gz": [
"https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.33.1.tar.gz",
"https://github.com/grpc/grpc/archive/v1.33.1.tar.gz",
],
# c-ares/c-ares
"e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz": [
Expand Down Expand Up @@ -1147,12 +1147,12 @@ register_toolchains("//src/main/res:empty_rc_toolchain")
http_archive(
name = "com_github_grpc_grpc",
patch_args = ["-p1"],
patches = ["//third_party/grpc:grpc_1.32.0.patch"],
sha256 = "f880ebeb2ccf0e47721526c10dd97469200e40b5f101a0d9774eb69efa0bd07a",
strip_prefix = "grpc-1.32.0",
patches = ["//third_party/grpc:grpc_1.33.1.patch"],
sha256 = "58eaee5c0f1bd0b92ebe1fa0606ec8f14798500620e7444726afcaf65041cb63",
strip_prefix = "grpc-1.33.1",
urls = [
"https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.32.0.tar.gz",
"https://github.com/grpc/grpc/archive/v1.32.0.tar.gz",
"https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.33.1.tar.gz",
"https://github.com/grpc/grpc/archive/v1.33.1.tar.gz",
],
)

Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi
GOOGLE_API_PROTOS="$(grep -o '".*\.proto"' third_party/googleapis/BUILD.bazel | sed 's/"//g' | sed 's|^|third_party/googleapis/|g')"
PROTO_FILES=$(find third_party/remoteapis ${GOOGLE_API_PROTOS} third_party/pprof src/main/protobuf src/main/java/com/google/devtools/build/lib/buildeventstream/proto src/main/java/com/google/devtools/build/skyframe src/main/java/com/google/devtools/build/lib/skyframe/proto src/main/java/com/google/devtools/build/lib/bazel/debug src/main/java/com/google/devtools/build/lib/starlarkdebug/proto src/main/java/com/google/devtools/build/lib/packages/metrics/package_metrics.proto -name "*.proto")
LIBRARY_JARS=$(find $ADDITIONAL_JARS third_party -name '*.jar' | grep -Fv JavaBuilder | grep -Fv third_party/guava/guava | grep -ve 'third_party/grpc/grpc.*jar' | tr "\n" " ")
GRPC_JAVA_VERSION=1.32.2
GRPC_JAVA_VERSION=1.33.1
GRPC_LIBRARY_JARS=$(find third_party/grpc -name '*.jar' | grep -e ".*${GRPC_JAVA_VERSION}.*jar" | tr "\n" " ")
GUAVA_VERSION=29.0
GUAVA_JARS=$(find third_party/guava -name '*.jar' | grep -e ".*${GUAVA_VERSION}.*jar" | tr "\n" " ")
Expand Down

0 comments on commit 848a517

Please sign in to comment.