[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1031423: rocminfo: rocm_agent_enumerator PermissionError in readFromKFD



Package: rocminfo
Version: 5.2.3-2
Severity: normal
X-Debbugs-Cc: cgmb@slerp.xyz

Dear Maintainer,

When a user invokes rocm_agent_enumerator but does not have sufficient
permissions to read /sys/class/kfd/kfd/topology/nodes/*/properties,
the program will crash with the error

    Traceback (most recent call last):
      File "/usr/bin/rocm_agent_enumerator", line 257, in <module>
        main()
      File "/usr/bin/rocm_agent_enumerator", line 241, in main
        target_list = readFromKFD()
                      ^^^^^^^^^^^^^
      File "/usr/bin/rocm_agent_enumerator", line 200, in readFromKFD
        line = f.readline()
               ^^^^^^^^^^^^
    PermissionError: [Errno 1] Operation not permitted

I tried adding a try/except for OSError exceptions around the file
open/read in readFromKFD and this allowed the script to continue. It
then attempted to identify the GPU using fallback methods (lspci and
rocminfo). In my case, the fallbacks were successful.

Perhaps this condition should not be a fatal error?

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-3-amd64 (SMP w/32 CPU threads; PREEMPT)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages rocminfo depends on:
ii  kmod                30+20221128-1
ii  libc6               2.36-8
ii  libgcc-s1           12.2.0-14
ii  libhsa-runtime64-1  5.2.3-2
ii  libstdc++6          12.2.0-14
ii  pciutils            1:3.9.0-4
ii  python3             3.11.2-1

rocminfo recommends no packages.

rocminfo suggests no packages.

-- no debconf information


Reply to: