Skip to content

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.

Quick answer

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.
Reliability#xid#xid-109#context-switch#timeout#cuda#gsp

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.

Live diagnosis, no signup

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.

training_logs.txt
No log to hand? Try one:

Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.

3 free cloud diagnoses per day

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.

SymptomPossible explanation
NVRM: Xid (PCI:0000:xx:00): 109, pid=..., CTX SWITCH TIMEOUT in dmesgA 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 progressA 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

  1. 1Read the PID and process name in the Xid 109 dmesg line.
  2. 2Inspect recent Triton/CUDA kernel changes and run Compute Sanitizer synccheck on a reduced test.
  3. 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.

Use your company email, for example alex@yourcompany.com.

Who qualifies?

Company email domains activate the free 30-day Team evaluation (up to 50 diagnoses a day) after an email and domain check, whatever mail provider you use. If we cannot verify your domain automatically, support reviews it: write to support@denpex.com. Free local diagnosis in the editor extension needs no account.

Using a personal email (Gmail, Outlook, Naver, QQ) or solo cluster? Create a free $0 account (no work email required) to save 7-day history and unlock AI fallback, or send a cluster crash log for a live walkthrough.
Already have an account? Sign in

Searchable error signature

search key
NVRM: Xid (PCI:0000:07:00): 109, pid=14920, name=python3, Ch 00000010, errorString CTX SWITCH TIMEOUT

Use 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 logs

No 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

snippet
dmesg -T | grep -iE 'xid|109|ctx switch'
compute-sanitizer --tool synccheck python repro_kernel.py

This 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 / StackRecommendationNotes
Custom kernel / Triton devCheck loops and barrier syncsUnbounded while loops or divergent __syncthreads() can stall preemption.
Stock PyTorch / vLLM on fleetAudit driver and GSP versionCheck NVIDIA driver release notes and collect nvidia-bug-report.sh.

With the fix vs without the fix

DimensionWith the fixWithout the fix
Suspect scopeMatch PID in Xid 109 to active kernelAssuming every timeout is a dead GPU
Kernel validationcompute-sanitizer --tool synccheckRerunning 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 diagnostic split
Xid 109 -> map PID to kernel -> custom kernel? -> synccheck / loop audit | stock workload? -> check driver/GSP notes & bug report
Separate hung user kernels from driver preemption stalls using the PID reported in Xid 109.

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 families

Diagnose 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 extension

Frequently asked questions

Questions engineers and on-call staff commonly ask about this failure.

Can a bad CUDA kernel cause NVIDIA Xid 109?
Yes. A kernel stuck in an infinite loop or deadlocked warp synchronization can block GPU context switching until the driver raises Xid 109.
How is Xid 109 different from Xid 119?
Xid 109 is a GPU channel context-switch timeout, whereas Xid 119 is a driver RPC timeout waiting on the GPU System Processor (GSP) firmware.

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.