[https://nvbugs/6484986][fix] In UcxConnectionManager::recvConnect, replace the unconditional future.get()… - #16678
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughThe integration waiver list removes the skip entry for ChangesIntegration-test waiver update
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
cpp/tensorrt_llm/executor/cache_transmission/ucx_utils/ucxCacheCommunicator.cpp (1)
621-624: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winName the polling interval.
std::chrono::milliseconds(50)is a newly introduced magic literal. Define a function-localconstexprsuch askRecvConnectPollIntervaland reuse it.As per coding guidelines: “Avoid magic literals except
0,nullptr,true, andfalse; initialize named constants instead, usingk-prefixed camelCase names.”Proposed refactor
+ constexpr std::chrono::milliseconds kRecvConnectPollInterval{50}; auto const& transferTerminate = ctx.getTransferTerminate(); - while (future.wait_for(std::chrono::milliseconds(50)) != std::future_status::ready) + while (future.wait_for(kRecvConnectPollInterval) != std::future_status::ready)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cpp/tensorrt_llm/executor/cache_transmission/ucx_utils/ucxCacheCommunicator.cpp` around lines 621 - 624, In the wait loop using future.wait_for, replace the magic 50-millisecond duration with a function-local constexpr named kRecvConnectPollInterval, then reuse that constant in the polling call while preserving the existing cancellation behavior.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@cpp/tensorrt_llm/executor/cache_transmission/ucx_utils/ucxCacheCommunicator.cpp`:
- Around line 621-630: Update the shutdown sequence around stopProgressThread()
to set mIsRunning = false before stopping the UCX worker progress thread,
ensuring recvConnect() observes shutdown and can cancel pending requests safely.
In the recvConnect() polling loop, replace the inline 50 ms duration with a
named constant and use it for the future wait timeout.
---
Nitpick comments:
In
`@cpp/tensorrt_llm/executor/cache_transmission/ucx_utils/ucxCacheCommunicator.cpp`:
- Around line 621-624: In the wait loop using future.wait_for, replace the magic
50-millisecond duration with a function-local constexpr named
kRecvConnectPollInterval, then reuse that constant in the polling call while
preserving the existing cancellation behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 7f1968e9-fbb0-414f-8896-87cee0c91044
📒 Files selected for processing (2)
cpp/tensorrt_llm/executor/cache_transmission/ucx_utils/ucxCacheCommunicator.cpptests/integration/test_lists/waives.txt
💤 Files with no reviewable changes (1)
- tests/integration/test_lists/waives.txt
65f61df to
baf062d
Compare
baf062d to
29a4dc7
Compare
|
FYI I created #16688 as the targeted fix for the bug. |
29a4dc7 to
85335d1
Compare
The UCX transceiver's response thread was permanently stuck in recvConnect() waiting for a peer that never connects when a context-only request times out with no gen peer available. CacheSender::Impl::terminate() then blocked on mResponseFuture.get() which hung LLM.__del__/Proxy.shutdown() on pytest teardown. Poll on ucxx::Request::isCompleted() and consult DataContext.getTransferTerminate() so the caller (sender's response thread on shutdown) can cancel the pending recv and exit the loop cleanly. dataTransceiver.cpp already handles a nullptr return. Also remove the corresponding SKIP waiver. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
85335d1 to
cedea84
Compare
|
Closing based on #16678 (comment) |
Summary
Test plan
Links
Dev Engineer Review
unittest/llmapi/test_llm_pytorch.py::test_llm_context_only_timed_out[None].QA Engineer Review
tests/integration/test_lists/waives.txttest_llm_context_only_timed_out[None].test-db/, orqa/files were modified.