The 'fuser' command from crash utility displays unexpected value or bogus result.

Solution In Progress - Updated -

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • Crash Utility

Issue

  • The fuser command from the crash utility accepts the invalid arguments and treats them as valid and displays the unexpected value.
  • The crash utility section of the fuser help page only provides a few details.

Resolution

  • Private bug are reported for RHEL-8 and RHEL-9.
  • Open a support case with Red Hat for more information about it

Root Cause

  • The help page of fuser command from the crash utility has limited information.
crash> help fuser | grep -e SYNOPSIS -e pathname -A 1 
SYNOPSIS
fuser [pathname | inode]

pathname the full pathname of the file.
inode the hexadecimal inode address for the file.

Diagnostic Steps

The fuser command accepts the following arguments as valid arguments and shows an unexpected spurious (bogus) result.

  • Character x as an argument.
crash> fuser x
 PID         TASK        COMM             USAGE
 1445  ffff949dc21d0000  "sshd"           fd 
 1461  ffff949dc21d5580  "sshd"           fd 
 1555  ffff949dc4328000  "packagekitd"    fd 
 1556  ffff949dd5358000  "gmain"          fd 
 1557  ffff949dd535d580  "gdbus"          fd 
 1595  ffff949dc0fb0000  "sshd"           fd 
 1599  ffff949dc0fb1c80  "sshd"           fd 

crash> files 1445
PID: 1445     TASK: ffff949dc21d0000  CPU: 9    COMMAND: "sshd"
ROOT: /    CWD: /
 FD       FILE            DENTRY           INODE       TYPE PATH
  0 ffff949dc35b9e00 ffff949dc06a0540 ffff949dc1294ce8 CHR  /dev/null
  1 ffff949dd1719200 ffff949dc06a0540 ffff949dc1294ce8 CHR  /dev/null
  2 ffff949dd1719200 ffff949dc06a0540 ffff949dc1294ce8 CHR  /dev/null
  3 ffff949dc7265100 ffff949dc898a780 ffff949dc9ab1200 SOCK UNIX
  4 ffff949dc3a46600 ffff949dd2694840 ffff949dd272b500 SOCK TCP
  5 ffff949dcc05ff00 ffff949dc1f2e3c0 ffff949dc29f7208 CHR  /dev/ptmx
  6 ffff949dc2c05600 ffff949dc986fa80 ffff949dc9ab1c80 SOCK UNIX-STREAM
  7 ffff949dcf87f200 ffff949dc89be480 ffff949dca8fd318 FIFO /run/systemd/sessions/systemd/sessions/1.ref
  8 ffff949dcc05eb00 ffff949dd2693000 ffff949dd272f400 SOCK UNIX-STREAM
  • Digit 00 as an argument.
crash> fuser 00 | tail
 5948  ffff949dc0c43900  "gdb worker"     root cwd fd mmap 
 5949  ffff949dc094b900  "gdb worker"     root cwd fd mmap 
 5950  ffff949dc094d580  "gdb worker"     root cwd fd mmap 
 5951  ffff949dc0fb5580  "gdb worker"     root cwd fd mmap 
 5952  ffff949dc66d9c80  "gdb worker"     root cwd fd mmap 
 5953  ffff949dc6a68000  "gdb worker"     root cwd fd mmap 
 5954  ffff949dc2e6b900  "gdb worker"     root cwd fd mmap 
 5955  ffff949dc2e68000  "gdb worker"     root cwd fd mmap 
 5970  ffff949dca930000  "kworker/u24:0"  root cwd 
 5995  ffff949dc2a98000  "tail"           root cwd fd 

crash> files 5955 -R 00
PID: 5955     TASK: ffff949dc2e68000  CPU: 1    COMMAND: "gdb worker"
ROOT: /    CWD: /root 
 FD       FILE            DENTRY           INODE       TYPE PATH
  0 ffff949dcc05ef00 ffff949dd26933c0 ffff949dc3159710 CHR  /dev/pts/0
 15 ffff949dc4a0a400 ffff949e7750db40 ffff949de9824900 REG  /tmp/#100763195
  • Digit 0 as an argument.
crash> fuser 0 | head
 PID         TASK        COMM             USAGE
    1  ffff949dc0903900  "systemd"        fd mmap 
  749  ffff949dd1751c80  "systemd-journa  fd mmap 
  764  ffff949dc0ee9c80  "systemd-udevd"  fd mmap 
  895  ffff949dc55ab900  "auditd"         fd mmap 
  896  ffff949dd1755580  "auditd"         fd mmap 
  897  ffff949dd1753900  "sedispatch"     fd mmap 
  898  ffff949dd1750000  "auditd"         fd mmap 
  918  ffff949dc5e9d580  "dbus-broker-la  fd mmap 
  919  ffff949dc5e99c80  "dbus-broker"    fd mmap 

crash> files 1 -R 0
PID: 1        TASK: ffff949dc0903900  CPU: 2    COMMAND: "systemd"
ROOT: /    CWD: / 
 FD       FILE            DENTRY           INODE       TYPE PATH
  0 ffff949dd1315800 ffff949dc06a0540 ffff949dc1294ce8 CHR  /dev/null

crash> vm 1 -R 0
PID: 1        TASK: ffff949dc0903900  CPU: 2    COMMAND: "systemd"
       MM               PGD          RSS    TOTAL_VM
ffff949dd11dc400  ffff949dc291e000  16120k  171692k 
      VMA           START       END     FLAGS FILE
ffff94a51fd01050 7fd04f2f5000 7fd04f2f9000 8000071 /usr/lib64/libgpg-error.so.0.32.0
ffff94a51fd01308 7fd04f2f9000 7fd04f30f000 8000075 /usr/lib64/libgpg-error.so.0.32.0
ffff94a51fd000e8 7fd04f30f000 7fd04f318000 8000071 /usr/lib64/libgpg-error.so.0.32.0
ffff94a51fd01878 7fd04f318000 7fd04f319000 8000070 /usr/lib64/libgpg-error.so.0.32.0
ffff94a51fd01960 7fd04f319000 7fd04f31a000 8100071 /usr/lib64/libgpg-error.so.0.32.0
ffff94a51fd01c18 7fd04f31a000 7fd04f31b000 8100073 /usr/lib64/libgpg-error.so.0.32.0
ffff949dd23c00e8 7fd04f4cd000 7fd04f4f6000 8000071 /usr/lib64/libp11-kit.so.0.3.0
ffff949dd23c0000 7fd04f4f6000 7fd04f595000 8000075 /usr/lib64/libp11-kit.so.0.3.0
ffff949dd23c0e80 7fd04f595000 7fd04f5ec000 8000071 /usr/lib64/libp11-kit.so.0.3.0
ffff949dd23c01d0 7fd04f5ec000 7fd04f5f6000 8100071 /usr/lib64/libp11-kit.so.0.3.0
ffff949dd130c000 7fd04f5f6000 7fd04f600000 8100073 /usr/lib64/libp11-kit.so.0.3.0
ffff949dd23c1050 7fd04f600000 7fd04f6ad000 8000071 /usr/lib64/libcrypto.so.3.0.1
ffff949dd23c15c0 7fd04f6ad000 7fd04f904000 8000075 /usr/lib64/libcrypto.so.3.0.1
ffff949dd23c1220 7fd04f904000 7fd04f9cf000 8000071 /usr/lib64/libcrypto.so.3.0.1
ffff949dd23c1ed0 7fd04f9cf000 7fd04f9d0000 8000070 /usr/lib64/libcrypto.so.3.0.1
ffff949dd23c14d8 7fd04f9d0000 7fd04fa26000 8100071 /usr/lib64/libcrypto.so.3.0.1
ffff949dd130dc18 7fd04fa26000 7fd04fa29000 8100073 /usr/lib64/libcrypto.so.3.0.1
ffff949dd23c1a48 7fd04fa2c000 7fd04fa2e000 8000071 /usr/lib64/libpcre2-8.so.0.10.2
ffff949dc2c7b6a8 7fd04fa2e000 7fd04fa99000 8000075 /usr/lib64/libpcre2-8.so.0.10.2
ffff949dc2c7b790 7fd04fa99000 7fd04fac0000 8000071 /usr/lib64/libpcre2-8.so.0.10.2
ffff949dd23c1d00 7fd04fac0000 7fd04fac1000 8000070 /usr/lib64/libpcre2-8.so.0.10.2
ffff949dc2c7acb0 7fd04fac1000 7fd04fac2000 8100071 /usr/lib64/libpcre2-8.so.0.10.2
ffff94a51fd01138 7fd04fac2000 7fd04fac3000 8100073 /usr/lib64/libpcre2-8.so.0.10.2
ffff94a0bda9b220 7fd04fac3000 7fd04fad1000 8000071 /usr/lib64/libgcrypt.so.20.4.0
ffff94a0bda9a0e8 7fd04fad1000 7fd04fbb7000 8000075 /usr/lib64/libgcrypt.so.20.4.0
ffff94a0bda9b4d8 7fd04fbb7000 7fd04fbf6000 8000071 /usr/lib64/libgcrypt.so.20.4.0
ffff949dd23c09f8 7fd04fbf6000 7fd04fbfb000 8100071 /usr/lib64/libgcrypt.so.20.4.0
ffff949dd130c1d0 7fd04fbfb000 7fd04fbff000 8100073 /usr/lib64/libgcrypt.so.20.4.0
ffff94a51fd00658 7fd04fe13000 7fd04fe15000 8000071 /usr/lib64/libffi.so.8.1.0
ffff94a51fd00ae0 7fd04fe15000 7fd04fe1b000 8000075 /usr/lib64/libffi.so.8.1.0
ffff94a51fd00bc8 7fd04fe1b000 7fd04fe1d000 8000071 /usr/lib64/libffi.so.8.1.0
ffff94a51fd01d00 7fd04fe1d000 7fd04fe1e000 8100071 /usr/lib64/libffi.so.8.1.0
ffff94a51fd01790 7fd04fe1e000 7fd04fe1f000 8100073 /usr/lib64/libffi.so.8.1.0
ffff94a51fd003a0 7fd04fe1f000 7fd04fe21000 8000071 /usr/lib64/libattr.so.1.1.2501
ffff94a51fd00740 7fd04fe21000 7fd04fe24000 8000075 /usr/lib64/libattr.so.1.1.2501
ffff94a51fd01220 7fd04fe24000 7fd04fe25000 8000071 /usr/lib64/libattr.so.1.1.2501
ffff94a51fd01a48 7fd04fe25000 7fd04fe26000 8100071 /usr/lib64/libattr.so.1.1.2501
ffff949dc2c7bd00 7fd04fe41000 7fd04fe43000 8000071 /usr/lib64/libcap-ng.so.0.0.0
ffff949dc2c7af68 7fd04fe43000 7fd04fe46000 8000075 /usr/lib64/libcap-ng.so.0.0.0
ffff949dc2c7b308 7fd04fe46000 7fd04fe47000 8000071 /usr/lib64/libcap-ng.so.0.0.0
ffff949dc2c7abc8 7fd04fe47000 7fd04fe48000 8000070 /usr/lib64/libcap-ng.so.0.0.0
ffff949dc2c7a9f8 7fd04fe48000 7fd04fe49000 8100071 /usr/lib64/libcap-ng.so.0.0.0
ffff949dc2c7a488 7fd04fe4a000 7fd04fe4c000 8000071 /usr/lib64/libeconf.so.0.4.1
ffff949dc2c7a658 7fd04fe4c000 7fd04fe51000 8000075 /usr/lib64/libeconf.so.0.4.1
ffff949dc2c7b3f0 7fd04fe51000 7fd04fe53000 8000071 /usr/lib64/libeconf.so.0.4.1
ffff949dc2c7a570 7fd04fe53000 7fd04fe54000 8100071 /usr/lib64/libeconf.so.0.4.1
ffff94a0bda9b878 7fd04fea5000 7fd04fea7000 8000071 /usr/lib64/libcrypt.so.2.0.0
ffff94a0bda9b050 7fd04fea7000 7fd04febb000 8000075 /usr/lib64/libcrypt.so.2.0.0
ffff94a0bda9a740 7fd04febb000 7fd04fed4000 8000071 /usr/lib64/libcrypt.so.2.0.0
ffff94a0bda9bed0 7fd04fed4000 7fd04fed5000 8000070 /usr/lib64/libcrypt.so.2.0.0
ffff94a0bda9b5c0 7fd04fed5000 7fd04fed6000 8100071 /usr/lib64/libcrypt.so.2.0.0
ffff94a0bda9b790 7fd04fee9000 7fd04fef0000 8000071 /usr/lib64/libblkid.so.1.1.0
ffff94a0bda9b3f0 7fd04fef0000 7fd04ff10000 8000075 /usr/lib64/libblkid.so.1.1.0
ffff94a0bda9af68 7fd04ff10000 7fd04ff19000 8000071 /usr/lib64/libblkid.so.1.1.0
ffff94a0bda9bde8 7fd04ff19000 7fd04ff1a000 8000070 /usr/lib64/libblkid.so.1.1.0
ffff94a0bda9b308 7fd04ff1a000 7fd04ff1f000 8100071 /usr/lib64/libblkid.so.1.1.0
ffff949dd130d050 7fd04ff1f000 7fd04ff20000 8100073 /usr/lib64/libblkid.so.1.1.0
ffff94a0bda9aae0 7fd04ff20000 7fd04ff22000 8000071 /usr/lib64/libacl.so.1.1.2301
ffff94a0bda9a658 7fd04ff22000 7fd04ff27000 8000075 /usr/lib64/libacl.so.1.1.2301
ffff94a0bda9a828 7fd04ff27000 7fd04ff28000 8000071 /usr/lib64/libacl.so.1.1.2301
ffff94a0bda9ae80 7fd04ff28000 7fd04ff29000 8000070 /usr/lib64/libacl.so.1.1.2301
ffff94a0bda9abc8 7fd04ff29000 7fd04ff2a000 8100071 /usr/lib64/libacl.so.1.1.2301
ffff94a0bda9b960 7fd04ff2b000 7fd04ff2e000 8000071 /usr/lib64/libgcc_s-11-20220127.so.1
ffff94a0bda9acb0 7fd04ff2e000 7fd04ff40000 8000075 /usr/lib64/libgcc_s-11-20220127.so.1
ffff94a0bda9a570 7fd04ff40000 7fd04ff43000 8000071 /usr/lib64/libgcc_s-11-20220127.so.1
ffff94a0bda9a3a0 7fd04ff43000 7fd04ff44000 8000070 /usr/lib64/libgcc_s-11-20220127.so.1
ffff94a0bda9bd00 7fd04ff44000 7fd04ff45000 8100071 /usr/lib64/libgcc_s-11-20220127.so.1
ffff949dd130c0e8 7fd04ff45000 7fd04ff46000 8100073 /usr/lib64/libgcc_s-11-20220127.so.1
ffff94a51fd013f0 7fd04ff61000 7fd04ff64000 8000071 /usr/lib64/libaudit.so.1.0.0
ffff94a51fd00e80 7fd04ff64000 7fd04ff6c000 8000075 /usr/lib64/libaudit.so.1.0.0
ffff94a51fd00d98 7fd04ff6c000 7fd04ff81000 8000071 /usr/lib64/libaudit.so.1.0.0
ffff94a51fd001d0 7fd04ff81000 7fd04ff82000 8100071 /usr/lib64/libaudit.so.1.0.0
ffff949dd130d5c0 7fd04ff82000 7fd04ff83000 8100073 /usr/lib64/libaudit.so.1.0.0
ffff949dc2a52570 7fd04ff8f000 7fd04ff99000 8000071 /usr/lib64/libmount.so.1.1.0
ffff949dc2a53d00 7fd04ff99000 7fd04ffc5000 8000075 /usr/lib64/libmount.so.1.1.0
ffff949dc2a52bc8 7fd04ffc5000 7fd04ffd1000 8000071 /usr/lib64/libmount.so.1.1.0
ffff949dc2a53a48 7fd04ffd1000 7fd04ffd3000 8100071 /usr/lib64/libmount.so.1.1.0
ffff949dd130d878 7fd04ffd3000 7fd04ffd4000 8100073 /usr/lib64/libmount.so.1.1.0
ffff949dc2a52000 7fd050000000 7fd050063000 8000071 /usr/lib/systemd/libsystemd-shared-250.so
ffff949dc2a520e8 7fd050063000 7fd050253000 8000075 /usr/lib/systemd/libsystemd-shared-250.so
ffff949dc2a52e80 7fd050253000 7fd05031b000 8000071 /usr/lib/systemd/libsystemd-shared-250.so
ffff949dc2a53220 7fd05031b000 7fd050338000 8100071 /usr/lib/systemd/libsystemd-shared-250.so
ffff949dd130c910 7fd050338000 7fd050339000 8100073 /usr/lib/systemd/libsystemd-shared-250.so
ffff949dc2a52f68 7fd050343000 7fd050346000 8000071 /usr/lib64/libpam.so.0.85.1
ffff94a51fd00cb0 7fd050346000 7fd05034f000 8000075 /usr/lib64/libpam.so.0.85.1
ffff949dc2a53308 7fd05034f000 7fd050353000 8000071 /usr/lib64/libpam.so.0.85.1
ffff94a51fd015c0 7fd050353000 7fd050354000 8100071 /usr/lib64/libpam.so.0.85.1
ffff949dd130d4d8 7fd050354000 7fd050355000 8100073 /usr/lib64/libpam.so.0.85.1
  • Character / as an argument.
crash> fuser / | tail
 5949  ffff949dc094b900  "gdb worker"     root 
 5950  ffff949dc094d580  "gdb worker"     root 
 5951  ffff949dc0fb5580  "gdb worker"     root 
 5952  ffff949dc66d9c80  "gdb worker"     root 
 5953  ffff949dc6a68000  "gdb worker"     root 
 5954  ffff949dc2e6b900  "gdb worker"     root 
 5955  ffff949dc2e68000  "gdb worker"     root 
 5970  ffff949dca930000  "kworker/u24:0"  root cwd 
 6000  ffff949dc2a95580  "kworker/u24:1"  root cwd 
 6006  ffff94a51fd25580  "tail"           root 

crash> files 5970
PID: 5970     TASK: ffff949dca930000  CPU: 5    COMMAND: "kworker/u24:0"
ROOT: /    CWD: /
No open files
  • String CHR as an argument.
crash> fuser CHR | tail
 5947  ffff949dd4755580  "gdb worker"     fd 
 5948  ffff949dc0c43900  "gdb worker"     fd 
 5949  ffff949dc094b900  "gdb worker"     fd 
 5950  ffff949dc094d580  "gdb worker"     fd 
 5951  ffff949dc0fb5580  "gdb worker"     fd 
 5952  ffff949dc66d9c80  "gdb worker"     fd 
 5953  ffff949dc6a68000  "gdb worker"     fd 
 5954  ffff949dc2e6b900  "gdb worker"     fd 
 5955  ffff949dc2e68000  "gdb worker"     fd 
 5992  ffff949dc2a98000  "tail"           fd 

crash> files 5955 -R CHR
PID: 5955     TASK: ffff949dc2e68000  CPU: 1    COMMAND: "gdb worker"
ROOT: /    CWD: /root 
 FD       FILE            DENTRY           INODE       TYPE PATH
  0 ffff949dcc05ef00 ffff949dd26933c0 ffff949dc3159710 CHR  /dev/pts/0
  1 ffff949dcc05ef00 ffff949dd26933c0 ffff949dc3159710 CHR  /dev/pts/0
  2 ffff949dcc05ef00 ffff949dd26933c0 ffff949dc3159710 CHR  /dev/pts/0
  3 ffff949dc4a0ae00 ffff949dc06a0540 ffff949dc1294ce8 CHR  /dev/null
  • String CWD: as an argument.
crash> fuser CWD: | tail
 5948  ffff949dc0c43900  "gdb worker"     root 
 5949  ffff949dc094b900  "gdb worker"     root 
 5950  ffff949dc094d580  "gdb worker"     root 
 5951  ffff949dc0fb5580  "gdb worker"     root 
 5952  ffff949dc66d9c80  "gdb worker"     root 
 5953  ffff949dc6a68000  "gdb worker"     root 
 5954  ffff949dc2e6b900  "gdb worker"     root 
 5955  ffff949dc2e68000  "gdb worker"     root 
 5970  ffff949dca930000  "kworker/u24:0"  root 
 5983  ffff949dc2a98000  "tail"           root 

crash> files 5948 -R root
PID: 5948     TASK: ffff949dc0c43900  CPU: 8    COMMAND: "gdb worker"
ROOT: /    CWD: /root 
  • String ROOT: as an argument.
crash> fuser ROOT: | tail
 5948  ffff949dc0c43900  "gdb worker"     root 
 5949  ffff949dc094b900  "gdb worker"     root 
 5950  ffff949dc094d580  "gdb worker"     root 
 5951  ffff949dc0fb5580  "gdb worker"     root 
 5952  ffff949dc66d9c80  "gdb worker"     root 
 5953  ffff949dc6a68000  "gdb worker"     root 
 5954  ffff949dc2e6b900  "gdb worker"     root 
 5955  ffff949dc2e68000  "gdb worker"     root 
 5970  ffff949dca930000  "kworker/u24:0"  root 
 5989  ffff94a51fd23900  "tail"           root 

crash> files 5948 -R root
PID: 5948     TASK: ffff949dc0c43900  CPU: 8    COMMAND: "gdb worker"
ROOT: /    CWD: /root 
  • String root as an argument.
crash> fuser root
 PID         TASK        COMM             USAGE
 1462  ffff949dca943900  "bash"           cwd 
 5937  ffff949dc396d580  "crash"          cwd 
 5944  ffff949dc0cd9c80  "gdb worker"     cwd 
 5945  ffff949dc0e48000  "gdb worker"     cwd 
 5946  ffff949dca888000  "gdb worker"     cwd 
 5947  ffff949dd4755580  "gdb worker"     cwd 
 5948  ffff949dc0c43900  "gdb worker"     cwd 
 5949  ffff949dc094b900  "gdb worker"     cwd 
 5950  ffff949dc094d580  "gdb worker"     cwd 
 5951  ffff949dc0fb5580  "gdb worker"     cwd 
 5952  ffff949dc66d9c80  "gdb worker"     cwd 
 5953  ffff949dc6a68000  "gdb worker"     cwd 
 5954  ffff949dc2e6b900  "gdb worker"     cwd 
 5955  ffff949dc2e68000  "gdb worker"     cwd 
 5999  ffff949dc2a98000  "less"           cwd 

crash> files 5955 -R root 
PID: 5955     TASK: ffff949dc2e68000  CPU: 1    COMMAND: "gdb worker"
ROOT: /    CWD: /root 

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments