You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2018/01/12 05:36:20 UTC

kudu git commit: [tls_socket-test] fix test to pass on Ubuntu 16.04

Repository: kudu
Updated Branches:
  refs/heads/master 35fc7b7e5 -> 26fd153b0


[tls_socket-test] fix test to pass on Ubuntu 16.04

Prior to this fix, the TlsSocketTest.TestNonBlockingWritev test failed
on Ubuntu 16.04 (kernel 4.4.0).  After some investigation, it turned
out that setting socket send buffer size for something lower than the
MTU size (which is 64kB for localhost) triggered the delayed
acknowledgement logic.  Since the test passes big chunks of data
(32MB on every iteration), with 40ms delay for almost every 16KB sent,
the test eventually timed out.  I verified that disabling the delayed
TCP ack for TLS sockets fixed the issue.

I think that the proper fix is to remove the custom setting for the
socket send buffer: a 32MB chunk of data is big enough to not fit into
the socket buffer of the default size.

Also, it seems this issue is not going to bite us in real life since
we don't set the size of the socket send buffer anywhere.

NOTE: however, some mystery is left since the failing test would pass
      if running under strace.

Change-Id: I94170d5bdbe17a5952a82faf74d8b868b42460aa
Reviewed-on: http://gerrit.cloudera.org:8080/8996
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <to...@apache.org>


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

Branch: refs/heads/master
Commit: 26fd153b055b10bee90275d4f4c9e5f7088d4e83
Parents: 35fc7b7
Author: Alexey Serbin <as...@cloudera.com>
Authored: Wed Jan 10 13:39:05 2018 -0800
Committer: Todd Lipcon <to...@apache.org>
Committed: Fri Jan 12 05:28:47 2018 +0000

----------------------------------------------------------------------
 src/kudu/security/tls_socket-test.cc | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/26fd153b/src/kudu/security/tls_socket-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/security/tls_socket-test.cc b/src/kudu/security/tls_socket-test.cc
index 214d2bf..4f332a5 100644
--- a/src/kudu/security/tls_socket-test.cc
+++ b/src/kudu/security/tls_socket-test.cc
@@ -20,7 +20,6 @@
 #include <algorithm>
 #include <pthread.h>
 #include <sched.h>
-#include <sys/socket.h>
 #include <sys/uio.h>
 
 #include <atomic>
@@ -282,9 +281,6 @@ TEST_F(TlsSocketTest, TestNonBlockingWritev) {
   unique_ptr<Socket> client_sock;
   NO_FATALS(ConnectClient(server.listen_addr(), &client_sock));
 
-  int sndbuf = 16 * 1024;
-  CHECK_ERR(setsockopt(client_sock->GetFd(), SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof(sndbuf)));
-
   unique_ptr<uint8_t[]> buf(new uint8_t[kEchoChunkSize]);
   unique_ptr<uint8_t[]> rbuf(new uint8_t[kEchoChunkSize]);
   RandomString(buf.get(), kEchoChunkSize, &rng);