Skip to content

[TRTLLM-13409][test] fail fast + surface server logs when a perf-sanity server dies or never becomes healthy#16403

Open
JunyiXu-nv wants to merge 4 commits into
NVIDIA:mainfrom
JunyiXu-nv:dev-junyix-fix-perf-sanity-fail-fast
Open

[TRTLLM-13409][test] fail fast + surface server logs when a perf-sanity server dies or never becomes healthy#16403
JunyiXu-nv wants to merge 4 commits into
NVIDIA:mainfrom
JunyiXu-nv:dev-junyix-fix-perf-sanity-fail-fast

Conversation

@JunyiXu-nv

@JunyiXu-nv JunyiXu-nv commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes

    • Improved server readiness monitoring for aggregated and disaggregated benchmarks.
    • Detects unexpected server termination promptly instead of waiting for the full timeout.
    • Failure messages now include relevant server log details and recent log output.
    • Prevents benign warmup and autotuner messages from being reported as fatal errors.
    • Handles missing diagnostic log files without interrupting readiness checks.
  • Tests

    • Added automated coverage for fail-fast behavior, timeout diagnostics, log scanning, and benign error filtering.
    • Expanded the A10 pre-merge test list with HTTP utility coverage.

Description

Post-merge CI analysis of TRTLLM-13409 showed the dominant remaining hang-shaped burn is a disagg/perf-sanity server that dies or wedges during startup: the observed pattern is "trtllm-serve disaggregated launched, died before binding, and nobody noticed" -- the benchmark client polls /health (connection refused) until the 90-minute per-test pytest timeout, the CTX/GEN/DISAGG babysitter ranks wait only for the benchmark-done file without ever polling their server process, 8-36 GPUs are held, and nothing in the CI log shows the server-side story. Harness defects compound this:

  • wait_for_endpoint_ready was called with the whole-test timeout (DEFAULT_TIMEOUT=10800s), so the pytest kill always fired first and the harness never reached its own timeout/reporting path;
  • its error-file scan ran every 300 loop iterations (5-30 min of wall time) and silently skipped missing files;
  • no failure path dumped the server log tail, and report_error's keyword scan iterated an already-exhausted file handle, so it never matched.

Test Coverage

Adds CPU-only unit tests (registered in l0_a10) covering the fail-fast paths, the babysitter liveness helper, the benign-marker filter, the always-tail behavior, and the report_error regression; a NO_PROXY fixture keeps the dead-endpoint tests correct behind corporate HTTP proxies.

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Server readiness utilities now detect exited processes, include server log tails in failures, ignore benign log markers, and support configurable readiness timeouts. Performance benchmark waits pass process and log context, with new unit coverage added to the A10 pre-merge list.

Changes

Server readiness diagnostics

Layer / File(s) Summary
Log filtering and failure reporting
tests/test_common/error_utils.py, tests/test_common/http_utils.py
Benign log markers are excluded from error detection, log tails remain available after keyword matches, and process failures include server log context.
Endpoint readiness fail-fast flow
tests/test_common/http_utils.py, tests/unittest/others/test_http_utils_fail_fast.py, tests/integration/test_lists/test-db/l0_a10.yml
Endpoint polling checks process liveness and log errors, handles missing check files, enriches timeout failures, and adds coverage to the A10 pre-merge list.
Performance benchmark orchestration
tests/integration/defs/perf/test_perf_sanity.py
Aggregate and disaggregated readiness waits use configurable limits, while benchmark completion waits monitor server processes and logs.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ReadinessWait
  participant ServerProcess
  participant ServerLogs
  participant ErrorReporter
  ReadinessWait->>ServerProcess: poll liveness
  ReadinessWait->>ServerLogs: inspect readiness logs
  ServerLogs->>ErrorReporter: report error matches and tail
  ErrorReporter-->>ReadinessWait: raise enriched failure
  ServerProcess-->>ReadinessWait: report unexpected exit
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is specific, concise, and matches the main change: fail-fast perf-sanity server monitoring with log surfacing.
Description check ✅ Passed The description follows the template, explains the problem and solution, and includes test coverage plus checklist completion.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/test_common/error_utils.py (1)

61-76: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Catch only log-reading errors.

This block only performs file I/O, so catching Exception can misclassify unrelated programming failures as unreadable logs. Catch OSError instead.

Proposed fix
-        except Exception as e:
+        except OSError as e:

As per coding guidelines, catch the narrowest possible exceptions instead of broad exceptions.

🤖 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 `@tests/test_common/error_utils.py` around lines 61 - 76, In the log-reading
try/except around opening and scanning log_file, replace the broad Exception
handler with an OSError handler. Preserve the existing fallback assignments and
failure message for actual file I/O errors, while allowing unrelated programming
exceptions to propagate.

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 `@tests/integration/defs/perf/test_perf_sanity.py`:
- Around line 109-123: Update server_ready_timeout so the parsed
TRTLLM_TEST_SERVER_READY_TIMEOUT value is accepted only when greater than zero;
return the provided default for zero or negative values, preserving the existing
fallback and invalid-value handling.

In `@tests/test_common/error_utils.py`:
- Around line 19-21: Narrow the autotuner exemption by replacing the broad
BENIGN_LINE_MARKERS check in tests/test_common/error_utils.py:19-21 with a
predicate requiring both the expected autotuner probe message and OOM text;
update check_error() at tests/test_common/error_utils.py:33-34 and
report_error() at tests/test_common/error_utils.py:67-68 to use it. Add coverage
in tests/unittest/others/test_http_utils_fail_fast.py:121-131 confirming both
scanners still detect an autotuner-prefixed non-OOM error.

In `@tests/unittest/others/test_http_utils_fail_fast.py`:
- Around line 121-131: The existing autotuner test does not verify that genuine
errors with the autotuner marker remain detectable. Add
test_autotuner_marker_does_not_hide_real_errors in the test_check_error
coverage, using a log containing an “[Autotuner] RuntimeError: …” entry and
asserting check_error reports it, while preserving the benign warmup OOM
filtering behavior.

---

Outside diff comments:
In `@tests/test_common/error_utils.py`:
- Around line 61-76: In the log-reading try/except around opening and scanning
log_file, replace the broad Exception handler with an OSError handler. Preserve
the existing fallback assignments and failure message for actual file I/O
errors, while allowing unrelated programming exceptions to propagate.
🪄 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: 635587bc-ae93-4e3d-ae48-479f3d96b030

📥 Commits

Reviewing files that changed from the base of the PR and between d3436a0 and a484be3.

📒 Files selected for processing (5)
  • tests/integration/defs/perf/test_perf_sanity.py
  • tests/integration/test_lists/test-db/l0_a10.yml
  • tests/test_common/error_utils.py
  • tests/test_common/http_utils.py
  • tests/unittest/others/test_http_utils_fail_fast.py

Comment thread tests/integration/defs/perf/test_perf_sanity.py Outdated
Comment thread tests/test_common/error_utils.py Outdated
Comment thread tests/unittest/others/test_http_utils_fail_fast.py
@JunyiXu-nv
JunyiXu-nv force-pushed the dev-junyix-fix-perf-sanity-fail-fast branch from a484be3 to 434ef30 Compare July 15, 2026 05:42
@mzweilz

mzweilz commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Approved to unblock this PR.

@JunyiXu-nv
JunyiXu-nv force-pushed the dev-junyix-fix-perf-sanity-fail-fast branch from 434ef30 to 6a4b3d0 Compare July 15, 2026 05:56
@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59412 [ run ] triggered by Bot. Commit: 6a4b3d0 Link to invocation

@BowenFu BowenFu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — correctly fixes two real defects: the server-ready wait was passed DEFAULT_TIMEOUT=10800 (now bounded + env-overridable), and report_error scanned an already-exhausted handle after readlines() (now scans the buffered list). Masking risk is well-guarded — is_benign_line only suppresses [Autotuner]/OOM lines, the log tail is always appended even on a keyword hit, and there's a regression test covering it. Nice fail-fast improvement for the perf-sanity harness.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59412 [ run ] completed with state SUCCESS. Commit: 6a4b3d0
/LLM/main/L0_MergeRequest_PR pipeline #47883 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@yufeiwu-nv
yufeiwu-nv removed the request for review from ruodil July 16, 2026 06:53
@JunyiXu-nv
JunyiXu-nv force-pushed the dev-junyix-fix-perf-sanity-fail-fast branch from c9e5b13 to 9c0e885 Compare July 16, 2026 14:16
@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59722 [ run ] triggered by Bot. Commit: 9c0e885 Link to invocation

Comment thread tests/integration/defs/perf/test_perf_sanity.py
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59722 [ run ] completed with state SUCCESS. Commit: 9c0e885
/LLM/main/L0_MergeRequest_PR pipeline #48149 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

JunyiXu-nv added a commit to JunyiXu-nv/TensorRT-LLM that referenced this pull request Jul 17, 2026
Agg and disagg servers have very different init times (disagg /health
answers only once every ctx/gen worker is up), so a single override var
could not extend one without the other. Add
TRTLLM_TEST_AGG_SERVER_READY_TIMEOUT and
TRTLLM_TEST_DISAGG_SERVER_READY_TIMEOUT, with the existing
TRTLLM_TEST_SERVER_READY_TIMEOUT as a shared fallback.

Addresses brnguyen2's review comment on PR NVIDIA#16403.

Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
JunyiXu-nv added a commit to JunyiXu-nv/TensorRT-LLM that referenced this pull request Jul 17, 2026
Agg and disagg servers have very different init times (disagg /health
answers only once every ctx/gen worker is up), so a single override var
could not extend one without the other. Add
TRTLLM_TEST_AGG_SERVER_READY_TIMEOUT and
TRTLLM_TEST_DISAGG_SERVER_READY_TIMEOUT, with the existing
TRTLLM_TEST_SERVER_READY_TIMEOUT as a shared fallback.

Addresses brnguyen2's review comment on PR NVIDIA#16403.

Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
@JunyiXu-nv
JunyiXu-nv force-pushed the dev-junyix-fix-perf-sanity-fail-fast branch from fa46df7 to 18ada87 Compare July 17, 2026 06:49
Agg and disagg servers have very different init times (disagg /health
answers only once every ctx/gen worker is up), so a single override var
could not extend one without the other. Add
TRTLLM_TEST_AGG_SERVER_READY_TIMEOUT and
TRTLLM_TEST_DISAGG_SERVER_READY_TIMEOUT, with the existing
TRTLLM_TEST_SERVER_READY_TIMEOUT as a shared fallback.

Addresses brnguyen2's review comment on PR NVIDIA#16403.

Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
@JunyiXu-nv
JunyiXu-nv force-pushed the dev-junyix-fix-perf-sanity-fail-fast branch from a069c2a to baf66dc Compare July 21, 2026 03:15
@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60556 [ run ] triggered by Bot. Commit: baf66dc Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60556 [ run ] completed with state SUCCESS. Commit: baf66dc
/LLM/main/L0_MergeRequest_PR pipeline #48867 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60669 [ run ] triggered by Bot. Commit: baf66dc Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60669 [ run ] completed with state FAILURE. Commit: baf66dc
/LLM/main/L0_MergeRequest_PR pipeline #48964 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60712 [ run ] triggered by Bot. Commit: baf66dc Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60712 [ run ] completed with state FAILURE. Commit: baf66dc
/LLM/main/L0_MergeRequest_PR pipeline #49001 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60866 [ run ] triggered by Bot. Commit: baf66dc Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60866 [ run ] completed with state SUCCESS. Commit: baf66dc
/LLM/main/L0_MergeRequest_PR pipeline #49138 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run

Resolve conflict in tests/integration/test_lists/test-db/l0_cpu_x86.yml:
keep both the PR's test_http_utils_fail_fast.py entry and main's new
test_multi_frontend_routing.py entry.

Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61217 [ run ] triggered by Bot. Commit: e7368ee Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61217 [ run ] completed with state FAILURE. Commit: e7368ee
/LLM/main/L0_MergeRequest_PR pipeline #49461 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run

@JunyiXu-nv
JunyiXu-nv enabled auto-merge (squash) July 24, 2026 03:04
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61481 [ run ] triggered by Bot. Commit: e7368ee Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61481 [ run ] completed with state FAILURE. Commit: e7368ee
/LLM/main/L0_MergeRequest_PR pipeline #49702 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61685 [ run ] triggered by Bot. Commit: e7368ee Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61685 [ run ] completed with state SUCCESS. Commit: e7368ee
/LLM/main/L0_MergeRequest_PR pipeline #49891 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@JunyiXu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61697 [ run ] triggered by Bot. Commit: e7368ee Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61697 [ run ] completed with state FAILURE. Commit: e7368ee
/LLM/main/L0_MergeRequest_PR pipeline #49902 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants