NVIDIA Xid 109: Context Switch Timeout Error
Debug NVIDIA Xid 109 context switch timeout errors in dmesg. Separate hung custom CUDA/Triton kernels and watchdog limits from driver or GSP faults.
NVIDIA Xid 109 (CTX SWITCH TIMEOUT) means the GPU failed to switch execution contexts within the hardware watchdog window. First inspect whether a custom CUDA or Triton kernel ran an unbounded loop or hung on a warp barrier, then check driver/GSP release notes if standard verified workloads trigger it.
- Symptom
NVRM: Xid (PCI:0000:07:00): 109, pid=14920, name=python3, Ch 00000010, errorString CTX SWITCH TIMEOUT- Root cause
- A stalled GPU channel blocked context preemption due to a hung user kernel, driver bug, or firmware condition.
- Recommended fix
- Capture dmesg -T, the PID named in the Xid 109 line, and the active Python/CUDA stack trace before killing the job.
- How Denpex helps
- Denpex investigates NVIDIA Xid 109: Context Switch Timeout Error using the evidence you provide or your connected workload collects. Earlier rank, host or application evidence is needed to distinguish an initiating failure from a downstream report.
What this failure is
Xid 109 is the NVIDIA kernel driver event logged when a GPU graphics or compute channel stalls and cannot complete a context switch within its timeout.
Is this what broke your run? Paste your log.
You're reading about NVIDIA Xid 109: Context Switch Timeout Error. Paste your own traceback and relevant evidence for an investigation of your workload, with a next action or a specific missing fact. A reference entry does not establish your cause. No account or card for the free diagnosis. Review data handling before submitting sensitive logs.
Before uploading, review cloud data handling and local options.
Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.
Why it happens (the mechanism)
Compute preemption and context switching stall when a non-preemptible kernel enters an infinite loop, waits indefinitely on device synchronization, or hits a driver/GSP firmware deadlock.
What you'll observe
- The GPU stops switching between processes or CUDA streams and emits Xid 109.
- Running inference or training processes hang until killed or until the node is reset.
Common symptoms and what they mean
Check possible explanations against the incident evidence. A matching symptom alone does not establish its cause.
| Symptom | Possible explanation |
|---|---|
| NVRM: Xid (PCI:0000:xx:00): 109, pid=..., CTX SWITCH TIMEOUT in dmesg | A stalled GPU channel blocked context preemption due to a hung user kernel, driver bug, or firmware condition. |
| nvidia-smi hangs or shows 100% GPU utilization with zero forward training progress | A stalled GPU channel blocked context preemption due to a hung user kernel, driver bug, or firmware condition. |
Which systems are affected
- NVIDIA GPUs running custom CUDA, Triton, or CUTLASS kernels
- Shared multi-tenant GPUs or systems running GSP firmware drivers
How to confirm this is the problem
Use this checklist to test the hypothesis against a small reproduction. No single line proves the root cause, so preserve the preceding events and compare one variable at a time.
- ✓Inspect dmesg -T for Xid 109 and note the reported process name and PID.
- ✓Check whether the fault follows one specific custom kernel or occurs randomly across standard workloads.
- ✓Run compute-sanitizer --tool synccheck on the suspect kernel.
Root cause
- A stalled GPU channel blocked context preemption due to a hung user kernel, driver bug, or firmware condition.
The fix and how to prevent it
How to fix it
- Capture dmesg -T, the PID named in the Xid 109 line, and the active Python/CUDA stack trace before killing the job.
- Test custom CUDA or Triton kernels with Compute Sanitizer synccheck and bounded inputs to check for infinite loops or divergent barriers.
- Check NVIDIA driver release notes for known Xid 109 / GSP fixes if standard workloads stall across multiple nodes.
- Drain GPU clients and perform an operator-approved GPU reset or host reboot if the context remains wedged.
Step-by-step remediation
- 1Read the PID and process name in the Xid 109 dmesg line.
- 2Inspect recent Triton/CUDA kernel changes and run Compute Sanitizer synccheck on a reduced test.
- 3Save nvidia-bug-report.sh and compare installed driver versions against NVIDIA release advisories.
How to prevent it
- Avoid unbounded device-side spin loops in custom CUDA kernels and test barrier divergence under Compute Sanitizer.
- Keep enterprise GPU drivers on vendor-validated long-term branches.
Save this diagnosis and catch the next crash automatically
All root cause, fix, and prevention steps above are free to read. Create a free account with any email or GitHub to keep your saved diagnosis history across the encyclopedia and run cloud checks, or use a work email below for the 30-day Team evaluation. No card required.
Or start a 30-day free Team trial (work email)
Verified work email unlocks all 14 fleet diagnostic tools, Slack alerts, and team history for 30 days. No card and no automatic charge.
Searchable error signature
NVRM: Xid (PCI:0000:07:00): 109, pid=14920, name=python3, Ch 00000010, errorString CTX SWITCH TIMEOUTUse this text as a lookup key in logs and upstream issue trackers. It is not presented as a captured customer log. Confirm the cause from your own preceding events, versions, configuration and the cited references.
Diagnose your own log automatically
The root cause and fix steps above stay free. Create a free account to analyze full job logs, attribute the first failed rank, and keep saved incident history.
Sign up free. Analyze your cluster logsNo credit card. Daily allowance follows verified trust tier. Instant access.
Why the recommended fix works
Distinguishing an application infinite-loop kernel from a driver preemption bug prevents unnecessary node replacements while protecting cluster stability.
Code examples
dmesg -T | grep -iE 'xid|109|ctx switch'
compute-sanitizer --tool synccheck python repro_kernel.pyThis snippet illustrates the entry-specific check. Verify the installed versions, permissions, target and workload context before using it. A command or API example is not proof of recovery.
Best practices by model family
| Model / Stack | Recommendation | Notes |
|---|---|---|
| Custom kernel / Triton dev | Check loops and barrier syncs | Unbounded while loops or divergent __syncthreads() can stall preemption. |
| Stock PyTorch / vLLM on fleet | Audit driver and GSP version | Check NVIDIA driver release notes and collect nvidia-bug-report.sh. |
With the fix vs without the fix
| Dimension | With the fix | Without the fix |
|---|---|---|
| Suspect scope | Match PID in Xid 109 to active kernel | Assuming every timeout is a dead GPU |
| Kernel validation | compute-sanitizer --tool synccheck | Rerunning hung kernels on production nodes |
Diagnostic note
“Based on NVIDIA Xid catalog CTX SWITCH TIMEOUT documentation. Example log illustrates typical NVRM kernel format.”
Visual fingerprint
Xid 109 -> map PID to kernel -> custom kernel? -> synccheck / loop audit | stock workload? -> check driver/GSP notes & bug report
Xid 109 in context
Xid 109 identifies a driver-observed event. Preserve the full message, device identity and surrounding workload and host evidence before distinguishing application, driver and hardware causes. The code alone does not justify replacing a board.
Compare Xid event familiesDiagnose this failure in VS Code
Select the traceback or open the failed terminal, then run Denpex locally to inspect matched failure patterns, supporting evidence and next checks without uploading the log. Verify recommendations against your workload before changing production.
Install the free VS Code extensionFrequently asked questions
Questions engineers and on-call staff commonly ask about this failure.
Can a bad CUDA kernel cause NVIDIA Xid 109?
How is Xid 109 different from Xid 119?
Don't just read the fix, diagnose your run
The encyclopedia explains documented failure patterns. Denpex investigates your logs, configuration and stack, shows the supporting evidence, and asks for missing details when needed.
Related Reliability errors
GB200 NVL72 driver hang with Xid 150 and 154 after long uptime is a firmware bug, not a dead GPU
Reliability · high
Sequence Length Imbalance Causing Distributed Training Stragglers
Reliability · high
Silent Data Corruption from GPU Hardware Faults Causing Loss Spikes and Model Divergence
Reliability · critical
NIXL Firmware Page Registration Fan-Out Triggers Host OOM Kills on HGX H200 and B200
Reliability · critical