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 investigates NVIDIA NVML Initialization Failure 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
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 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)
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
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., 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
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 extensionReferences
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.