Skip to content

Assertion failure: 'We should not be processing a client id twice per update' #435

@Andrew1326

Description

@Andrew1326

Bug Description

nvtop crashes with an assertion failure on AMD GPUs:

nvtop: ./src/extract_gpuinfo_amdgpu.c:964: parse_drm_fdinfo_amd:
Assertion `!cache_entry_check && "We should not be processing a client id twice per update"' failed.
Aborted (core dumped)

Environment

  • OS: Ubuntu 24.04 (Linux 6.14.0-37-generic)
  • GPU: AMD
  • nvtop version: latest from git

Root Cause

The assertion fails when a process has multiple file descriptors referencing the same DRM client (e.g., via dup(), fork(), or DRM master operations). The kcmp syscall filters duplicate file descriptions but not distinct file descriptions that report the same underlying DRM client_id.

Fix

PR #434 converts the debug assertion into a runtime check that gracefully handles duplicates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions