I was able to reproduce this.  Minor note, that you need to specify
vers=4.0 in the mount options, nfs 4.1+ appears to not be affected by

** Changed in: linux (Ubuntu Cosmic)
       Status: Confirmed => Won't Fix

You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs

  NFS v4.0: Stale data after file is renamed while another process has
  an open file handle

Status in linux package in Ubuntu:
Status in linux source package in Xenial:
Status in linux source package in Bionic:
Status in linux source package in Cosmic:
  Won't Fix
Status in linux source package in Disco:

Bug description:
  NOTE: This bug has been fixed in the upstream mainline kernel via
  and merged in the latest NFS client patches in

  The full patchset is here: https://marc.info/?l=linux-

  I'm repeating the report I sent to the NFS maintainers on the mailing

  On Ubuntu 16.04 (4.4.0-130) with NFS v4.0, I'm seeing an issue where
  stale data is shown if a file remains open on one machine, and the
  file is overwritten via a rename() on another. Here's my test:

  1. On node A, create two different files on a shared NFS mount:
  "test1.txt" and "test2.txt".
  2. On node B, continuously show the contents of the first file: "while
  true; do cat test1.txt; done"
  3. On node B, run a process that keeps "test1.txt" open. For example,
  with Python, run:
       f = open('/nfs-mount/test1.txt', 'r')
  4. Rename test2.txt via "mv -f test2.txt test1.txt"

  On node B, I see the contents of the original test1.txt indefinitely,
  even after I disabled attribute caching and the lookup cache. I can
  make the while loop in step 2 show the new content if I perform one of
  these actions:

  1. Run "ls /nfs-mount"
  2. Close the open file in step 3

To manage notifications about this bug go to:

Mailing list: https://launchpad.net/~group.of.nepali.translators
Post to     : group.of.nepali.translators@lists.launchpad.net
Unsubscribe : https://launchpad.net/~group.of.nepali.translators
More help   : https://help.launchpad.net/ListHelp

Reply via email to