mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <>
Subject Re: Review Request 62049: Fixed an OOM due to a send loop for SSL sockets.
Date Sat, 02 Sep 2017 03:10:59 GMT

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

(Updated Sept. 2, 2017, 3:10 a.m.)

Review request for mesos, Benno Evers, Chun-Hung Hsiao, Gilbert Song, Greg Mann, Jie Yu, and
Joseph Wu.


Updated description to more accurately describe the issue per jie's analysis.

Bugs: MESOS-7934

Repository: mesos

Description (updated)

Per MESOS-7934, the LibeventSSLSocket incorrectly returns 0 to the
sender when an EOF, or "dirty" SSL shutdown (i.e. TCP close before
SSL close), or a send is performed on a socket after it has been
shut down. Not only is this incorrect due to the caller re-sending
the same data again, in the case that the socket has been shut down,
the caller of send will enter an infinite loop of retrying the send
which will rapidly lead to an OOM in libprocess.

The fix here is to fail the send instead. Note that with libevent
2.0.x the 'events' will not contain BEV_EVENT_READING or
BEV_EVENT_WRITING for SSL buffevents. With libevent 2.1.x, we can
update our logic to deal with the read and write side events

Comments are added in a follow up change to explain this for
posterity, and MESOS-7930 tracks the additional tech debt that
needs to be addressed for SSL socket support.

Diffs (updated)

  3rdparty/libprocess/src/libevent_ssl_socket.cpp 0fa7565d1dc49e53890708df154c4d8ea278ad37




Tested in subsequent patch.


Benjamin Mahler

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