Skip to content

[Fix] test-utils: Allow expected server exits in canary tests - #45172

Merged
Fridge003 merged 2 commits into
sgl-project:mainfrom
alphabetc1:fix/canary-expected-server-exit
Oct 20, 2026
Merged

Fridge003 merged 2 commits into
sgl-project:mainfrom
alphabetc1:fix/canary-expected-server-exit

Conversation

@alphabetc1

@alphabetc1 alphabetc1 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

The fail-fast watcher added in #45053 aborts TestPerturbRaiseMha when its intentionally corrupted KV cache makes the server exit. The canary correctly reports verify_real_kv_hash, but the watcher exits the test runner before it can assert the captured violation. This caused this CI failure on #44623.

Modifications

  • Add CustomTestCase.expect_server_exit, defaulting to false. Opted-in tests run their assertions without a fail-fast watcher or retries against a terminated server.
  • Opt in only the canary raise-mode fault-injection test; preserve its violation assertions.

Validation

  • Pre-commit checks passed for the changed Python files.
  • Use the existing test/registered/kv_canary/test_self_e2e_perturb_raise.py as the regression test: it must complete its verify_real_kv_hash violation assertions after the intentional server exit. It remains registered for CUDA and AMD CI.
  • Targeted GPU rerun passed on 1-gpu-5090 at commit f5333ca417c: workflow run. The existing canary test triggered the expected verify_real_kv_hash violation and completed successfully: Ran 1 test in 51.741s, OK.

No model execution or inference performance changes.


CI States

Latest PR Test (Base): ❌ Run #39256154023
Latest PR Test (Extra): ❌ Run #39256153890
Latest PR Test (AMD ROCm 10): ❌ Run #39256154039

@alphabetc1

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/kv_canary/test_self_e2e_perturb_raise.py

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🚀 1-gpu-5090 (1 test): ✅ View workflow run

cd test/ && python3 registered/kv_canary/test_self_e2e_perturb_raise.py

@alphabetc1

Copy link
Copy Markdown
Collaborator Author

/rerun-test test/registered/kv_canary/test_self_e2e_perturb_raise.py

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🚀 1-gpu-5090 (1 test): ✅ View workflow run

cd test/ && python3 registered/kv_canary/test_self_e2e_perturb_raise.py

@alphabetc1

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@Fridge003
Fridge003 merged commit c53b98d into sgl-project:main Oct 20, 2026
214 of 247 checks passed
nvpohanh added a commit to rystewart-nvidia/sglang that referenced this pull request Oct 20, 2026
@alphabetc1
alphabetc1 deleted the fix/canary-expected-server-exit branch October 20, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants