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 46024: Avoided misleading locking in the libprocess SocketManager.
Date Mon, 11 Apr 2016 19:31:35 GMT

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



Patch looks great!

Reviews applied: [46025, 46026, 46027, 46028, 46029, 46030, 46024]

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, 2:36 p.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46024/
> -----------------------------------------------------------
> 
> (Updated April 11, 2016, 2:36 p.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> In `SocketManager::swap_implementing_socket`, the previous coding
> accessed the `sockets` instance variable in two CHECKs without
> acquiring `mutex`. This is unsafe in general: `mutex` should be
> acquired before accessing instance variables like `sockets` (unless
> you know all such concurrent accesses will be read-only etc.).
> 
> As it happens, the previous coding was not unsafe because all the
> call-sites of `SocketManager::swap_implementing_socket` acquire
> `mutex` before invoking it. But because `swap_implementing_socket`
> also acquires `mutex`, clearly its API contract allows it to be
> invoked without holding `mutex`, in which case the CHECKs would
> likely be unsafe.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp 5e9dcfdc52f3a8223bc43af149b8e1f5dbdf5b0a 
> 
> Diff: https://reviews.apache.org/r/46024/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Neil Conway
> 
>


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