[https://nvbugs/6396728][fix] Add module-level pytestmark = pytest.mark.threadleak(enabled=False) to…#15839
Conversation
📝 WalkthroughWalkthroughThis change adds a module-level pytestmark to disable pytest-threadleak enforcement in a Ray orchestrator multi-GPU test file, accompanied by a comment explaining that Ray-backed LLM teardown occurs after threadleak's snapshot timing. ChangesTest configuration update
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…ts multi-GPU test
test_llm_update_weights_nvfp4[auto-Qwen3/Qwen3-8B] in this multi-GPU
file intermittently fails on DGX_B200-4_GPUs-PyTorch-Ray-1 with only
"Test terminated unexpectedly" (empty stdout/stderr/stack_trace in CI DB).
Locally, on a 2-B200 node with the CI ray pin (ray[default]==2.54.1),
the test passes -- no functional bug.
The root cause is the same Ray-driver daemon-thread leak
(ray_listen_error_messages, ray_print_logs, PythonGCThread) already
addressed for the part0 FP8 variants under nvbugs/6372711 and in the
parent single_gpu/test_llm_update_weights.py module: Ray-internal daemon
threads spawned by ray.init() in the driver are only torn down inside
RayExecutor.shutdown(), which runs when the LLM is finally closed --
after pytest-threadleak's per-test snapshot. tests/unittest/pytest.ini's
threadleak_exclude regex does not cover these Ray thread names, so the
plugin fails the test with an unrecoverable error that surfaces as the
observed empty-traceback termination.
Apply the same module-level marker
pytestmark = pytest.mark.threadleak(enabled=False)
that
- tests/unittest/_torch/ray_orchestrator/single_gpu/test_llm_update_weights.py
(the parent module this file imports from) already uses, and
- tests/unittest/_torch/ray_orchestrator/multi_gpu/test_executor.py
uses per-test.
Scope is intentionally narrow: only the tests in this file opt out of
thread-leak checking; no pytest.ini change.
Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
8657689 to
98c769a
Compare
|
/bot run --stage-list "DGX_B200-4_GPUs-PyTorch-Ray-1" |
1 similar comment
|
/bot run --stage-list "DGX_B200-4_GPUs-PyTorch-Ray-1" |
|
PR_Github #58125 [ run ] triggered by Bot. Commit: |
Signed-off-by: Shuyi Xiong <219646547+shuyixiong@users.noreply.github.com>
pytestmark = pytest.mark.threadleak(enabled=False) to…pytestmark = pytest.mark.threadleak(enabled=False) to…
|
/bot run --stage-list "DGX_B200-4_GPUs-PyTorch-Ray-1" |
|
PR_Github #58135 [ run ] triggered by Bot. Commit: |
|
PR_Github #58125 [ run ] completed with state |
Signed-off-by: Shuyi Xiong <219646547+shuyixiong@users.noreply.github.com>
|
/bot run --stage-list "DGX_B200-4_GPUs-PyTorch-Ray-1" |
|
PR_Github #58145 [ run ] triggered by Bot. Commit: |
|
PR_Github #58135 [ run ] completed with state |
|
PR_Github #58145 [ run ] completed with state
|
|
/bot run --stage-list "DGX_B200-4_GPUs-PyTorch-Ray-1" |
|
PR_Github #58183 [ run ] triggered by Bot. Commit: |
|
PR_Github #58183 [ run ] completed with state
|
|
/bot run --stage-list "DGX_B200-4_GPUs-PyTorch-Ray-1" |
|
PR_Github #58189 [ run ] triggered by Bot. Commit: |
|
PR_Github #58189 [ run ] completed with state |
|
/bot skip --comment "Passed the related CI stage " |
|
PR_Github #58207 [ skip ] triggered by Bot. Commit: |
|
PR_Github #58207 [ skip ] completed with state |
…ark.threadleak(enabled=False)` to… (NVIDIA#15839) Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com> Signed-off-by: Shuyi Xiong <219646547+shuyixiong@users.noreply.github.com> Co-authored-by: Shuyi Xiong <219646547+shuyixiong@users.noreply.github.com>
Summary
pytestmark = pytest.mark.threadleak(enabled=False)to test_llm_update_weights_multi_gpu.py, matching the pattern used by the parent/sibling files.Test plan
Links
Summary by CodeRabbit