You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gr...@apache.org on 2020/04/13 20:49:20 UTC
[mesos] branch master updated: Fixed libevent SSL socket shutdown
race condition.
This is an automated email from the ASF dual-hosted git repository.
grag pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new e8793b2 Fixed libevent SSL socket shutdown race condition.
e8793b2 is described below
commit e8793b2ca92524c76f96c11e4ca52f41f9a8d414
Author: Greg Mann <gr...@mesosphere.io>
AuthorDate: Mon Apr 13 13:41:08 2020 -0700
Fixed libevent SSL socket shutdown race condition.
This fixes an issue where the functions `shutdown()` and
`event_callback()` race to access the bufferevent held by
our libevent SSL socket implementation, leading to a
CHECK failure.
This race resulted in MESOS-10111, where multiple rapid
changes in ZK membership led to one master re-linking to
another multiple times in RECONNECT mode. This causes
`shutdown()` to be called on the existing socket while
it's attempting a connection, at which point a failure to
connect can produce the CHECK failure.
Review: https://reviews.apache.org/r/72354/
---
3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.cpp b/3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.cpp
index dcb6d8e..864802d 100644
--- a/3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.cpp
+++ b/3rdparty/libprocess/src/posix/libevent/libevent_ssl_socket.cpp
@@ -190,7 +190,9 @@ Try<Nothing, SocketError> LibeventSSLSocketImpl::shutdown(int how)
CHECK(__in_event_loop__);
CHECK(self);
- CHECK_NOTNULL(self->bev);
+ if (self->bev == nullptr) {
+ return;
+ }
synchronized (self->bev) {
Owned<RecvRequest> request;