Skip to content

[Bug]: CDI spec missing core driver libraries (libnvidia-eglcore/glcore/glsi/tls) on Debian-based systems — getVersionLibs() only searches libcuda.so's subdirectory #1908

Description

@silent-zgh

Describe the bug
On Debian-based systems, nvidia-ctk cdi generate (and jit-cdi at container startup) produces an incomplete CDI specification that omits 4 core driver libraries: libnvidia-eglcore, libnvidia-glcore, libnvidia-glsi, and libnvidia-tls. This causes EGL initialization to fail silently at runtime, falling back to Mesa software rendering without any error. nvidia-smi shows zero GPU utilization for affected containers.
To Reproduce

# On any Debian/Ubuntu/Deepin host with NVIDIA .deb driver installed
nvidia-ctk cdi generate --output /tmp/test-cdi.yaml

# Verify core dependencies are missing
grep "containerPath" /tmp/test-cdi.yaml | grep -E "eglcore|glcore|glsi|tls"
# → empty output

# Verify the files exist on the host
ls -1 /usr/lib/x86_64-linux-gnu/libnvidia-eglcore* \
      /usr/lib/x86_64-linux-gnu/libnvidia-glcore* \
      /usr/lib/x86_64-linux-gnu/libnvidia-glsi* \
      /usr/lib/x86_64-linux-gnu/libnvidia-tls*
# → all 4 files present, but not included in the CDI spec

Screenshots

Image Image

Expected behavior

All driver libraries matching *.so.<driver_version> should be included in the CDI spec regardless of whether they reside in the same subdirectory as libcuda.so. EGL/GLX initialization should succeed and use GPU rendering.
Environment

  • nvidia-container-toolkit version: 1.18.2

  • NVIDIA Driver Version: 535.161.10 (installed via .deb)

  • Host OS: UOS Desktop 20 Professional (Debian-based, derivative of Deepin)

  • Kernel Version: 6.1.32-amd64-desktop-hwe

  • Container Runtime Version: containerd (bundled with k3s v1.34.3+k3s1)

  • CPU Architecture: x86_64

  • GPU Model: NVIDIA Graphics Device (RTX series)

  • RPM-based systems (RHEL, Fedora) are not affected — all driver libraries are flat in /usr/lib64/, so filepath.Dir(libcuda) captures everything.

  • Workaround: container init script manually symlinks missing libraries, but this should not be necessary.

  • Related: CDI Spec Generation is missing driver libraries #1215 (broader class of CDI spec missing driver libraries), Missed libraries in container compared to what GPU driver installs kubernetes-sigs/dra-driver-nvidia-gpu#446.

Metadata

Metadata

Assignees

Labels

bugIssue/PR to expose/discuss/fix a bugneeds-triageissue or PR has not been assigned a priority-px label

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions