libnsl: set_up_connection() over TCP does not adhere the specified timeout
The set_up_connection() over TCP does not adhere the specified timeout.
Steps to reproduce (use the attached rpc-timeout.c file):
# gcc -Wall -l nsl -o rpc-timeout rpc-timeout.c # ./rpc-timeout Usage: ./rpc-timeout hostname [timeout] # time ./rpc-timeout 10.0.0.99 5 clnt_create_service_timed failed real 6m29.996s user 0m0.002s sys 0m0.005s #
Note: The IP address used is the IP address of an unreachable machine.
The timeout should be about 5 seconds, but we see the actual timeout is over 6 minutes.
Updated by Marcel Telka almost 7 years ago
The set_up_connection() tries three times to connect to the other party in a case the connect is unsuccessful. The first connect try is with the specified timeout, but the 2nd and 3rd attempt is with the default timeout (3 minutes) because of the bug #5848.
Updated by Electric Monk over 6 years ago
- Status changed from Pending RTI to Closed
- % Done changed from 0 to 100
commit 7e89328164e4b89906924cf4e0387ea13a77631b Author: Marcel Telka <firstname.lastname@example.org> Date: 2015-05-05T18:41:51.000Z 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>