Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions bazel/ray_deps_setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,19 @@ 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.1.tar.gz",
sha256 = "0762f809b9de845e6a7c809cabccad6aa4143479fd43b396611fe5a086c0aeeb",
url = "https://github.com/grpc/grpc/archive/refs/tags/v1.58.0.tar.gz",
sha256 = "ec64fdab22726d50fc056474dd29401d914cc616f53ab8f2fe4866772881d581",
patches = [
"@io_ray//thirdparty/patches:grpc-cython-copts.patch",
# Work around bazelbuild/bazel#21592: with layering_check and
# non-sandbox/local spawn, clang can record transitive *.cppmap files
# in .d files, which Bazel then reports as undeclared direct deps.
# Fixed in Bazel 7.3.0. LLVM used the same workaround by disabling
# layering_check in Bazel overlays (llvm/llvm-project@5bba176).
"@io_ray//thirdparty/patches:grpc-disable-layering-check.patch",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment referencing bug fix in Bazel 7.3.0 bazelbuild/bazel#21592, as well as llvm/llvm-project@5bba176 LLVM using the same workaround in their BUILD files (llvm/llvm-project@5bba176)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

"@io_ray//thirdparty/patches:grpc-zlib-fdopen.patch",
"@io_ray//thirdparty/patches:grpc-configurable-thread-count.patch",
"@io_ray//thirdparty/patches:grpc-nextresult-cancelled-init.patch",
],
)

Expand Down Expand Up @@ -324,8 +331,8 @@ 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",
url = "https://github.com/google/boringssl/archive/342e805bc1f5dfdd650e3f031686d6c939b095d9.tar.gz",
sha256 = "b21994a857a7aa6d5256ffe355c735ad4c286de44c6c81dfc04edc41a8feaeef",
url = "https://github.com/google/boringssl/archive/2ff4b968a7e0cfee66d9f151cb95635b43dc1d5b.tar.gz",
)

# The protobuf version we use to auto generate python and java code.
Expand Down
2 changes: 1 addition & 1 deletion src/ray/gcs/tests/gcs_health_check_manager_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ class GcsHealthCheckManagerTest : public ::testing::Test {
}

instrumented_io_context io_service;
std::shared_ptr<gcs::GcsHealthCheckManager> health_check;
std::unordered_map<NodeID, std::shared_ptr<rpc::GrpcServer>> servers;
std::unordered_set<NodeID> dead_nodes;
ray::observability::FakeHistogram fake_health_check_rpc_latency_ms_histogram_;
std::shared_ptr<gcs::GcsHealthCheckManager> health_check;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix tsan failure. The Async health-check callbacks may still run during teardown and record metric latency. Previously, FakeHistogram could be destroyed before health_check, causing races and failures.

const int64_t initial_delay_ms = 100;
const int64_t timeout_ms = 10;
const int64_t period_ms = 10;
Expand Down
4 changes: 4 additions & 0 deletions src/ray/raylet/tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ ray_cc_test(
name = "node_manager_test",
size = "small",
srcs = ["node_manager_test.cc"],
features = select({
"@platforms//os:windows": ["compiler_param_file"],
"//conditions:default": [],
}),
tags = ["team:core"],
deps = [
":util",
Expand Down
69 changes: 69 additions & 0 deletions thirdparty/patches/grpc-disable-layering-check.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
diff -u BUILD
--- BUILD
+++ BUILD
@@ -30,7 +30,3 @@
package(
- default_visibility = ["//visibility:public"],
- features = [
- "layering_check",
- "-parse_headers",
- ],
+ default_visibility = ["//visibility:public"],
)
diff -u src/core/BUILD
--- src/core/BUILD
+++ src/core/BUILD
@@ -25,6 +25,3 @@
package(
default_visibility = ["//:__subpackages__"],
- features = [
- "layering_check",
Copy link
Copy Markdown
Contributor Author

@rueian rueian Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suppress the undeclared inclusion flood in the build logs. This won't affect runtime behavior. See #61623 for more details.

- ],
)
diff -u src/cpp/ext/gsm/BUILD
--- src/cpp/ext/gsm/BUILD
+++ src/cpp/ext/gsm/BUILD
@@ -24,8 +24,5 @@
package(
default_visibility = ["//visibility:public"],
- features = [
- "layering_check",
- ],
)

grpc_cc_library(
diff -u src/cpp/ext/gcp/BUILD
--- src/cpp/ext/gcp/BUILD
+++ src/cpp/ext/gcp/BUILD
@@ -24,8 +24,5 @@
package(
default_visibility = ["//visibility:public"],
- features = [
- "layering_check",
- ],
)

grpc_cc_library(
diff -u src/cpp/ext/otel/BUILD
--- src/cpp/ext/otel/BUILD
+++ src/cpp/ext/otel/BUILD
@@ -24,8 +24,5 @@
package(
default_visibility = ["//visibility:public"],
- features = [
- "layering_check",
- ],
)

grpc_cc_library(
diff -u test/core/transport/binder/end2end/fuzzers/BUILD
--- test/core/transport/binder/end2end/fuzzers/BUILD
+++ test/core/transport/binder/end2end/fuzzers/BUILD
@@ -17,7 +17,4 @@

grpc_package(
name = "test/core/transport/binder/end2end/fuzzers",
- features = [
- "layering_check",
- ],
)
15 changes: 15 additions & 0 deletions thirdparty/patches/grpc-nextresult-cancelled-init.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git src/core/lib/promise/pipe.h b/src/core/lib/promise/pipe.h
--- src/core/lib/promise/pipe.h
+++ src/core/lib/promise/pipe.h
@@ -63,9 +63,9 @@
template <typename T>
class NextResult final {
public:
- NextResult() : center_(nullptr) {}
+ NextResult() : center_(nullptr), cancelled_(true) {}
explicit NextResult(RefCountedPtr<pipe_detail::Center<T>> center)
- : center_(std::move(center)) {
+ : center_(std::move(center)), cancelled_(false) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the ubsan check on the grpc library pass.

GPR_ASSERT(center_ != nullptr);
}
explicit NextResult(bool cancelled)
Loading