5753 libnsl: set_up_connection() over TCP does not adhere the specified timeout
Review Request #37 — Created April 17, 2015 and submitted
The set_up_connection() over TCP does not adhere the specified timeout.
Without the fix:# time ./rpc-timeout 10.0.0.99 5 clnt_create_service_timed failed real 6m29.996s user 0m0.002s sys 0m0.005s #
With the fix:# time ./rpc-timeout 10.0.0.99 5 clnt_create_service_timed failed real 0m7.934s user 0m0.001s sys 0m0.004s #
I have a question about the retry loop in clnt_vc.c
for (nconnect = 0; nconnect < 3; nconnect++) ...
It's not clear why this should ever retry a connect attempt,
given that the transport (TCP) has its own retry mechanism
where it re-sends the TCP SYN at some interval.
Doesn't this therefore constitute nested retry loops?
(those are generally undesirable)
I think I prefer the version of this fix I saw earlier in
NexentaStor, where you just eliminate the outer retry loop.
Why not do that here too?
Status: Closed (submitted)
commit 7e89328164e4b89906924cf4e0387ea13a77631b Author: Marcel Telka <email@example.com> AuthorDate: Mon Apr 20 15:41:13 2015 +0200 Commit: Richard Lowe <firstname.lastname@example.org> CommitDate: Tue May 5 14:41:51 2015 -0400 5753 libnsl: set_up_connection() over TCP does not adhere the specified timeout Reviewed by: Dan Fields <email@example.com> Approved by: Richard Lowe <firstname.lastname@example.org> :100644 100644 4f92a33... 4ab5010... M usr/src/lib/libnsl/rpc/clnt_vc.c