Skip to content

Commit 1dbcacb

Browse files
Fixes the flaky mutable_object_test (ray-project#44413)
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]>
1 parent e8b0f80 commit 1dbcacb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ray/object_manager/plasma/test/mutable_object_test.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ std::unique_ptr<plasma::MutableObject> MakeObject() {
113113
info.allocated_size = kPayloadSize;
114114

115115
uint8_t *ptr = static_cast<uint8_t *>(malloc(kSize));
116-
return std::make_unique<plasma::MutableObject>(ptr, info);
116+
auto ret = std::make_unique<plasma::MutableObject>(ptr, info);
117+
ret->header->Init();
118+
return ret;
117119
}
118120

119121
} // namespace

0 commit comments

Comments
 (0)