You are not logged in.

#1 2026-03-11 22:50:11

xerxes_
Member
Registered: 2018-04-29
Posts: 1,027

nfsrahead crashes when plug in something to usb

Why nfsrahead crashes when I didn't even have any attempt to use it? This happens since last update nfs-utils (2.8.5-2 -> 2.8.6-1) when I connect any mass storage to usb or even any usb device I have plenty of this in journalctl log:

mar 11 23:11:32 home kernel: usb 2-7: new high-speed USB device number 3 using ehci-pci
mar 11 23:11:32 home kernel: usb 2-7: New USB device found, idVendor=13fe, idProduct=5200, bcdDevice= 1.10
mar 11 23:11:32 home kernel: usb 2-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
mar 11 23:11:32 home kernel: usb 2-7: Product: Patriot Memory
mar 11 23:11:32 home kernel: usb 2-7: Manufacturer:         
mar 11 23:11:32 home kernel: usb 2-7: SerialNumber: 07013799A3B2DE08
mar 11 23:11:32 home mtp-probe[3687]: checking bus 2, device 3: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-7"
mar 11 23:11:32 home mtp-probe[3687]: bus: 2, device: 3 was not an MTP device
mar 11 23:11:32 home kernel: usb-storage 2-7:1.0: USB Mass Storage device detected
mar 11 23:11:32 home kernel: scsi host4: usb-storage 2-7:1.0
mar 11 23:11:32 home kernel: usbcore: registered new interface driver usb-storage
mar 11 23:11:32 home kernel: usbcore: registered new interface driver uas
mar 11 23:11:33 home mtp-probe[3695]: checking bus 2, device 3: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-7"
mar 11 23:11:33 home mtp-probe[3695]: bus: 2, device: 3 was not an MTP device
mar 11 23:11:33 home kernel: scsi 4:0:0:0: Direct-Access              Patriot Memory   PMAP PQ: 0 ANSI: 6
mar 11 23:11:33 home kernel: sd 4:0:0:0: Attached scsi generic sg2 type 0
mar 11 23:11:35 home kernel: sd 4:0:0:0: [sdb] 30283008 512-byte logical blocks: (15.5 GB/14.4 GiB)
mar 11 23:11:35 home kernel: sd 4:0:0:0: [sdb] Write Protect is off
mar 11 23:11:35 home kernel: sd 4:0:0:0: [sdb] Mode Sense: 45 00 00 00
mar 11 23:11:35 home kernel: sd 4:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
mar 11 23:11:35 home systemd-coredump[3701]: Process 3700 (nfsrahead) of user 0 terminated abnormally with signal 6/ABRT, processing...
mar 11 23:11:35 home kernel:  sdb: sdb1
mar 11 23:11:35 home kernel: sd 4:0:0:0: [sdb] Attached SCSI removable disk
mar 11 23:11:35 home systemd[1]: Started Process Core Dump (PID 3701/UID 0).
mar 11 23:11:35 home systemd-coredump[3702]: [?] Process 3700 (nfsrahead) of user 0 dumped core.
                                             
                                             Stack trace of thread 3700:
                                             #0  0x00007f6dbb4c8a2c n/a (libc.so.6 + 0x98a2c)
                                             #1  0x00007f6dbb46e1a0 raise (libc.so.6 + 0x3e1a0)
                                             #2  0x00007f6dbb4555fe abort (libc.so.6 + 0x255fe)
                                             #3  0x00007f6dbb456697 n/a (libc.so.6 + 0x26697)
                                             #4  0x00007f6dbb4d2cbc n/a (libc.so.6 + 0xa2cbc)
                                             #5  0x00007f6dbb4d2cd4 n/a (libc.so.6 + 0xa2cd4)
                                             #6  0x00005593db0e435a n/a (/usr/bin/nfsrahead + 0x235a)
                                             #7  0x00007f6dbb4576c1 n/a (libc.so.6 + 0x276c1)
                                             #8  0x00007f6dbb4577f9 __libc_start_main (libc.so.6 + 0x277f9)
                                             #9  0x00005593db0e45e5 n/a (/usr/bin/nfsrahead + 0x25e5)
                                             ELF object binary architecture: AMD x86-64
mar 11 23:11:35 home (udev-worker)[3693]: 8:16: Process '/usr/bin/nfsrahead 8:16' terminated by signal ABRT.
mar 11 23:11:35 home (udev-worker)[3693]: 8:16: Failed to wait for spawned command '/usr/bin/nfsrahead 8:16': Input/output error
mar 11 23:11:35 home (udev-worker)[3693]: 8:16: /usr/lib/udev/rules.d/99-nfs.rules:1 PROGRAM="/usr/bin/nfsrahead %k": Failed to execute "/usr/bin/nfsrahead 8:16": Input/output error
mar 11 23:11:35 home systemd[1]: systemd-coredump@3-4111-3701_3702-0.service: Deactivated successfully.
mar 11 23:12:00 home kernel: ntfs3: Enabled Linux POSIX ACLs support

Also coredumps:

$ coredumpctl info /usr/bin/nfsrahead
PID: 3700 (nfsrahead)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 6 (ABRT)
     Timestamp: Wed 2026-03-11 23:11:35 CET (21min ago)
  Command Line: /usr/bin/nfsrahead 8:16
    Executable: /usr/bin/nfsrahead
 Control Group: /system.slice/systemd-udevd.service/udev
          Unit: systemd-udevd.service
         Slice: system.slice
       Boot ID: 4d4f542a508144088f2431954557521e
    Machine ID: 4e6eb13c33544bc2bce3efeaf0d12478
      Hostname: home
       Storage: /var/lib/systemd/coredump/core.nfsrahead.0.4d4f542a508144088f2431954557521e.3700.1773267095000000.zst (inaccessible)
       Message: Process 3700 (nfsrahead) of user 0 dumped core.
                
                Stack trace of thread 3700:
                #0  0x00007f6dbb4c8a2c n/a (libc.so.6 + 0x98a2c)
                #1  0x00007f6dbb46e1a0 raise (libc.so.6 + 0x3e1a0)
                #2  0x00007f6dbb4555fe abort (libc.so.6 + 0x255fe)
                #3  0x00007f6dbb456697 n/a (libc.so.6 + 0x26697)
                #4  0x00007f6dbb4d2cbc n/a (libc.so.6 + 0xa2cbc)
                #5  0x00007f6dbb4d2cd4 n/a (libc.so.6 + 0xa2cd4)
                #6  0x00005593db0e435a n/a (/usr/bin/nfsrahead + 0x235a)
                #7  0x00007f6dbb4576c1 n/a (libc.so.6 + 0x276c1)
                #8  0x00007f6dbb4577f9 __libc_start_main (libc.so.6 + 0x277f9)
                #9  0x00005593db0e45e5 n/a (/usr/bin/nfsrahead + 0x25e5)
                ELF object binary architecture: AMD x86-64

UPDATE

I commented line in this /usr/lib/udev/rules.d/99-nfs.rules useless (for me) file and crashes stopped.

Last edited by xerxes_ (Yesterday 17:20:53)

Offline

#2 Yesterday 08:46:55

skaloo
Member
Registered: 2026-03-12
Posts: 3

Re: nfsrahead crashes when plug in something to usb

I encountered the same situation with cifs (auto)mounts activating this "nfs" rule.
Instead of removing the rule entirely, I "tried" to make it more relevent by filtering on the filesystem type, see https://bbs.archlinux.org/viewtopic.php?id=312593
my post was half a question though (is that a valid change to do, and why isn't it already that way in the package file) but noone answered so far.

Offline

#3 Yesterday 17:17:17

xerxes_
Member
Registered: 2018-04-29
Posts: 1,027

Re: nfsrahead crashes when plug in something to usb

So, how did you add this

ENV{ID_FS_TYPE}=="nfs"

to rule in file 99-nfs.rules? To beginning or to the end, like this, or in the middle:

SUBSYSTEM=="bdi", ACTION=="add", PROGRAM="/usr/bin/nfsrahead %k", ATTR{read_ahead_kb}="%c", ENV{ID_FS_TYPE}=="nfs"

How does it work for you now? Do you have any NFS shares? If you have and this rule will be triggered, then I think nfsrahead can still crash. Maybe something needs to be recompiled against something?

I disabled entirely this nfs rule because I don't use any NFS shares and this solution satisfy me for now. nfsrahead belongs to package nfs-utils and was probably installed on my system because of some dependency and I don't want deal with it now.

If you have time you can mess with it/do some experiments with udev and this rule/other rules.
You can verify correctness of your modified rule by commands:

udevadm verify 99-nfs.rules
udevadm test 99-nfs.rules
udevadm test-builtin 99-nfs.rules ...

Details - "man udevadm".

Last edited by xerxes_ (Yesterday 17:55:28)

Offline

#4 Yesterday 21:56:48

skaloo
Member
Registered: 2026-03-12
Posts: 3

Re: nfsrahead crashes when plug in something to usb

Yes just like that with a coma, acts as a filter basicaly.
On this machine I have both cifs and nfs auto-mounts, and I had the crash every time the cifs mounts were triggered.
(log spam + plus the associated core dump, so lots of wasted time for something that was not needed in the first place).
It worked fine for the time being; but there's already been 1 or 2 more patches for nfsutils and seems they fixed the crash.
I still find it odd to start this for every block device instead of for nfs only...

Offline

Board footer

Powered by FluxBB