Looks like this patch solves the problem as we have a symlink in the test path. This needs to be applied to Ubuntu's hwe-5.4 and hwe-5.13 kernels. Probably anywhere else the above commits got backported to.
[PATCH] NFS: LOOKUP_DIRECTORY is also ok with symlinks https://lore.kernel.org/all/f7a7d0e1-41ab-f648-97a3-9fd92e0e2...@leemhuis.info/T/#m5d587247611e36afcfcd157125e910d4f7075cb7 -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-signed-hwe-5.4 in Ubuntu. https://bugs.launchpad.net/bugs/1971482 Title: Regression: nfs cannot access/list wildcard file unless its cached Status in linux-signed-hwe-5.13 package in Ubuntu: New Status in linux-signed-hwe-5.4 package in Ubuntu: New Bug description: Some of our build machines have recently started failing builds. It was noted that all the machines that fail the build are running the most recent kernel 5.4.0-109-generic #123~18.04.1-Ubuntu. The following command was created to minimally reproduce the issue: $ while true; do sudo /usr/local/scripts/drop_cache.sh; ls -la /shared/projects/MityCAM-jenkins/intermediates/MityCAM-Yocto/latest/libdaq*.ipk | tee -a /tmp/ls.log 2>&1; sleep 1;done ls: cannot access '/shared/projects/MityCAM-jenkins/intermediates/MityCAM-Yocto/latest/libdaq*.ipk': No such file or directory ls: cannot access '/shared/projects/MityCAM-jenkins/intermediates/MityCAM-Yocto/latest/libdaq*.ipk': No such file or directory ls: cannot access '/shared/projects/MityCAM-jenkins/intermediates/MityCAM-Yocto/latest/libdaq*.ipk': No such file or directory ls: cannot access '/shared/projects/MityCAM-jenkins/intermediates/MityCAM-Yocto/latest/libdaq*.ipk': No such file or directory Note directly trying to list the file works every time, it seems the bug must be related to the use of the wildcard. $ while true; do sudo /usr/local/scripts/drop_cache.sh; ls -la /shared/projects/MityCAM-jenkins/intermediates/MityCAM-Yocto/latest/libdaq_1.0.9323-r3_cortexa9hf-neon.ipk | tee -a /tmp/ls.log 2>&1; sleep 1;done -rw-r--r-- 1 jenkins engineer 202526 May 2 13:47 /shared/projects/MityCAM-jenkins/intermediates/MityCAM-Yocto/latest/libdaq_1.0.9323-r3_cortexa9hf-neon.ipk -rw-r--r-- 1 jenkins engineer 202526 May 2 13:47 /shared/projects/MityCAM-jenkins/intermediates/MityCAM-Yocto/latest/libdaq_1.0.9323-r3_cortexa9hf-neon.ipk -rw-r--r-- 1 jenkins engineer 202526 May 2 13:47 /shared/projects/MityCAM-jenkins/intermediates/MityCAM-Yocto/latest/libdaq_1.0.9323-r3_cortexa9hf-neon.ipk The drop_cache was needed to force the error everytime, otherwise it would fail only a few times then succeed a bunch in a row before randomly failing again. $ cat /usr/local/scripts/drop_cache.sh #!/bin/bash # Test script to drop filesystem cache sync # Clear pagecache, dentries, and inodes echo 3 > /proc/sys/vm/drop_caches Downgrading the kernel to 5.4.0-107-generic on one of the machines caused the problem to go away. ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: linux-image-5.4.0-109-generic 5.4.0-109.123~18.04.1 ProcVersionSignature: Ubuntu 5.4.0-107.121~18.04.1-generic 5.4.174 Uname: Linux 5.4.0-107-generic x86_64 ApportVersion: 2.20.9-0ubuntu7.27 Architecture: amd64 Date: Tue May 3 15:04:34 2022 ProcEnviron: LANG=en_US.UTF-8 SHELL=/bin/bash TERM=xterm-256color XDG_RUNTIME_DIR=<set> PATH=(custom, no user) SourcePackage: linux-signed-hwe-5.4 UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-signed-hwe-5.13/+bug/1971482/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp