Repository navigation
UCT/TCP: Bound negative connect test timeout - #11415
Merged
Merged
Conversation
rakhmets
reviewed
May 5, 2026
yosefe
force-pushed
the
codex/tcp-user-timeout-from-master
branch
from
May 5, 2026 12:16
50df6bb to
e80a778
Compare
rakhmets
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The UCT sockaddr negative-connect test connects to a non-existing IP address and waits for the client error callback. On hpc-build-ub, the TCP CM variants were taking about 135 seconds each because the socket remained in SYN retransmission timeout handling. The 9 TCP parameters in
tcp/test_uct_sockaddr_err_handle_non_exist_ip.conn_to_non_exist_ipconsumed about 20 minutes while still covering only the same negative-connect path.The test attempted to shorten the wait with
SYN_CNT, but the TCP CM configuration key needs theTCP_CM_prefix when modifying the config bundle, so the setting was not applied to the CM socket.How
Add a TCP
USER_TIMEOUTconfig option for both TCP iface and TCP sockcm sockets. When set, UCX applies LinuxTCP_USER_TIMEOUTon a best-effort basis, guarded by#ifdef TCP_USER_TIMEOUTso non-Linux builds continue to compile and keep the default behavior.The negative-connect test now sets
TCP_CM_SYN_CNT=1andTCP_CM_USER_TIMEOUT=1sfor transports that support those TCP CM options. This preserves the test coverage: it still connects to the non-existing IP and verifies the server-unavailable callback, but the kernel is asked to bound the failed connect attempt instead of waiting for the host default retry window.Testing
On
hpc-build-ub:module load dev/cuda-latest dev/gdrcopy-latest tools/hpcmake -C src/uct -j16 libuct.lamake -C test/gtest -j16 gtest./test/gtest/gtest --gtest_filter="tcp/test_uct_sockaddr_err_handle_non_exist_ip.conn_to_non_exist_ip*"Result: all 9 tests passed in 9258 ms. Before the fix, the same TCP cases took about 135 seconds each on this host.