Skip to content

[core] upgrade grpc to v1.58.0#61499

Merged
MengjinYan merged 10 commits intoray-project:masterfrom
rueian:upgrade-grpc-1580
Mar 12, 2026
Merged

[core] upgrade grpc to v1.58.0#61499
MengjinYan merged 10 commits intoray-project:masterfrom
rueian:upgrade-grpc-1580

Conversation

@rueian
Copy link
Copy Markdown
Contributor

@rueian rueian commented Mar 4, 2026

Description

Reintroduce the grpc upgrade for fixing setenv/getenv races. postmerge and premerge, including tsan, ubsan, macos, windows, tests passed.

Related issues

#61195

Additional information

Optional: Add implementation details, API changes, usage examples, screenshots, etc.

@rueian rueian added the go add ONLY when ready to merge, run all tests label Mar 4, 2026
@rueian rueian changed the title Upgrade grpc 1580 [core] upgrade grpc to v1.58.0 Mar 4, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades the gRPC dependency from version 1.57.1 to 1.58.0, and also updates the dependent boringssl library. A new patch, grpc-nextresult-cancelled-init.patch, is introduced to fix an uninitialized variable issue in gRPC's NextResult class. For future contributions, please consider filling out the pull request description to provide context about the changes and their motivation, which greatly helps reviewers.

Note: Security Review did not run due to the size of the PR.

…ect#61449)

This reverts commit 544a40f.

Signed-off-by: Rueian Huang <rueiancsie@gmail.com>
@rueian rueian force-pushed the upgrade-grpc-1580 branch 3 times, most recently from 68d906b to 11dbcc1 Compare March 4, 2026 23:21
Signed-off-by: Rueian Huang <rueiancsie@gmail.com>
@rueian rueian force-pushed the upgrade-grpc-1580 branch from 11dbcc1 to 3622f49 Compare March 4, 2026 23:39
Signed-off-by: Rueian Huang <rueiancsie@gmail.com>
@rueian rueian force-pushed the upgrade-grpc-1580 branch from 1ad62c0 to 7924c54 Compare March 6, 2026 00:41
rueian added 2 commits March 5, 2026 23:30
Signed-off-by: Rueian Huang <rueiancsie@gmail.com>
@rueian rueian force-pushed the upgrade-grpc-1580 branch from 8444de9 to d2aedf6 Compare March 8, 2026 02:09
Signed-off-by: Rueian Huang <rueiancsie@gmail.com>
+ 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.

@rueian rueian force-pushed the upgrade-grpc-1580 branch from 44dd2fa to 5185888 Compare March 10, 2026 21:00
Signed-off-by: Rueian Huang <rueiancsie@gmail.com>
@rueian rueian force-pushed the upgrade-grpc-1580 branch from 5185888 to 5d88dc4 Compare March 10, 2026 21:17
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.

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.

Signed-off-by: Rueian Huang <rueiancsie@gmail.com>
@rueian rueian marked this pull request as ready for review March 11, 2026 20:28
@rueian rueian requested a review from a team as a code owner March 11, 2026 20:28
@rueian rueian added core Issues that should be addressed in Ray Core labels Mar 11, 2026
Copy link
Copy Markdown
Contributor

@MengjinYan MengjinYan left a comment

Choose a reason for hiding this comment

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

Thanks!!

@MengjinYan
Copy link
Copy Markdown
Contributor

@aslonnie @andrew-anyscale to take a look as well

sha256 = "ec64fdab22726d50fc056474dd29401d914cc616f53ab8f2fe4866772881d581",
patches = [
"@io_ray//thirdparty/patches:grpc-cython-copts.patch",
"@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.

Signed-off-by: Rueian Huang <rueiancsie@gmail.com>
Copy link
Copy Markdown
Contributor

@andrew-anyscale andrew-anyscale left a comment

Choose a reason for hiding this comment

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

👏 nicely done! Approved

@MengjinYan MengjinYan enabled auto-merge (squash) March 11, 2026 22:53
@MengjinYan MengjinYan merged commit a20d303 into ray-project:master Mar 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants