NVIDIA NVML Initialization Failure
The NVIDIA device plugin relies on the NVML library to discover GPUs and report their health to the kubelet. If the underlying GPU hardware experiences a fault (e.g., an Xid error causing it to fall off the PCIe bus), or if there is a cgroup driver mismatch (e.g., systemd vs cgroupfs) breaking container runtime permissions, NVML fails to initialize.
The NVIDIA device plugin relies on the NVML library to discover GPUs and report their health to the kubelet.
- Root cause
- The NVIDIA device plugin relies on the NVML library to discover GPUs and report their health to the kubelet. If the underlying GPU hardware experiences a fault (e.g.
- Recommended fix
- Restart Node or Reload Driver sudo rmmod nvidia && sudo modprobe nvidia Clears hardware faults and reloads the kernel modules, often restoring NVML functionality.
- How Denpex helps
- Denpex matches NVIDIA NVML Initialization Failure across every rank in a distributed run and reports which rank failed first, so you act on the initiating node instead of the loudest one.
What this failure is
NVIDIA NVML Initialization Failure is a Hardware failure seen during ML training runs. The NVIDIA device plugin relies on the NVML library to discover GPUs and report their health to the kubelet. If the underlying GPU hardware experiences a fault (e.g., an Xid error causing it to fall off the PCIe bus), or if there is a cgroup driver mismatch (e.g., systemd vs cgroupfs) breaking container runtime permissions, NVML fails to initialize. Common tags: Device Plugin.
Is this what broke your run? Paste your log.
You're reading about NVIDIA NVML Initialization Failure. Paste your own crash log or traceback below and get the real root cause for YOUR run, not this generic entry. No account, no card. Logs are masked at ingress and never saved to account history.
Want 14 days on the Scale plan?
Request an evaluation code. A verified workplace organization activates up to 50 diagnoses a day, alerts, history, and follow-up questions. No credit card or automatic subscription.
Why it happens (the mechanism)
The node itself often shows as 'Ready' in Kubernetes. You have to inspect the capacity of the node specifically for 'nvidia.com/gpu' or check the logs of the device plugin pod to realize the GPUs are essentially offline.
What you'll observe
- Failed to initialize NVML: Unknown Error
- Failed to initialize NVML: Driver/library version mismatch
Common symptoms and what they mean
| Symptom | Why it happens |
|---|---|
| Pods requesting GPUs are stuck in Pending because the node advertises 0 allocatable GPUs. | The NVIDIA device plugin relies on the NVML library to discover GPUs and report their health to the kubelet. If the underlying GPU hardware experiences a fault (e.g., an Xid error causing it to fall off the PCIe bus), or if there is a cgroup driver mismatch (e.g., systemd vs cgroupfs) breaking container runtime permissions, NVML fails to initialize. |
| The NVIDIA device plugin daemonset pod on a specific node is crash-looping. | The NVIDIA device plugin relies on the NVML library to discover GPUs and report their health to the kubelet. If the underlying GPU hardware experiences a fault (e.g., an Xid error causing it to fall off the PCIe bus), or if there is a cgroup driver mismatch (e.g., systemd vs cgroupfs) breaking container runtime permissions, NVML fails to initialize. |
| Pods launch but applications immediately crash with 'CUDA driver version is insufficient for CUDA runtime version'. | The NVIDIA device plugin relies on the NVML library to discover GPUs and report their health to the kubelet. If the underlying GPU hardware experiences a fault (e.g., an Xid error causing it to fall off the PCIe bus), or if there is a cgroup driver mismatch (e.g., systemd vs cgroupfs) breaking container runtime permissions, NVML fails to initialize. |
Which systems are affected
- NVIDIA Device Plugin
- NVIDIA Container Toolkit
- GPU Driver
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.
- ✓kubectl get nodes -o custom-columns=NAME:.metadata.name,GPU:.status.allocatable.nvidia\.com/gpu
- ✓SSH to node and run 'nvidia-smi'. If it hangs or errors, it's a driver/hardware issue.
- ✓kubectl logs -n kube-system ds/nvidia-device-plugin-daemonset
The fix and the prevention pattern
The root cause is on this page and stays free. A free account adds the exact remediation steps, saved history, and the fix on every entry in the encyclopedia.
Sign up free. Unlock the full analysisNo credit card. Daily allowance follows verified trust tier. Instant access.
Diagnose this failure in VS Code
Select the traceback or open the failed terminal, then run Denpex locally to see the initiating rank, collateral failures, exact fix, and verification command without uploading the log.
Install the free VS Code extensionRoot cause
- The NVIDIA device plugin relies on the NVML library to discover GPUs and report their health to the kubelet. If the underlying GPU hardware experiences a fault (e.g., an Xid error causing it to fall off the PCIe bus), or if there is a cgroup driver mismatch (e.g., systemd vs cgroupfs) breaking container runtime permissions, NVML fails to initialize.
The fix and how to prevent it
Evaluate Denpex on your own logs
Request a Scale evaluation code. A verified workplace organization activates 14 days with up to 50 diagnoses a day. Every account keeps its current diagnosis allowance and gets a verification path. No card or automatic subscription.
References
Don't just read the fix, diagnose your run
The encyclopedia tells you what went wrong. Denpex tells you what went wrong in YOUR training run. With your logs, your config, and your stack.