Re: Review Request 45999: Ensure GC is terminated last during libprocess shutdown.

2016-07-13 Thread Joseph Wu

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


Ship it!




Note: I replaced `NULL` with `nullptr` prior to committing.

- Joseph Wu


On June 2, 2016, 1:30 p.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45999/
> ---
> 
> (Updated June 2, 2016, 1:30 p.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-5144
> https://issues.apache.org/jira/browse/MESOS-5144
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Without this change, `finalize()` terminates processes in the order
> that they happen to be found when iterating over the `processes`
> map. That means that if the GarbageCollector process is terminated
> while any GC-managed processes are still running, those processes
> will not be GC'd (i.e., they will be leaked).
> 
> Fix this by skipping the garbage collector process when iterating
> over `processes` in `finalize()`, and then only terminating it after
> all other processes have been terminated.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/process.cpp 
> be120fb85583d438401c24a57dac803be3b5e5d2 
> 
> Diff: https://reviews.apache.org/r/45999/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> Confirmed reduction of leaked memory via ASAN on Linux/amd64.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 45999: Ensure GC is terminated last during libprocess shutdown.

2016-06-02 Thread Neil Conway

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

(Updated June 2, 2016, 8:30 p.m.)


Review request for mesos and Joris Van Remoortere.


Changes
---

Rebase.


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


Repository: mesos


Description
---

Without this change, `finalize()` terminates processes in the order
that they happen to be found when iterating over the `processes`
map. That means that if the GarbageCollector process is terminated
while any GC-managed processes are still running, those processes
will not be GC'd (i.e., they will be leaked).

Fix this by skipping the garbage collector process when iterating
over `processes` in `finalize()`, and then only terminating it after
all other processes have been terminated.


Diffs (updated)
-

  3rdparty/libprocess/src/process.cpp be120fb85583d438401c24a57dac803be3b5e5d2 

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


Testing
---

make check

Confirmed reduction of leaked memory via ASAN on Linux/amd64.


Thanks,

Neil Conway



Re: Review Request 45999: Ensure GC is terminated last during libprocess shutdown.

2016-04-11 Thread Neil Conway


> On April 11, 2016, 4:06 a.m., Kevin Klues wrote:
> > 3rdparty/libprocess/src/process.cpp, lines 2170-2195
> > 
> >
> > Is there a reason, we can't just remove the gc process from the list as 
> > a preliminary step, and then leave the rest of the logic as is? Followed by 
> > the explicit gc terminate/delete?

That was actually the original approach that I took, but removing `gc` from 
`processes` manually breaks some invariants in the code -- for example, 
`process::wait(gc)` is a no-op if `gc` has been removed from `processes`, which 
makes it a bit tricky to wait for `gc` to terminate. I think the approach in 
this RR is safer.


- Neil


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


On April 11, 2016, 3:48 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45999/
> ---
> 
> (Updated April 11, 2016, 3:48 a.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-5144
> https://issues.apache.org/jira/browse/MESOS-5144
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Without this change, `finalize()` terminates processes in the order
> that they happen to be found when iterating over the `processes`
> map. That means that if the GarbageCollector process is terminated
> while any GC-managed processes are still running, those processes
> will not be GC'd (i.e., they will be leaked).
> 
> Fix this by skipping the garbage collector process when iterating
> over `processes` in `finalize()`, and then only terminating it after
> all other processes have been terminated.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/process.cpp 
> 5e9dcfdc52f3a8223bc43af149b8e1f5dbdf5b0a 
> 
> Diff: https://reviews.apache.org/r/45999/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> Confirmed reduction of leaked memory via ASAN on Linux/amd64.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 45999: Ensure GC is terminated last during libprocess shutdown.

2016-04-11 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [45991, 45995, 45996, 45999]

Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' 
COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On April 11, 2016, 3:48 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45999/
> ---
> 
> (Updated April 11, 2016, 3:48 a.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-5144
> https://issues.apache.org/jira/browse/MESOS-5144
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Without this change, `finalize()` terminates processes in the order
> that they happen to be found when iterating over the `processes`
> map. That means that if the GarbageCollector process is terminated
> while any GC-managed processes are still running, those processes
> will not be GC'd (i.e., they will be leaked).
> 
> Fix this by skipping the garbage collector process when iterating
> over `processes` in `finalize()`, and then only terminating it after
> all other processes have been terminated.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/process.cpp 
> 5e9dcfdc52f3a8223bc43af149b8e1f5dbdf5b0a 
> 
> Diff: https://reviews.apache.org/r/45999/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> Confirmed reduction of leaked memory via ASAN on Linux/amd64.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Re: Review Request 45999: Ensure GC is terminated last during libprocess shutdown.

2016-04-10 Thread Kevin Klues

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




3rdparty/libprocess/src/process.cpp (lines 2167 - 2188)


Is there a reason, we can't just remove the gc process from the list as a 
preliminary step, and then leave the rest of the logic as is? Followed by the 
explicit gc terminate/delete?


- Kevin Klues


On April 11, 2016, 3:48 a.m., Neil Conway wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45999/
> ---
> 
> (Updated April 11, 2016, 3:48 a.m.)
> 
> 
> Review request for mesos and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-5144
> https://issues.apache.org/jira/browse/MESOS-5144
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Without this change, `finalize()` terminates processes in the order
> that they happen to be found when iterating over the `processes`
> map. That means that if the GarbageCollector process is terminated
> while any GC-managed processes are still running, those processes
> will not be GC'd (i.e., they will be leaked).
> 
> Fix this by skipping the garbage collector process when iterating
> over `processes` in `finalize()`, and then only terminating it after
> all other processes have been terminated.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/src/process.cpp 
> 5e9dcfdc52f3a8223bc43af149b8e1f5dbdf5b0a 
> 
> Diff: https://reviews.apache.org/r/45999/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> Confirmed reduction of leaked memory via ASAN on Linux/amd64.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>



Review Request 45999: Ensure GC is terminated last during libprocess shutdown.

2016-04-10 Thread Neil Conway

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

Review request for mesos and Joris Van Remoortere.


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


Repository: mesos


Description
---

Without this change, `finalize()` terminates processes in the order
that they happen to be found when iterating over the `processes`
map. That means that if the GarbageCollector process is terminated
while any GC-managed processes are still running, those processes
will not be GC'd (i.e., they will be leaked).

Fix this by skipping the garbage collector process when iterating
over `processes` in `finalize()`, and then only terminating it after
all other processes have been terminated.


Diffs
-

  3rdparty/libprocess/src/process.cpp 5e9dcfdc52f3a8223bc43af149b8e1f5dbdf5b0a 

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


Testing
---

make check

Confirmed reduction of leaked memory via ASAN on Linux/amd64.


Thanks,

Neil Conway