You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Ben Mahler <be...@gmail.com> on 2015/10/16 01:32:20 UTC

Review Request 39363: Fixed a double deletion race in ProcessManager::wait.

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

Review request for mesos, Jie Yu and Joris Van Remoortere.


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


Repository: mesos


Description
-------

The current code non-atomically checks for the gate being empty in order to have last thread to arrive at the gate delete it. This is racy, and can lead to multiple threads trying to delete the gate! The information about how many waiters remain must come atomically from the call to Gate::arrive.


Diffs
-----

  3rdparty/libprocess/src/gate.hpp 7d5df706c601c3a1e2055d7f9b78caea0f4182e8 
  3rdparty/libprocess/src/process.cpp 0454554e7b6a39f94cfea02f08ca51ef6b35859a 

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


Testing
-------

Ran the tests in a loop.


Thanks,

Ben Mahler


Re: Review Request 39363: Fixed a double deletion race in ProcessManager::wait.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39363/#review102835
-----------------------------------------------------------

Ship it!


Ship It!

- Jie Yu


On Oct. 15, 2015, 11:32 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39363/
> -----------------------------------------------------------
> 
> (Updated Oct. 15, 2015, 11:32 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3728
>     https://issues.apache.org/jira/browse/MESOS-3728
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The current code non-atomically checks for the gate being empty in order to have last thread to arrive at the gate delete it. This is racy, and can lead to multiple threads trying to delete the gate! The information about how many waiters remain must come atomically from the call to Gate::arrive.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/gate.hpp 7d5df706c601c3a1e2055d7f9b78caea0f4182e8 
>   3rdparty/libprocess/src/process.cpp 0454554e7b6a39f94cfea02f08ca51ef6b35859a 
> 
> Diff: https://reviews.apache.org/r/39363/diff/
> 
> 
> Testing
> -------
> 
> Ran the tests in a loop.
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>