From owner-svn-src-projects@freebsd.org Tue Jun 30 15:47:12 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 755A334E654 for ; Tue, 30 Jun 2020 15:47:12 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x7ym2V6vz4YR8; Tue, 30 Jun 2020 15:47:12 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 343821A8F0; Tue, 30 Jun 2020 15:47:12 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05UFlCge010160; Tue, 30 Jun 2020 15:47:12 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UFlCYp010159; Tue, 30 Jun 2020 15:47:12 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006301547.05UFlCYp010159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 30 Jun 2020 15:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r362799 - projects/nfs-over-tls/sys/rpc/rpcsec_tls X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/nfs-over-tls/sys/rpc/rpcsec_tls X-SVN-Commit-Revision: 362799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 15:47:12 -0000 Author: rmacklem Date: Tue Jun 30 15:47:11 2020 New Revision: 362799 URL: https://svnweb.freebsd.org/changeset/base/362799 Log: Although I have no way of testing how long the server side (SSL_accept()) might delay when the client is not responding to handshake records, I decided to make the timeout for the server the same as the client. Modified: projects/nfs-over-tls/sys/rpc/rpcsec_tls/rpctls_impl.c Modified: projects/nfs-over-tls/sys/rpc/rpcsec_tls/rpctls_impl.c ============================================================================== --- projects/nfs-over-tls/sys/rpc/rpcsec_tls/rpctls_impl.c Tue Jun 30 14:49:51 2020 (r362798) +++ projects/nfs-over-tls/sys/rpc/rpcsec_tls/rpctls_impl.c Tue Jun 30 15:47:11 2020 (r362799) @@ -218,17 +218,23 @@ printf("got cl=%p\n", cl); /* * The number of retries defaults to INT_MAX, which * effectively means an infinite, uninterruptable loop. - * Doing even one retry of these upcalls is probably - * not a good plan, since repeating the openssl - * operations are not likely to work. - * The timeout is set fairly large, since some - * openssl operations such as SSL_connect() take a - * long time to return upon failure. + * Set the try_count to 1 so that no retries of the + * RPC occur. Since it is an upcall to a local daemon, + * requests should not be lost and doing one of these + * RPCs multiple times is not correct. + * SSL_connect() in the openssl library has been + * observed to take 6 minutes when the server is not + * responding to the handshake records, so set the + * timeout to 10min. If it times out before the + * daemon completes the RPC, that should still be ok, + * since the daemon is single threaded and will not + * do further RPCs until the openssl library call + * returns (usually with a failure). */ if (cl != NULL) { try_count = 1; CLNT_CONTROL(cl, CLSET_RETRIES, &try_count); - timeo.tv_sec = 2 * 60; + timeo.tv_sec = 10 * 60; timeo.tv_usec = 0; CLNT_CONTROL(cl, CLSET_TIMEOUT, &timeo); } else