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

Review request for mesos and Chun-Hung Hsiao.


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


Repository: mesos


Description
-------

Currently, the socket recv 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 reading. The crash has been reported in MESOS-9024,
so the stack overflow has been encountered in practice.

This patch updates the recv 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 recv path.


Diffs
-----

  3rdparty/libprocess/src/process.cpp eb9613f1d47d611a31f7c538216fa324bbca1a56 


Diff: https://reviews.apache.org/r/67824/diff/1/


Testing
-------

make check and manually tested master/agent/framework communication


Thanks,

Benjamin Mahler

Reply via email to