mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <jos...@mesosphere.io>
Subject Re: Review Request 60252: Fixed a bug that causes segfault in ProcessManager::finalize.
Date Wed, 21 Jun 2017 18:42:40 GMT

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


Ship it!




I agree this makes the finalization logic safer, but I don't see a way to add a `nullptr`
to the `ProcessManager::processes` map.

`ProcessManager::spawn` is the only location where the `processes` map is inserted, and this
method CHECK-fails if you give it a `nullptr`.  Two other locations use the map's `operator[]`,
but those are guarded by a mutex so they will never empty-initialize a map entry.

Can you note how you ran into a segfault here?  It's more likely that the segfault was caused
by a dereferencing a non-`nullptr` process that had already been deallocated (which would
not be fixed by this review).

- Joseph Wu


On June 20, 2017, 4:16 p.m., Jiang Yan Xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60252/
> -----------------------------------------------------------
> 
> (Updated June 20, 2017, 4:16 p.m.)
> 
> 
> Review request for mesos and Joseph Wu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> We don't need and shouldn't assume pointers in `processes` are
> non-nullptr.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp 7ce6d2b13baa68906e091a95c0dd58ee1ca2bc7d 
> 
> 
> Diff: https://reviews.apache.org/r/60252/diff/1/
> 
> 
> Testing
> -------
> 
> make check.
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>


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