gpu-operator icon indicating copy to clipboard operation
gpu-operator copied to clipboard

[Bug]: nvidia-validator waits the full timeout on a failed validation pod; loadPodSpec panics

Open CloneOfAlex opened this issue 1 month ago • 2 comments

Describe the bug

  • waitForPod (cmd/nvidia-validator/main.go:1347) only returns on phase Succeeded. If the plugin or CUDA validation pod reaches Failed, it keeps polling for 60 × 5 s = 5 minutes and never logs why the pod failed.
  • loadPodSpec calls panic(err) on a read error (line 1370) and indexes slice[1] without a length check (line 1378); the parsed kind is only logged.

To Reproduce Found by code review. Make the CUDA validation pod fail (e.g. a broken runtime class) and observe the validator wait 5 minutes before erroring, with no failure reason in its log.

Expected behavior Return immediately on PodFailed with the container's termination reason/message; return errors from loadPodSpec instead of panicking.

Environment (please provide the following information):

  • GPU Operator Version: main @ f806d6b (code inspection)

CloneOfAlex avatar Oct 13 '26 17:10 CloneOfAlex

We are going to keep the 5 minute timeout as it is for now and only address the loadPodSpec panics. Opened #3108 for that

kvalliyurnatt avatar Oct 22 '26 01:10 kvalliyurnatt

Thanks @kvalliyurnatt, that works for me. Keeping the 5-minute timeout and fixing the loadPodSpec panics in #3108 covers the part that can crash the validator.

CloneOfAlex avatar Nov 05 '26 23:11 CloneOfAlex