You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Artem Harutyunyan (JIRA)" <ji...@apache.org> on 2016/08/09 21:59:21 UTC
[jira] [Updated] (MESOS-3910) Libprocess: Implement cleanup of the
SocketManager in process::finalize
[ https://issues.apache.org/jira/browse/MESOS-3910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Artem Harutyunyan updated MESOS-3910:
-------------------------------------
Sprint: Mesosphere Sprint 40, Mesosphere Sprint 41 (was: Mesosphere Sprint 40)
> Libprocess: Implement cleanup of the SocketManager in process::finalize
> -----------------------------------------------------------------------
>
> Key: MESOS-3910
> URL: https://issues.apache.org/jira/browse/MESOS-3910
> Project: Mesos
> Issue Type: Task
> Components: libprocess, test
> Reporter: Joseph Wu
> Assignee: Joseph Wu
> Labels: mesosphere
>
> The {{socket_manager}} and {{process_manager}} are intricately tied together. Currently, only the {{process_manager}} is cleaned up by {{process::finalize}}.
> To clean up the {{socket_manager}}, we must close all sockets and deallocate any existing {{HttpProxy}} or {{Encoder}} objects. And we should prevent further objects from being created/tracked by the {{socket_manager}}.
> *Proposal*
> # Clean up all processes other than {{gc}}. This will clear all links and delete all {{HttpProxy}} s while {{socket_manager}} still exists.
> # Close all sockets via {{SocketManager::close}}. All of {{socket_manager}} 's state is cleaned up via {{SocketManager::close}}, including termination of {{HttpProxy}} (termination is idempotent, meaning that killing {{HttpProxy}} s via {{process_manager}} is safe).
> # At this point, {{socket_manager}} should be empty and only the {{gc}} process should be running. (Since we're finalizing, assume there are no threads trying to spawn processes.) {{socket_manager}} can be deleted.
> # {{gc}} can be deleted. This is currently a leaked pointer, so we'll also need to track and delete that.
> # {{process_manager}} should be devoid of processes, so we can proceed with cleanup (join threads, stop the {{EventLoop}}, etc).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)