mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <>
Subject Review Request 67824: Reduced likelihood of a stack overflow in libprocess socket recv path.
Date Wed, 04 Jul 2018 00:06:50 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for mesos and Chun-Hung Hsiao.

Bugs: MESOS-9024

Repository: mesos


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.


  3rdparty/libprocess/src/process.cpp eb9613f1d47d611a31f7c538216fa324bbca1a56 



make check and manually tested master/agent/framework communication


Benjamin Mahler

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