This is an automated email from the ASF dual-hosted git repository.

bennoe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 1a6760c60dc823b088ffbcf48909cf3e371570f3
Author: Benno Evers <[email protected]>
AuthorDate: Wed Jun 26 16:30:12 2019 +0200

    Added warnings about known problems with libevent epoll backend.
    
    Some SSL options are known to cause issues in combination with
    older versions of libevent. Detect and warn about this situation.
    
    See MESOS-9867 for details.
    
    Review: https://reviews.apache.org/r/70993
---
 3rdparty/libprocess/Makefile.am     |  2 +-
 3rdparty/libprocess/src/openssl.cpp | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/3rdparty/libprocess/Makefile.am b/3rdparty/libprocess/Makefile.am
index 851a842..641251a 100644
--- a/3rdparty/libprocess/Makefile.am
+++ b/3rdparty/libprocess/Makefile.am
@@ -157,7 +157,7 @@ LIB_EV = -lev
 endif
 else
 if WITH_BUNDLED_LIBEVENT
-LIB_EVENT_INCLUDE_FLAGS = -I$(LIBEVENT)
+LIB_EVENT_INCLUDE_FLAGS = -I$(LIBEVENT)/include
 LIB_EVENT = $(LIBEVENT)/libevent_core.la $(LIBEVENT)/libevent_pthreads.la
 if ENABLE_SSL
 LIB_EVENT += $(LIBEVENT)/libevent_openssl.la
diff --git a/3rdparty/libprocess/src/openssl.cpp 
b/3rdparty/libprocess/src/openssl.cpp
index 61537bd..ee9a049 100644
--- a/3rdparty/libprocess/src/openssl.cpp
+++ b/3rdparty/libprocess/src/openssl.cpp
@@ -16,6 +16,8 @@
 #include <sys/param.h>
 #endif // __WINDOWS__
 
+#include <event2/event-config.h>
+
 #include <openssl/err.h>
 #include <openssl/rand.h>
 #include <openssl/ssl.h>
@@ -558,6 +560,20 @@ void reinitialize()
               << "connections.";
   }
 
+// NOTE: Newer versions of libevent call these macros `EVENT__NUMERIC_VERSION`
+// and `EVENT__HAVE_POLL`.
+#if defined(_EVENT_HAVE_EPOLL) && \
+    defined(_EVENT_NUMERIC_VERSION) && \
+    _EVENT_NUMERIC_VERSION < 0x02010400L
+  if (ssl_flags->require_cert &&
+      ssl_flags->hostname_validation_scheme == "legacy") {
+    LOG(WARNING) << "Enabling client certificate validation with the "
+                 << "'legacy' hostname validation scheme is known to "
+                 << "cause sporadic hangs with older versions of libevent. "
+                 << "See https://issues.apache.org/jira/browse/MESOS-9867.";;
+  }
+#endif
+
   if (ssl_flags->verify_ipadd) {
     LOG(INFO) << "Will use IP address verification in subject alternative name 
"
               << "certificate extension.";

Reply via email to