You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Greg Mann <gr...@mesosphere.io> on 2017/01/20 22:15:23 UTC

Review Request 55787: Eliminated a race in libprocess 'Loop'.

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

Review request for mesos, Anand Mazumdar and Michael Park.


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


Repository: mesos


Description
-------

In `process::internal::Loop`, we intend to synchronize all
accesses to the `discard` member, since otherwise there would
be a race between setting and calling this lambda. However,
one assignment of the member remains unsynchronized. This
patch synchronizes this assignment to avoid a race.


Diffs
-----

  3rdparty/libprocess/include/process/loop.hpp 8bd9715246e72474a35a0f1af94c8a5a3e87dd7a 

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


Testing
-------

A "double free or corruption" error was showing up consistently on the ASF CI when calling `Pipe::Reader::readAll` within `ProcessBase::visit(const HttpEvent&)`. Unfortunately, a local reproduction of this bug has not been possible thus far. To test, a branch with this patch applied was built multiple times on the ASF CI to confirm that the error did not appear after this fix.


Thanks,

Greg Mann


Re: Review Request 55787: Eliminated a race in libprocess 'Loop'.

Posted by Anand Mazumdar <an...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55787/#review162514
-----------------------------------------------------------


Ship it!




Good catch!

- Anand Mazumdar


On Jan. 20, 2017, 10:15 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55787/
> -----------------------------------------------------------
> 
> (Updated Jan. 20, 2017, 10:15 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Michael Park.
> 
> 
> Bugs: MESOS-6937
>     https://issues.apache.org/jira/browse/MESOS-6937
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> In `process::internal::Loop`, we intend to synchronize all
> accesses to the `discard` member, since otherwise there would
> be a race between setting and calling this lambda. However,
> one assignment of the member remains unsynchronized. This
> patch synchronizes this assignment to avoid a race.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/loop.hpp 8bd9715246e72474a35a0f1af94c8a5a3e87dd7a 
> 
> Diff: https://reviews.apache.org/r/55787/diff/
> 
> 
> Testing
> -------
> 
> A "double free or corruption" error was showing up consistently on the ASF CI when calling `Pipe::Reader::readAll` within `ProcessBase::visit(const HttpEvent&)`. Unfortunately, a local reproduction of this bug has not been possible thus far. To test, a branch with this patch applied was built multiple times on the ASF CI to confirm that the error did not appear after this fix.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>