Skip to content

Conversation

@elezar
Copy link
Member

@elezar elezar commented Nov 4, 2025

This change switches to making nvsandboxutils opt-in when generating CDI specs. Furthermore, and explicit config option is provided to allow nvcdi features to be specified when using the (now default) jit-cdi mode.

Fixes #1398

These changes will also need to be pulled in to the device plugin.

To opt-in to this feature for the jit-cdi mode, run:

sudo nvidia-ctk config --in-place --set nvidia-container-runtime.modes.jit-cdi.nvcdi-feature-flags=enable-nvsandboxutils 

To opt-in for nvidia-ctk cdi generate run:

nvidia-ctk cdi generate --feature-flag=enable-nvsandboxutils

To opt-in for the nvidia-cdi-refresh.service add:

NVIDIA_CTK_CDI_GENERATE_FEATURE_FLAGS=enable-nvsandboxutils

to /etc/nvidia-container-toolkit/nvidia-cdi-refresh.env.

This change disables the use of nvsandboxuitls for CDI spec
generation by default. This prevents issues with specific
(end-of-life) driver versions where consecutive calls would
cause a cgo segmentation violation that could not be recovered
from.

The EnableNvsandboxutils feature flag can be specified when generating
CDI specs (or instantiating the nvcdi API) to explicitly opt-in to
using the nvsandboxutils library.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar added this to the v1.18.1 milestone Nov 4, 2025
@elezar
Copy link
Member Author

elezar commented Nov 4, 2025

/cherry-pick release-1.18

This change allows users the posibility to explicitly specify
feature flags for using the `jit-cdi` mode. This allows, for
example, for users to opt-in to use nvsandboxutils in the
default mode in addition to when generating CDI specs
explicitly.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar force-pushed the make-nvsandbox-utils-opt-in branch from b025a99 to 4ea22c5 Compare November 4, 2025 16:18
@elezar elezar changed the title Make nvsandbox utils opt in Disable nvsandbox utils by default Nov 4, 2025
// FeatureDisableNvsandboxUtils disables the use of nvsandboxutils when
// querying devices.
//
// Deprecated: nvsandboxutils is now disabled by default. To opt-in use the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a policy on how long to keep a deprecated feature before total removal?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No we don't.

For this feature specifically, I know that @jgehrcke mentioned using this while working on the dynamic MIG for DRA.

@elezar elezar changed the title Disable nvsandbox utils by default Disable nvsandboxutils by default Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segmentation fault in nvsandboxutils._Cfunc_nvSandboxUtilsShutdown() on Ubuntu 22.04 (v1.18.0)

2 participants