mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mesos Reviewbot <revi...@mesos.apache.org>
Subject Re: Review Request 55701: Fixed unsafe usage of process pointer in async.hpp.
Date Thu, 19 Jan 2017 13:41:01 GMT

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



Patch looks great!

Reviews applied: [55701]

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

- Mesos Reviewbot


On Jan. 19, 2017, 2:41 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55701/
> -----------------------------------------------------------
> 
> (Updated Jan. 19, 2017, 2:41 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Hindman, Benjamin Mahler, and Michael
Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `async(...)` helper spawns a libprocess actor to execute some
> lambda (asynchronously, of course).  This actor is owned by the
> libprocess GC actor, but the `AsyncExecutor` stores a copy of that
> pointer and dereferences it in several possible locations.
> 
> Instead, the `AsyncExecutor` should store the `PID` of the actor,
> which can be safely used, even if the actor has already terminated;
> such as turning libprocess finalization.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/async.hpp 8565a52c6ba4008edb852e898b8f0b6d598a194f

> 
> Diff: https://reviews.apache.org/r/55701/diff/
> 
> 
> Testing
> -------
> 
> Applied the following change:
> ```
> diff --git a/src/launcher/executor.cpp b/src/launcher/executor.cpp
> index e035a4e..4c60ef9 100644
> --- a/src/launcher/executor.cpp
> +++ b/src/launcher/executor.cpp
> @@ -936,6 +930,8 @@ int main(int argc, char** argv)
>  
>    process::spawn(executor.get());
>    process::wait(executor.get());
> +  executor.reset();
>  
> +  process::finalize(true);
>    return EXIT_SUCCESS;
>  }
> ```
> 
> And then ran:
> ```
> make check GTEST_FILTER="HTTPCommandExecutorTest.TerminateWithACK"
> ```
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message