Will Berkeley has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/12758 )
Change subject: KUDU-2576: TlsSocketTest.TestRecvFailure is flaky ...................................................................... KUDU-2576: TlsSocketTest.TestRecvFailure is flaky TestRecvFailure wanted an interleaving of client thread and server thread similar to the following: Server: enters echo (recv -> write) loop Server: blocking recv Client: stop the server Client: blocking write to match server's blocking recv Server: blocking write Client: blocking recv to match server's blocking write Client: blocking recv Server: exits echo loop and closes connection because it was stopped Client: blocking recv fails because connection is closed A sleep was used in the client thread to try to ensure that the server reached the blocking recv call before the client shut the server down. However, under TSAN, occasionally the client was able to stop the server before the server entered the echo loop, so the server closed the connection before any data could be sent, failing the test. This patch moves the client call to stop the server to after the first recv-write succeeds, guaranteeing the server is in the echo loop. Without this patch, I saw 10/2000 runs fail in TSAN with 8 stress threads. 8 were due to KUDU-2576. With this patch, I saw 4/2000, all of which were due to a different issue that will be addressed in a follow-up. Change-Id: If95576ddc9e1e23f2db904d5b22bc3b9c1522ea4 Reviewed-on: http://gerrit.cloudera.org:8080/12758 Reviewed-by: Adar Dembo <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> Tested-by: Will Berkeley <[email protected]> --- M src/kudu/security/tls_socket-test.cc 1 file changed, 39 insertions(+), 28 deletions(-) Approvals: Adar Dembo: Looks good to me, approved Alexey Serbin: Looks good to me, approved Will Berkeley: Verified -- To view, visit http://gerrit.cloudera.org:8080/12758 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: If95576ddc9e1e23f2db904d5b22bc3b9c1522ea4 Gerrit-Change-Number: 12758 Gerrit-PatchSet: 3 Gerrit-Owner: Will Berkeley <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Will Berkeley <[email protected]>
