Stage 13, Part 3 of 9 · p. 112, AI/ML Workload Orchestration
PART 3: PRODUCTION FAILURE MODES
13. Top 10 AI/ML Orchestration Failures
| # | Failure | Symptom | Root Cause | Fix |
| 1 | Distributed training deadlock | All pods Pending | No gang scheduling | Use Volcano/KAI |
| 2 | Cold start timeout | Autoscaling fails | Model loading takes 5+ min | Model caching, warm pool |
| 3 | KV-cache miss storm | High latency, low throughput | Cache-blind routing | llm-d, Gateway API |
| 4 | GPU OOMKill | Pod killed mid-request | Model + KV-cache exceeds VRAM | Reduce batch size, quantize |
| 5 | KEDA metric unavailable | Autoscaling stuck | Prometheus scrape failure | Fix ServiceMonitor |
| 6 | Model cache stale | Wrong model served | Cache not invalidated | Version cache keys |
| 7 | Gang scheduling deadlock | Pods Pending forever | minMember > available GPUs | Reduce workers, add GPUs |
| 8 | Queue starvation | One team monopolizes GPU | No fair-share policy | Kueue/KAI queues |
| 9 | Tensor parallel mismatch | OOMKill mid-request | num-shard > GPU count | Match num-shard to GPUs |
| 10 | Cache-aware routing misconfigured | No cache hits | Wrong routing policy | Tune llm-d policies |
14. AI Workload Debugging Runbook
"Distributed Training Job is Deadlocked" — Step-by-Step
text
STEP 1: Check job status
$ kubectl get pods -l job-name=<job>
# Look for Pending pods
STEP 2: Check PodGroup/Workload status
$ kubectl get podgroup <name> -o yaml
# Check minMember vs scheduled
STEP 3: Check GPU availability
$ kubectl describe nodes | grep -A5 "nvidia.com/gpu"
STEP 4: Check gang scheduling
$ kubectl get job <name> -o yaml | grep schedulerName
# Should be "volcano" or "kai-scheduler"
STEP 5: Check queue status
$ kubectl get queue -o yaml
STEP 6: Check for resource deadlock
# How many GPUs needed? How many available?
# If needed > available → deadlock
STEP 7: Fix
# Option A: Reduce workers
# Option B: Add GPUs
# Option C: Check other jobs holding GPUs
STEP 8: Escalate
"Inference Latency is High" — Step-by-Step
text
STEP 1: Check GPU utilization
$ kubectl port-forward -n gpu-operator svc/nvidia-dcgm-exporter 9400:9400
curl localhost:9400/metrics | grep DCGM_FI_DEV_GPU_UTIL
STEP 2: Check vLLM queue depth
$ kubectl port-forward svc/vllm 8000:8000
curl localhost:8000/metrics | grep num_requests_waiting
STEP 3: Check KV-cache hit rate
curl localhost:8000/metrics | grep prefix_cache_hit
STEP 4: Check routing
# Is traffic going to the same pod?
$ kubectl get endpoints vllm
STEP 5: Check model caching
# Is the model cached locally?
$ kubectl exec -it <vllm-pod> -- ls /models
STEP 6: Escalate
15. Blast Radius Analysis
What Happens When AI Orchestration Fails?
| Component | Impact | Severity |
| Gang scheduling failure | All distributed training deadlocked | SEV-1 |
| Inference engine down | All LLM requests fail | SEV-1 |
| KEDA down | No autoscaling, capacity fixed | SEV-2 |
| KV-cache routing failure | 10x latency, 10x cost | SEV-2 |
| Model cache corruption | Wrong model served | SEV-1 |
| Queue starvation | One team blocks others | SEV-2 |
| Cold start timeout | Autoscaling ineffective | SEV-2 |
Mitigation Strategies
| Strategy | Implementation |
| Gang scheduling | Volcano or KAI Scheduler |
| Model caching | Local NVMe, warm pools |
| Cache-aware routing | llm-d, Gateway API |
| KEDA autoscaling | Queue-depth metrics |
| Queue fairness | Kueue, KAI queues |
| GPU monitoring | DCGM, Prometheus |
1:1 copy of the class Google Doc, code in code blocks.