Skip to content

Commit

Permalink
Fixes the flaky mutable_object_test (ray-project#44413)
Browse files Browse the repository at this point in the history
Based on a local issue I resolved, I believe this commit should fix the
flaky mutable_object_test in ray-project#44396.

The header of the mutable object was not being explicitly initialized.
In some cases, this caused deadlock due to a spinlock backed by garbage memory.

This commit explicitly initializes the header, which should resolve the
issue.

Tested: mutable_object_test

Signed-off-by: Jack Humphries <[email protected]>
  • Loading branch information
jackhumphries authored Apr 2, 2024
1 parent e8b0f80 commit 1dbcacb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ray/object_manager/plasma/test/mutable_object_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ std::unique_ptr<plasma::MutableObject> MakeObject() {
info.allocated_size = kPayloadSize;

uint8_t *ptr = static_cast<uint8_t *>(malloc(kSize));
return std::make_unique<plasma::MutableObject>(ptr, info);
auto ret = std::make_unique<plasma::MutableObject>(ptr, info);
ret->header->Init();
return ret;
}

} // namespace
Expand Down

0 comments on commit 1dbcacb

Please sign in to comment.