-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62049/
-----------------------------------------------------------
(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.
Changes
-------
Updated description to more accurately describe the issue per jie's analysis.
Bugs: MESOS-7934
https://issues.apache.org/jira/browse/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
separately.
https://github.com/libevent/libevent/commit/f7eb69ace
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
Diff: https://reviews.apache.org/r/62049/diff/2/
Changes: https://reviews.apache.org/r/62049/diff/1-2/
Testing
-------
Tested in subsequent patch.
Thanks,
Benjamin Mahler