Hide Forgot
Description of problem: After a symlink is removed and then re-created on the nfs server or on another client, the RHEL 7.3 nfs client's readlink call receives an NFSERR_STALE/NFS4ERR_STALE response, and returns EIO to userspace until acregmin has passed. With the 7.2 or upstream kernels, the symlink is read as expected. Version-Release number of selected component (if applicable): nfs client running on kernel: 3.10.0-327.10.1.el7.x86_64 - PASS 3.10.0-514.el7.x86_64 - FAIL 4.9.0-rc8+ - PASS How reproducible: easy, see below Steps to Reproduce: on nfs server: mkdir -p /export/symlink_test cd /export/symlink_test touch test_file for i in $(seq 1 3) ; do ln -s test_file test_symlink-$i ; done export /export/symlink_test on nfs client: mkdir /mnt/symlink_test mount server:/export/symlink_test /mnt/symlink_test cd /mnt/symlink_test ls -li on nfs server: for i in $(seq 1 3) ; do rm -f test_symlink-$i ; ln -s test_file test_symlink-$i ; done on nfs client (within a second or two): ls -li Actual results: # ls -li ls: cannot read symbolic link test_symlink-1: Input/output error ls: cannot read symbolic link test_symlink-2: Input/output error ls: cannot read symbolic link test_symlink-3: Input/output error 101373355 lrwxrwxrwx. 1 root root 9 Jan 25 11:45 test_symlink-1 101373362 lrwxrwxrwx. 1 root root 9 Jan 25 11:45 test_symlink-2 101373366 lrwxrwxrwx. 1 root root 9 Jan 25 11:45 test_symlink-3 Expected results: 101373324 -rw-r--r--. 4 root root 0 Jan 25 11:44 test_file 101373355 lrwxrwxrwx. 1 root root 9 Jan 25 11:44 test_symlink-1 -> test_file 101373362 lrwxrwxrwx. 1 root root 9 Jan 25 11:44 test_symlink-2 -> test_file 101373366 lrwxrwxrwx. 1 root root 9 Jan 25 11:44 test_symlink-3 -> test_file Additional info: The directory listing returns to correct/expected behavior after a time that appears to be acregmin. more complete test script will be attached
Created attachment 1244328 [details] test script the test script replaces symlinks, files, and directories, to see which result in EIO or other errors. Only symlinks to files and symlinks to directories seem to be affected.
Created attachment 1244355 [details] packet capture from 3.10.0-514 kernel
Created attachment 1244359 [details] packet capture from 3.10.0-327 kernel
RedHat's backport of upstream commit fa9233699cc1 NFS: Don't require a filehandle to refresh the inode in nfs_prime_dcache() needs fixing up. It changes nfs_same_file() to return true if (entry->fattr->fileid == nfsi->fileid) without comparing filehandles, in which case the existing dentry is updated instead of dropped in a READDIR. The fix should be to take upstream 7dc72d5f7a0e NFS: Fix inode corruption in nfs_prime_dcache() and I'd like to additionally take upstream d8fdb47fae5f NFS: Don't let readdirplus revalidate an inode that was marked as stale
Patch(es) committed on kernel repository and an interim kernel build is undergoing testing
Patch(es) available on kernel-3.10.0-562.el7
I found the reproducing steps somewhat unreliable, for what it's worth, this is how I did: mount nfs filesystem on 2 nodes, inside commonly mounted dir on node1 (which demonstrates the issue, later): // setup # touch test_file # for i in $(seq 3); do ln -s test_file test_link_$i; done // check # ls -li on node 2 # for i in $(seq 3); do rm -f test_link_$i; ln -s test_file test_link_$i; done back on node1 # ln -s test_file test_here; rm -f test_here; ls -li ls: cannot read symbolic link test_link_1: Input/output error ls: cannot read symbolic link test_link_2: Input/output error ls: cannot read symbolic link test_link_3: Input/output error total 0 83861514 -rw-r--r--. 1 root root 0 Feb 15 14:08 test_file 83861515 lrwxrwxrwx. 1 root root 9 Feb 15 14:08 test_link_1 83861516 lrwxrwxrwx. 1 root root 9 Feb 15 14:08 test_link_2 83861517 lrwxrwxrwx. 1 root root 9 Feb 15 14:08 test_link_3
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:1842