Skip to content

fix: recycle poisoned Parakeet GPU workers - #10413

Merged
kodjima33 merged 3 commits into
mainfrom
kodjima33/fix-parakeet-pod
Jul 23, 2026
Merged

kodjima33 merged 3 commits into
mainfrom
kodjima33/fix-parakeet-pod

Conversation

@kodjima33

@kodjima33 kodjima33 commented Jul 23, 2026 •

Copy link
Copy Markdown
Collaborator

What changed and why

Parakeet could keep a replica Ready after a fatal CUDA stream-capture error, so one poisoned process served only HTTP 500s indefinitely. This disables CUDA graph decoding when batch and streaming inference share the GPU, makes fatal accelerator errors poison the authoritative GPU worker state, and lets health probes recycle the replica.

It also adds per-pod black-hole and fatal-CUDA alerts and fixes the dashboard to use Parakeet's success/error status labels.

Product invariants affected

none

How it was verified

  • Recycled the original poisoned production pod and observed its replacement become Ready and serve successful transcriptions with no CUDA/HTTP 500 errors.
  • The live Prometheus form of the new black-hole query then detected the same failure recurring on that replacement. Production logs confirmed the exact cudaErrorStreamCaptureUnsupported failure.
  • Completed a rolling Parakeet-only configuration change to PARAKEET_CUDA_GRAPHS=false while the healthy sibling continued serving. Both replacement replicas became Ready with healthy /health responses and served 211 real transcriptions immediately after rollout (209 + 2), with zero HTTP 500s and zero fatal-CUDA signatures.
  • backend/.venv/bin/python -m pytest -q backend/tests/unit/test_parakeet_gpu_worker.py backend/tests/unit/test_parakeet_endpoints.py backend/tests/unit/test_parakeet_stream_session.py backend/tests/unit/test_parakeet_helm_contract.py backend/tests/unit/test_monitoring_alert_rule_contract.py — 149 passed.
  • make runtime-image-source-closure — all 10 registered runtime-image contracts passed.
  • PYTHON=.venv/bin/python bash test-preflight.sh — 18 checks passed, 0 failed.
  • OMI_PR_BODY_FILE=/tmp/parakeet-pr-body.md make preflight — all 20 diff-scoped checks passed; the bounded pre-push typecheck, unit-test, OpenAPI, and formatting gate also passed.
  • The repository-wide PYTHON=.venv/bin/python bash test.sh run reached and passed every Parakeet test, but was not green due unrelated current-tree failures in desktop release contracts and fast-unit timing guards; one unrelated memory-adapter process was interrupted after remaining idle on a live Google connection for more than eight minutes.
  • GitHub's backend unit, image-smoke, source-closure, API-contract, sync-gauntlet, and listen-gauntlet checks passed. The broad hermetic E2E job twice reproduced the current unrelated TestSurfaceDefaultAccessMatrix...[agent_tools] failure (113 passed, 3 skipped); the identical failure is present on PR fix(sync): stop routing all offline recordings through the bounded backfill lane #10400, whose diff only touches sync cloud-task files.

The real CUDA concurrency trigger was not reproduced on a development GPU. Its production recurrence and removal by the live configuration rollout provide the runtime evidence.

Tests

  • test_exact_incident_error_transitions_real_worker_health_to_unhealthy covers the incident error flowing through the real worker state into HTTP 503 health.
  • TestGPUWorkerFatalCUDA covers fatal classification, fail-closed admission, callback idempotency, thread shutdown, ordinary error recovery, and OOM separation.
  • RNNT tests cover fatal startup/decode propagation and the nonfatal fallback path.
  • Helm tests require CUDA graphs off plus HTTP readiness/liveness probes.
  • Monitoring contract tests require both per-pod alerts and application status labels.

Failure class (fixes)

Failure-Class: new

Failure-class transition narrative (only when needed)

This adds FC-poisoned-accelerator-readiness. Violated contract: a serving GPU process whose CUDA context is unsafe must not remain Ready or accept more inference. The canonical guard is the GPU worker's fatal state, surfaced through /health to Kubernetes readiness/liveness, with CUDA graphs prohibited when batch and streaming inference share a process. Evidence is the 2026-07-23 production incident, its recurrence on replacement pod prod-omi-parakeet-6cf8b5ccbf-d5786, and the enabling configuration from PR #7938.

New guards (only when adding a check or ratchet)

The Helm and monitoring contract checks would have caught the 2026-07-23 Parakeet incident configuration and observability gaps. This is not a shared primitive because CUDA-context validity and Parakeet's mixed batch/streaming decoder configuration are specific to this GPU service.

Scoped cleanups (optional)

The Parakeet dashboard's HTTP-style status=~"[45].." filters were changed to the application's actual status="error" label.

Disable batch CUDA graphs when streaming shares the GPU context, fail the worker closed after fatal accelerator errors, and route readiness/liveness through the runtime health state.

Failure-Class: new

Tests: backend focused Parakeet/Helm suite (149 passed); runtime-image source closure passed.
Alert when a Ready Parakeet pod serves repeated errors with no successes or reports a fatal CUDA state, and align dashboard filters with the application's status labels.

Tests: monitoring alert-rule contract passed; live Prometheus accepted the ready-pod query and detected the recurrent poisoned replica.
Record the serving-readiness contract and canonical worker/probe boundary exposed by the 2026-07-23 incident. PR #7938 is the enabling configuration this guard would have caught.
@kodjima33
kodjima33 merged commit b7621a6 into main Jul 23, 2026
42 of 49 checks passed
@kodjima33
kodjima33 deleted the kodjima33/fix-parakeet-pod branch July 23, 2026 17:32
undivisible pushed a commit to undivisible/omi that referenced this pull request Sep 29, 2026
## What changed and why

Parakeet could keep a replica Ready after a fatal CUDA stream-capture
error, so one poisoned process served only HTTP 500s indefinitely. This
disables CUDA graph decoding when batch and streaming inference share
the GPU, makes fatal accelerator errors poison the authoritative GPU
worker state, and lets health probes recycle the replica.

It also adds per-pod black-hole and fatal-CUDA alerts and fixes the
dashboard to use Parakeet's `success`/`error` status labels.

## Product invariants affected

none

## How it was verified

- Recycled the original poisoned production pod and observed its
replacement become Ready and serve successful transcriptions with no
CUDA/HTTP 500 errors.
- The live Prometheus form of the new black-hole query then detected the
same failure recurring on that replacement. Production logs confirmed
the exact `cudaErrorStreamCaptureUnsupported` failure.
- Completed a rolling Parakeet-only configuration change to
`PARAKEET_CUDA_GRAPHS=false` while the healthy sibling continued
serving. Both replacement replicas became Ready with healthy `/health`
responses and served 211 real transcriptions immediately after rollout
(209 + 2), with zero HTTP 500s and zero fatal-CUDA signatures.
- `backend/.venv/bin/python -m pytest -q
backend/tests/unit/test_parakeet_gpu_worker.py
backend/tests/unit/test_parakeet_endpoints.py
backend/tests/unit/test_parakeet_stream_session.py
backend/tests/unit/test_parakeet_helm_contract.py
backend/tests/unit/test_monitoring_alert_rule_contract.py` — 149 passed.
- `make runtime-image-source-closure` — all 10 registered runtime-image
contracts passed.
- `PYTHON=.venv/bin/python bash test-preflight.sh` — 18 checks passed, 0
failed.
- `OMI_PR_BODY_FILE=/tmp/parakeet-pr-body.md make preflight` — all 20
diff-scoped checks passed; the bounded pre-push typecheck, unit-test,
OpenAPI, and formatting gate also passed.
- The repository-wide `PYTHON=.venv/bin/python bash test.sh` run reached
and passed every Parakeet test, but was not green due unrelated
current-tree failures in desktop release contracts and fast-unit timing
guards; one unrelated memory-adapter process was interrupted after
remaining idle on a live Google connection for more than eight minutes.
- GitHub's backend unit, image-smoke, source-closure, API-contract,
sync-gauntlet, and listen-gauntlet checks passed. The broad hermetic E2E
job twice reproduced the current unrelated
`TestSurfaceDefaultAccessMatrix...[agent_tools]` failure (113 passed, 3
skipped); the identical failure is present on PR BasedHardware#10400, whose diff only
touches sync cloud-task files.

The real CUDA concurrency trigger was not reproduced on a development
GPU. Its production recurrence and removal by the live configuration
rollout provide the runtime evidence.

## Tests

-
`test_exact_incident_error_transitions_real_worker_health_to_unhealthy`
covers the incident error flowing through the real worker state into
HTTP 503 health.
- `TestGPUWorkerFatalCUDA` covers fatal classification, fail-closed
admission, callback idempotency, thread shutdown, ordinary error
recovery, and OOM separation.
- RNNT tests cover fatal startup/decode propagation and the nonfatal
fallback path.
- Helm tests require CUDA graphs off plus HTTP readiness/liveness
probes.
- Monitoring contract tests require both per-pod alerts and application
status labels.

## Failure class (fixes)

Failure-Class: new

## Failure-class transition narrative (only when needed)

This adds `FC-poisoned-accelerator-readiness`. Violated contract: a
serving GPU process whose CUDA context is unsafe must not remain Ready
or accept more inference. The canonical guard is the GPU worker's fatal
state, surfaced through `/health` to Kubernetes readiness/liveness, with
CUDA graphs prohibited when batch and streaming inference share a
process. Evidence is the 2026-07-23 production incident, its recurrence
on replacement pod `prod-omi-parakeet-6cf8b5ccbf-d5786`, and the
enabling configuration from PR BasedHardware#7938.

## New guards (only when adding a check or ratchet)

The Helm and monitoring contract checks would have caught the 2026-07-23
Parakeet incident configuration and observability gaps. This is not a
shared primitive because CUDA-context validity and Parakeet's mixed
batch/streaming decoder configuration are specific to this GPU service.

## Scoped cleanups (optional)

The Parakeet dashboard's HTTP-style `status=~"[45].."` filters were
changed to the application's actual `status="error"` label.
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.

1 participant