From 848a51747a460ab4c5185e4c61ab522a9981cbea Mon Sep 17 00:00:00 2001 From: Lauri Peltonen Date: Wed, 17 Feb 2021 09:47:05 +0200 Subject: [PATCH] [2/3] Bump grpc to 1.33.1 to fix corruption when downloading CAS blobs 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. https://github.com/bazelbuild/bazel/issues/12927 --- WORKSPACE | 30 +++++++++++++++--------------- scripts/bootstrap/compile.sh | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index b91ac70c2639fe..b61927c06ee42b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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 @@ -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 @@ -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": [ @@ -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 @@ -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 @@ -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": [ @@ -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", ], ) diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh index d416f8af84a9cb..f9a152f1459d65 100755 --- a/scripts/bootstrap/compile.sh +++ b/scripts/bootstrap/compile.sh @@ -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" " ")