Skip to content

[LEP-3777] fix(nvidia): do not exit on NVML init error (instead returns Unhealthy)#1180

Merged
gyuho merged 7 commits into
mainfrom
handle-nvml-error
Jan 13, 2026
Merged

[LEP-3777] fix(nvidia): do not exit on NVML init error (instead returns Unhealthy)#1180
gyuho merged 7 commits into
mainfrom
handle-nvml-error

Conversation

@gyuho

@gyuho gyuho commented Dec 17, 2025

Copy link
Copy Markdown
Member

Signed-off-by: Gyuho Lee gyuhol@nvidia.com

@gyuho gyuho added this to the v0.10 milestone Dec 17, 2025
@gyuho gyuho self-assigned this Dec 17, 2025
@gyuho
gyuho force-pushed the handle-nvml-error branch from 0dc9cde to 2aa2bfe Compare December 29, 2025 05:24
@codecov

codecov Bot commented Dec 29, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 177 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.72%. Comparing base (3e2c038) to head (fb24810).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/nvidia-query/nvml/instance.go 0.00% 25 Missing ⚠️
...onents/accelerator/nvidia/clock-speed/component.go 0.00% 7 Missing and 1 partial ⚠️
components/accelerator/nvidia/ecc/component.go 0.00% 7 Missing and 1 partial ⚠️
...nts/accelerator/nvidia/fabric-manager/component.go 0.00% 7 Missing and 1 partial ⚠️
components/accelerator/nvidia/gpm/component.go 0.00% 7 Missing and 1 partial ⚠️
...ponents/accelerator/nvidia/gpu-counts/component.go 0.00% 7 Missing and 1 partial ⚠️
...onents/accelerator/nvidia/hw-slowdown/component.go 0.00% 7 Missing and 1 partial ⚠️
...ponents/accelerator/nvidia/infiniband/component.go 0.00% 7 Missing and 1 partial ⚠️
components/accelerator/nvidia/memory/component.go 0.00% 7 Missing and 1 partial ⚠️
components/accelerator/nvidia/nccl/component.go 0.00% 7 Missing and 1 partial ⚠️
... and 10 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1180      +/-   ##
==========================================
- Coverage   70.25%   69.72%   -0.54%     
==========================================
  Files         337      337              
  Lines       23766    23941     +175     
==========================================
- Hits        16697    16693       -4     
- Misses       5993     6152     +159     
- Partials     1076     1096      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gyuho
gyuho force-pushed the handle-nvml-error branch from 16deecb to f175aa8 Compare January 8, 2026 04:54
Comment thread components/accelerator/nvidia/clock-speed/component.go Outdated
…ns Unhealthy)

Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>
@gyuho
gyuho force-pushed the handle-nvml-error branch from f175aa8 to 189a250 Compare January 12, 2026 10:36
…nents

Extends the graceful NVML initialization error handling from clock-speed
(commit 56024b2) to all 18 remaining nvidia accelerator components.

Changes:
- Add InitError() check to all component Check() methods
- Add InitError() method to all test mock NVML instances
- Add suggestedActions field to 5 component checkResult structs
  (fabric-manager, nccl, peermem, sxid, xid)
- Add missing fmt import to infiniband component

When NVML initialization fails (e.g., "error getting device handle for
index 'N': Unknown Error" / "GPU has fallen off the bus"), components
now report unhealthy status with reboot suggestion instead of causing
gpud to exit.

This ensures gpud remains operational while clearly reporting GPU
hardware issues that require system intervention.

Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>
@gyuho
gyuho force-pushed the handle-nvml-error branch from 189a250 to dd08a68 Compare January 12, 2026 16:51
gyuho added 5 commits January 13, 2026 11:26
Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>
Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>
Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>
Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>
Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>
@gyuho
gyuho merged commit 55bb48a into main Jan 13, 2026
14 of 16 checks passed
@gyuho
gyuho deleted the handle-nvml-error branch January 13, 2026 06:50
gyuho added a commit that referenced this pull request Jan 15, 2026
… testing NVML init failures

This adds a hidden testing flag to simulate Device().GetDevices() failures,
enabling integration testing of the erroredInstance path introduced in:
#1180

The flag simulates the "Unable to determine the device handle for GPU: Unknown Error"
scenario that occurs when NVML loads but device enumeration fails (e.g., Xid 79).
When enabled, gpud continues running but all nvidia components report unhealthy.

Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>
gyuho added a commit that referenced this pull request Jan 15, 2026
… testing NVML init failures

This adds a hidden testing flag to simulate Device().GetDevices() failures,
enabling integration testing of the erroredInstance path introduced in:
#1180

The flag simulates the "Unable to determine the device handle for GPU: Unknown Error"
scenario that occurs when NVML loads but device enumeration fails (e.g., Xid 79).
When enabled, gpud continues running but all nvidia components report unhealthy.

Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>
gyuho added a commit that referenced this pull request Jan 16, 2026
… testing NVML init failures

This adds a hidden testing flag to simulate Device().GetDevices() failures,
enabling integration testing of the erroredInstance path introduced in:
#1180

The flag simulates the "Unable to determine the device handle for GPU: Unknown Error"
scenario that occurs when NVML loads but device enumeration fails (e.g., Xid 79).
When enabled, gpud continues running but all nvidia components report unhealthy.

Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>
gyuho added a commit that referenced this pull request Jan 19, 2026
… testing NVML init failures (#1196)

This adds a hidden testing flag to simulate Device().GetDevices()
failures,
enabling integration testing of the erroredInstance path introduced in:
#1180

The flag simulates the "Unable to determine the device handle for GPU:
Unknown Error"
scenario that occurs when NVML loads but device enumeration fails (e.g.,
Xid 79).
When enabled, gpud continues running but all nvidia components report
unhealthy.

Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>

Signed-off-by: Gyuho Lee <gyuhol@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants