Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raylet memory corruption fixes #2591

Merged
merged 4 commits into from
Aug 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/ray/common/client_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ray::Status ServerConnection<T>::WriteMessage(int64_t type, int64_t length,
boost::system::error_code error;
WriteBuffer(message_buffers, error);
if (error) {
return ray::Status::IOError(error.message());
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks strange why error.message() is corrupted. May we could print error.value() as well since that's valid? That might also give some hints on what kind of errors encountered.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, I think it'd be preferable to do strerror(ec.value()) as in #2548 so that we have the error message, even despite the fact that this is probably not platform independent.

We can address this by factoring out all of the calls to strerror(ec.value()) in a separate function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not certain that ec.value() is consistent with the errno numbers expected by strerror. There may be another way that's specific to boost. I am looking into it.

return ray::Status::IOError("Failed to write message to the socket");
} else {
return ray::Status::OK();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ray/raylet/reconstruction_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ void ReconstructionPolicy::Cancel(const ObjectID &object_id) {
// If there are no more needed objects created by this task, stop listening
// for notifications.
if (it->second.created_objects.empty()) {
listening_tasks_.erase(it);
// Cancel notifications for the task lease if we were subscribed to them.
if (it->second.subscribed) {
RAY_CHECK_OK(
task_lease_pubsub_.CancelNotifications(JobID::nil(), task_id, client_id_));
}
listening_tasks_.erase(it);
}
}

Expand Down