Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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.
Comment 7Benjamin Coddington
2017-01-26 18:04:40 UTC
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
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
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