Skip to content
Open
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
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,6 @@ build:macos --host_copt=-mmacosx-version-min=12.0
build:macos --host_linkopt=-mmacosx-version-min=12.0
# This option controls whether javac checks for missing direct dependencies.
build --experimental_strict_java_deps=off
# Emit Java 8 bytecode. rules_java 7.x defaulted to 8; 8.x defaults to 11, which
# breaks consumers on a Java 8 runtime (e.g. RayDP).
build --java_language_version=8
21 changes: 7 additions & 14 deletions src/ray/gcs/actor/tests/gcs_actor_manager_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1885,8 +1885,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
rpc::GetAllActorInfoRequest request;
request.mutable_filters()->set_actor_id(actor->GetActorID().Binary());

auto &reply =
*google::protobuf::Arena::CreateMessage<rpc::GetAllActorInfoReply>(&arena);
auto &reply = *google::protobuf::Arena::Create<rpc::GetAllActorInfoReply>(&arena);
gcs_actor_manager_->HandleGetAllActorInfo(request, &reply, callback);
ASSERT_EQ(reply.actor_table_data().size(), 1);
ASSERT_EQ(reply.total(), 1 + num_other_actors);
Expand All @@ -1898,8 +1897,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
rpc::GetAllActorInfoRequest request;
request.mutable_filters()->set_job_id(job_id.Binary());

auto &reply =
*google::protobuf::Arena::CreateMessage<rpc::GetAllActorInfoReply>(&arena);
auto &reply = *google::protobuf::Arena::Create<rpc::GetAllActorInfoReply>(&arena);
gcs_actor_manager_->HandleGetAllActorInfo(request, &reply, callback);
ASSERT_EQ(reply.actor_table_data().size(), 1);
ASSERT_EQ(reply.num_filtered(), num_other_actors);
Expand All @@ -1910,8 +1908,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
rpc::GetAllActorInfoRequest request;
request.mutable_filters()->set_state(rpc::ActorTableData::ALIVE);

auto &reply =
*google::protobuf::Arena::CreateMessage<rpc::GetAllActorInfoReply>(&arena);
auto &reply = *google::protobuf::Arena::Create<rpc::GetAllActorInfoReply>(&arena);
gcs_actor_manager_->HandleGetAllActorInfo(request, &reply, callback);
ASSERT_EQ(reply.actor_table_data().size(), 1);
ASSERT_EQ(reply.num_filtered(), num_other_actors);
Expand All @@ -1923,8 +1920,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
request.mutable_filters()->set_state(rpc::ActorTableData::ALIVE);
request.mutable_filters()->set_job_id(job_id.Binary());

auto &reply =
*google::protobuf::Arena::CreateMessage<rpc::GetAllActorInfoReply>(&arena);
auto &reply = *google::protobuf::Arena::Create<rpc::GetAllActorInfoReply>(&arena);
gcs_actor_manager_->HandleGetAllActorInfo(request, &reply, callback);
ASSERT_EQ(reply.actor_table_data().size(), 1);
ASSERT_EQ(reply.num_filtered(), num_other_actors);
Expand All @@ -1934,8 +1930,7 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoFilters) {
request.mutable_filters()->set_state(rpc::ActorTableData::DEAD);
request.mutable_filters()->set_job_id(job_id.Binary());

auto &reply =
*google::protobuf::Arena::CreateMessage<rpc::GetAllActorInfoReply>(&arena);
auto &reply = *google::protobuf::Arena::Create<rpc::GetAllActorInfoReply>(&arena);
gcs_actor_manager_->HandleGetAllActorInfo(request, &reply, callback);
ASSERT_EQ(reply.num_filtered(), num_other_actors + 1);
ASSERT_EQ(reply.actor_table_data().size(), 0);
Expand All @@ -1957,15 +1952,13 @@ TEST_F(GcsActorManagerTest, TestGetAllActorInfoLimit) {

{
rpc::GetAllActorInfoRequest request;
auto &reply =
*google::protobuf::Arena::CreateMessage<rpc::GetAllActorInfoReply>(&arena);
auto &reply = *google::protobuf::Arena::Create<rpc::GetAllActorInfoReply>(&arena);
auto callback = [](Status, std::function<void()>, std::function<void()>) {};
gcs_actor_manager_->HandleGetAllActorInfo(request, &reply, callback);
ASSERT_EQ(reply.actor_table_data().size(), 3);

request.set_limit(2);
auto &reply_2 =
*google::protobuf::Arena::CreateMessage<rpc::GetAllActorInfoReply>(&arena);
auto &reply_2 = *google::protobuf::Arena::Create<rpc::GetAllActorInfoReply>(&arena);
gcs_actor_manager_->HandleGetAllActorInfo(request, &reply_2, callback);
ASSERT_EQ(reply_2.actor_table_data().size(), 2);
ASSERT_EQ(reply_2.total(), 3);
Expand Down
2 changes: 1 addition & 1 deletion src/ray/rpc/server_call.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class ServerCallImpl : public ServerCall {
start_time_(0),
record_metrics_(record_metrics),
server_metrics_(server_metrics) {
reply_ = google::protobuf::Arena::CreateMessage<Reply>(&arena_);
reply_ = google::protobuf::Arena::Create<Reply>(&arena_);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Arena Create leaves reply unbound

High Severity

On the current protobuf 23.4 pin, Arena::Create default-constructs the reply and does not pass the arena, so GetArena() stays null. HandleGetAllActorInfo then check-fails when show_dead_jobs is true, which is the path that lists actors from finished jobs.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 239b18b. Configure here.

// TODO(Yi Cheng) call_name_ sometimes get corrunpted due to memory issues.
RAY_CHECK(!call_name_.empty()) << "Call name is empty";
if (record_metrics_) {
Expand Down
Loading