You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2017/09/02 03:30:19 UTC

[1/2] mesos git commit: Fixed an OOM due to a send loop for SSL sockets.

Repository: mesos
Updated Branches:
  refs/heads/1.2.x 72b080816 -> d95a0310d


Fixed an OOM due to a send loop for SSL sockets.

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.

Review: https://reviews.apache.org/r/62049


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/141bd8ca
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/141bd8ca
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/141bd8ca

Branch: refs/heads/1.2.x
Commit: 141bd8caff5a919aa548064514e067fe4f5fb592
Parents: 72b0808
Author: Benjamin Mahler <bm...@apache.org>
Authored: Fri Sep 1 17:17:59 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri Sep 1 20:26:17 2017 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/libevent_ssl_socket.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/141bd8ca/3rdparty/libprocess/src/libevent_ssl_socket.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/libevent_ssl_socket.cpp b/3rdparty/libprocess/src/libevent_ssl_socket.cpp
index 7d49330..c2ee587 100644
--- a/3rdparty/libprocess/src/libevent_ssl_socket.cpp
+++ b/3rdparty/libprocess/src/libevent_ssl_socket.cpp
@@ -394,7 +394,7 @@ void LibeventSSLSocketImpl::event_callback(short events)
     }
 
     if (current_send_request.get() != nullptr) {
-      current_send_request->promise.set(0);
+      current_send_request->promise.fail("Failed send: connection closed");
     }
 
     if (current_connect_request.get() != nullptr) {


[2/2] mesos git commit: Added MESOS-7934 to the 1.2.3 CHANGELOG.

Posted by bm...@apache.org.
Added MESOS-7934 to the 1.2.3 CHANGELOG.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d95a0310
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d95a0310
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d95a0310

Branch: refs/heads/1.2.x
Commit: d95a0310d0dff265a8d70e4c1450569d812954df
Parents: 141bd8c
Author: Benjamin Mahler <bm...@apache.org>
Authored: Fri Sep 1 20:22:56 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri Sep 1 20:26:32 2017 -0700

----------------------------------------------------------------------
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d95a0310/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 436275d..67329dc 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,6 +13,7 @@ All Issues:
   * [MESOS-7872] - Scheduler hang when registration fails.
   * [MESOS-7909] - Ordering dependency between 'linux/capabilities' and 'docker/runtime' isolator.
   * [MESOS-7926] - Abnormal termination of default executor can cause MesosContainerizer::destroy to fail.
+  * [MESOS-7934] - OOM due to LibeventSSLSocket send incorrectly returning 0 after shutdown.
 
 
 Release Notes - Mesos - Version 1.2.2