You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joseph Wu <jo...@mesosphere.io> on 2016/04/14 22:28:41 UTC

Re: Review Request 40266: Libprocess Reinit: Cleanup SocketManager alongside ProcessManager.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40266/
-----------------------------------------------------------

(Updated April 14, 2016, 1:28 p.m.)


Review request for mesos, Artem Harutyunyan and Joris Van Remoortere.


Changes
-------

Reviving this chain.  Rebased on Neil's memory leak fixes.


Summary (updated)
-----------------

Libprocess Reinit: Cleanup SocketManager alongside ProcessManager.


Bugs: MESOS-3910
    https://issues.apache.org/jira/browse/MESOS-3910


Repository: mesos


Description (updated)
-------

The `SocketManager` and `ProcessManager` are highly inter-dependent, 
which requires some untangling in `process::finalize`.

* Logic originally found in `~ProcessManager` has been split into 
  `ProcessManager::finalize` due to what happens during cleanup.
* The future from `__s__->accept()` must be explicitly discarded as 
  libevent does not detect a locally closed socket.


Diffs (updated)
-----

  3rdparty/libprocess/src/process.cpp afeddec20495bb9621c3e26b0d425c9419654739 

Diff: https://reviews.apache.org/r/40266/diff/


Testing
-------

`make check` (libev)
`make check` (--enable-libevent --enable-ssl)


Thanks,

Joseph Wu


Re: Review Request 40266: Libprocess Reinit: Cleanup SocketManager alongside ProcessManager.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40266/#review130502
-----------------------------------------------------------



Some inline TODO's from an offline review (with Joris & Neil).


3rdparty/libprocess/src/process.cpp (lines 781 - 788)
<https://reviews.apache.org/r/40266/#comment194261>

    Write a test for this.  i.e. Try to connect to this socket (with plain sockets) while `process::finalize` is running.



3rdparty/libprocess/src/process.cpp (line 1106)
<https://reviews.apache.org/r/40266/#comment194257>

    Consider moving to `::finalize`.  The unproxy code should mostly remain in-place.



3rdparty/libprocess/src/process.cpp (lines 2036 - 2040)
<https://reviews.apache.org/r/40266/#comment194259>

    Save `PID` and terminate via `PID`.  This is a better guarantee against asynchronous/multiple termination events.



3rdparty/libprocess/src/process.cpp (line 2279)
<https://reviews.apache.org/r/40266/#comment194260>

    Rename to something that doesn't semantically collide with `process::finalize`.  Not as explicit as `clean_up_all_but_gc()`, but along those lines.


- Joseph Wu


On April 14, 2016, 1:28 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40266/
> -----------------------------------------------------------
> 
> (Updated April 14, 2016, 1:28 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3910
>     https://issues.apache.org/jira/browse/MESOS-3910
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `SocketManager` and `ProcessManager` are highly inter-dependent, 
> which requires some untangling in `process::finalize`.
> 
> * Logic originally found in `~ProcessManager` has been split into 
>   `ProcessManager::finalize` due to what happens during cleanup.
> * The future from `__s__->accept()` must be explicitly discarded as 
>   libevent does not detect a locally closed socket.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp afeddec20495bb9621c3e26b0d425c9419654739 
> 
> Diff: https://reviews.apache.org/r/40266/diff/
> 
> 
> Testing
> -------
> 
> `make check` (libev)
> `make check` (--enable-libevent --enable-ssl)
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 40266: Libprocess Reinit: Cleanup SocketManager alongside ProcessManager.

Posted by Neil Conway <ne...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40266/#review130501
-----------------------------------------------------------




3rdparty/libprocess/src/process.cpp (line 1356)
<https://reviews.apache.org/r/40266/#comment194255>

    "each socket"



3rdparty/libprocess/src/process.cpp (line 1357)
<https://reviews.apache.org/r/40266/#comment194256>

    "interdependency" => "a dependency"


- Neil Conway


On April 14, 2016, 8:28 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40266/
> -----------------------------------------------------------
> 
> (Updated April 14, 2016, 8:28 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3910
>     https://issues.apache.org/jira/browse/MESOS-3910
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `SocketManager` and `ProcessManager` are highly inter-dependent, 
> which requires some untangling in `process::finalize`.
> 
> * Logic originally found in `~ProcessManager` has been split into 
>   `ProcessManager::finalize` due to what happens during cleanup.
> * The future from `__s__->accept()` must be explicitly discarded as 
>   libevent does not detect a locally closed socket.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp afeddec20495bb9621c3e26b0d425c9419654739 
> 
> Diff: https://reviews.apache.org/r/40266/diff/
> 
> 
> Testing
> -------
> 
> `make check` (libev)
> `make check` (--enable-libevent --enable-ssl)
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>