Skip to content

Commit

Permalink
Downgrade grpc from 1.57.0 to 1.50.2 (#39575)
Browse files Browse the repository at this point in the history
#39419 upgraded grpc, absl and protobuf to fix a memory leak but it turned out to have perf regression.

GRPC 1.50.2, protobuf 21.6, absl 2022062.1 have the memory leak but no perf regression so we downgrade to these versions.

All the changes we made to upgrade to 1.57.0 are still needed.
  • Loading branch information
jjyao authored Sep 13, 2023
1 parent 8094bda commit 7414a8d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
27 changes: 12 additions & 15 deletions bazel/ray_deps_setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ def ray_deps_setup():
# This is copied from grpc's bazel/grpc_deps.bzl
http_archive(
name = "com_google_protobuf",
sha256 = "76a33e2136f23971ce46c72fd697cd94dc9f73d56ab23b753c3e16854c90ddfd",
strip_prefix = "protobuf-2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a",
sha256 = "63c5539a8506dc6bccd352a857cea106e0a389ce047a3ff0a78fe3f8fede410d",
strip_prefix = "protobuf-24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb",
urls = [
# https://github.com/protocolbuffers/protobuf/commits/v23.4
"https://github.com/protocolbuffers/protobuf/archive/2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a.tar.gz",
# https://github.com/protocolbuffers/protobuf/commits/v21.6
"https://github.com/protocolbuffers/protobuf/archive/24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb.tar.gz"
],
patches = [
"@com_github_grpc_grpc//third_party:protobuf.patch",
Expand Down Expand Up @@ -220,11 +220,8 @@ def ray_deps_setup():
# This is how diamond dependencies are prevented.
auto_http_archive(
name = "com_google_absl",
sha256 = "5366d7e7fa7ba0d915014d387b66d0d002c03236448e1ba9ef98122c13b35c36",
strip_prefix = "abseil-cpp-20230125.3",
urls = [
"https://github.com/abseil/abseil-cpp/archive/20230125.3.tar.gz",
],
url = "https://github.com/abseil/abseil-cpp/archive/refs/tags/20220623.1.tar.gz",
sha256 = "91ac87d30cc6d79f9ab974c51874a704de9c2647c40f6932597329a282217ba8",
)

# OpenCensus depends on jupp0r/prometheus-cpp
Expand All @@ -243,8 +240,8 @@ def ray_deps_setup():
auto_http_archive(
name = "com_github_grpc_grpc",
# NOTE: If you update this, also update @boringssl's hash.
url = "https://github.com/grpc/grpc/archive/refs/tags/v1.57.0.tar.gz",
sha256 = "8393767af531b2d0549a4c26cf8ba1f665b16c16fb6c9238a7755e45444881dd",
url = "https://github.com/grpc/grpc/archive/refs/tags/v1.50.2.tar.gz",
sha256 = "e941752638a92f21e27566903e1eb9b4a6380d70ca5ce91116b4cff6cb8fe2f2",
patches = [
"@com_github_ray_project_ray//thirdparty/patches:grpc-cython-copts.patch",
],
Expand Down Expand Up @@ -289,11 +286,11 @@ def ray_deps_setup():
# https://github.com/grpc/grpc/blob/1ff1feaa83e071d87c07827b0a317ffac673794f/bazel/grpc_deps.bzl#L189
# Ensure this rule matches the rule used by grpc's bazel/grpc_deps.bzl
name = "boringssl",
sha256 = "0675a4f86ce5e959703425d6f9063eaadf6b61b7f3399e77a154c0e85bad46b1",
strip_prefix = "boringssl-342e805bc1f5dfdd650e3f031686d6c939b095d9",
sha256 = "ad0b806b6c5cbd6cae121c608945d5fed468748e330632e8d53315089ad52c67",
strip_prefix = "boringssl-6195bf8242156c9a2fa75702eee058f91b86a88b",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/342e805bc1f5dfdd650e3f031686d6c939b095d9.tar.gz",
"https://github.com/google/boringssl/archive/342e805bc1f5dfdd650e3f031686d6c939b095d9.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/6195bf8242156c9a2fa75702eee058f91b86a88b.tar.gz",
"https://github.com/google/boringssl/archive/6195bf8242156c9a2fa75702eee058f91b86a88b.tar.gz",
],
)

Expand Down
2 changes: 0 additions & 2 deletions thirdparty/patches/grpc-cython-copts.patch
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ diff --git bazel/cython_library.bzl bazel/cython_library.bzl
+ srcs = [stem + ".cpp"] + cc_kwargs.pop("srcs", []),
- deps = deps + ["@local_config_python//:python_headers"],
+ deps = deps + ["@local_config_python//:python_headers"] + cc_kwargs.pop("deps", []),
- defines = defines,
+ defines = defines,
- linkshared = 1,
+ linkshared = cc_kwargs.pop("linkshared", 1),
+ **cc_kwargs
Expand Down

0 comments on commit 7414a8d

Please sign in to comment.