Widen DeleteQueuedJobPreventsRun/DeleteRunningJobCancelsWorker timeouts - #1877
Widen DeleteQueuedJobPreventsRun/DeleteRunningJobCancelsWorker timeouts#1877ramakrishnap-nv wants to merge 1 commit into
Conversation
Both tests share a single worker across the whole DefaultServerTests
suite. Their preceding steps kill the worker via cancel_job
(SIGKILL), and the replacement worker pays for a fresh CUDA context
init before it can claim the next job. Traced the full lifecycle
(cancel_job, delete_job, claim_job_slot, reset_job_slot,
mark_worker_jobs_failed, worker_monitor_thread) and found no logic
bug -- cancelled/dead-worker slot cleanup is correct. Both observed
failures landed right at their timeout boundary (10107ms against a
10s budget; 62425ms total against a 60s probe wait), which is the
signature of a tight timeout margin under CI GPU contention, not a
deadlock -- the CI failure that prompted this was specifically on the
earliest-driver/oldest-deps matrix combo, where CUDA context init is
slowest.
Bump DeleteRunningJobCancelsWorker's "wait for PROCESSING" budget
from 10s to 30s, matching this file's own established headroom for a
worker respawn ("up to ~30s for the replacement worker", used a few
lines later in the same test). Bump DeleteQueuedJobPreventsRun's
probe wait from 60s to 90s for the same reason.
Fixes #1814.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
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)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe GRPC integration tests now allow more time for worker respawn and CUDA initialization. The queued-job completion wait increases to 90 seconds. The running-job processing poll increases to approximately 30 seconds. ChangesGRPC integration test stability
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The GRPC integration tests now wait longer for worker replacement and CUDA initialization while preserving their existing completion and processing-state checks. No merge-blocking risk is evident. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
CI Test Summary✅ All 31 test job(s) passed. |
Summary
Fixes #1814.
DefaultServerTests.DeleteQueuedJobPreventsRunandDefaultServerTests.DeleteRunningJobCancelsWorker(GRPC_INTEGRATION_TEST) have flaked together across at least 3 CI runs on different platforms (see #1814 for prior evidence; latest occurrence: PR #1804, job 102618657558,12.2.2, 3.11, amd64, rockylinux8, v100, earliest-driver, oldest-deps).Root cause
Traced the full server-side job/worker lifecycle:
cancel_job,delete_job,claim_job_slot,reset_job_slot,mark_worker_jobs_failed,worker_monitor_thread. Found no logic bug -- a cancelled queued-job slot is correctly skipped and freed by the next worker that claims it, and a dead worker's in-flight job slot is correctly reset bymark_worker_jobs_failedoncewaitpidreaps it.Both tests share a single worker across the entire
DefaultServerTestssuite (SetUpTestSuitestarts onecuopt_grpc_server --workers 1for all 24 tests). Both failing tests' immediately preceding steps kill that worker viacancel_job(SIGKILL), so the replacement worker has to pay for a fresh CUDA context init (init_worker_cuda_environment) before it can claim the next job -- on top of whatever the actual solve takes. Both observed failures landed right at their timeout boundary rather than hanging indefinitely or failing near-instantly:DeleteRunningJobCancelsWorker: "Job never reached PROCESSING before delete" after 10107ms, against a 10s (40 × 250ms) budget.DeleteQueuedJobPreventsRun: probe stillQUEUEDafter the full test took 62425ms, against a 60swait_for_job_donebudget.That's the signature of a tight timeout margin under CI GPU contention, not a deadlock -- consistent with flaking specifically on
earliest-driver/oldest-deps, the slowest CUDA-init combination in the matrix.Fix
Widen both budgets to match this same file's own established headroom for a worker respawn (
DeleteRunningJobCancelsWorkeralready waits "up to ~30s for the replacement worker" a few lines later, for the probe job):DeleteRunningJobCancelsWorker's "wait for PROCESSING" budget: 10s → 30s (40 → 120 iterations of the same 250ms poll).DeleteQueuedJobPreventsRun's probewait_for_job_done: 60s → 90s.Test plan
clang-formatand pre-commit pass.rmmis version-skewed against the source tree (cuda_stream_viewhas no memberget/sync, in files unrelated to this change), a pre-existing environment issue. CI's pinned environment should build and run this cleanly.