mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 66863: Reduced likelihood of a stack overflow in libprocess socket send path.
Date Tue, 01 May 2018 00:10:54 GMT


> On April 30, 2018, 11:58 p.m., Chun-Hung Hsiao wrote:
> > 3rdparty/libprocess/src/process.cpp
> > Lines 1785 (patched)
> > <https://reviews.apache.org/r/66863/diff/2/?file=2014927#file2014927line1790>
> >
> >     `()` can be removed.

Oh yeah, I often forget about this, I took them out. I guess our rule could either be to always
include them or to always omit them if possible?


- Benjamin


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


On April 30, 2018, 11:47 p.m., Benjamin Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66863/
> -----------------------------------------------------------
> 
> (Updated April 30, 2018, 11:47 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Benno Evers, and Chun-Hung Hsiao.
> 
> 
> Bugs: MESOS-8594
>     https://issues.apache.org/jira/browse/MESOS-8594
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Currently, the socket send path is implemented using an asynchronous
> loop with callbacks. Without using `process::loop`, this pattern is
> prone to a stack overflow in the case that all asynchronous calls
> complete synchronously. This is possible with sockets if the socket
> is always ready for writing. Users have reported the crash in both
> MESOS-8594 and MESOS-8834, so the stack overflow is encountered in
> practice.
> 
> This patch updates the send path to leverage `process::loop`, which
> is supposed to prevent stack overflows in asynchronous loops. However,
> it is still possible for `process::loop` to stack overflow due to
> MESOS-8852. In practice, I expect that even without MESOS-8852 fixed,
> users won't see any stack overflows in the send path.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp 21931db5edd7ecf0f4620dba42a5521f48cd47a3 
> 
> 
> Diff: https://reviews.apache.org/r/66863/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>


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