Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-35853

nfs: getcwd returns ENOENT in subdirectory of mount after upgrade from RHEL7 to RHEL9

    • kernel-5.14.0-487.el9
    • None
    • Important
    • sst_filesystems
    • ssg_filesystems_storage_and_HA
    • 22
    • 24
    • 5
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None

      What were you trying to do that didn't work?

      Reproducer gets ENONET when calling getcwd() in a subdirectory of a nfs mount

      Please provide the package NVR for which bug is seen:

      kernel-5.14.0-362.24.1.el9_3.x86_64

      How reproducible:

      easy, reproducer provided

      Steps to reproduce

      1) Running a python multiprocessing test case, we get a reproducible failure on 'os.cwd()'

      #!/usr/bin/python3 -u
      
      import os
      import multiprocessing
      import time
      
      if __name__=="__main__":
          multiprocessing.set_start_method("spawn")
      
          count = 0
          while True:
              try:
                  os.getcwd()
                  pool = multiprocessing.Pool(10)
                  pool.close()
                  pool.terminate()
                  count += 1
              except Exception as e:
                  print(f"Failed after \{count} iterations")
                  print(e)
                  break
      

      2: Mount nfs filesystem, create subdirectory, change to subdirectory, execute the script:

      # mount server:/exports /mnt/tmp
      # mkdir -p /mnt/tmp/test_getcwd
      # cd /mnt/tmp/test_getcwd
      # ./test_case3805989
      Failed after 8 iterations
      [Errno 2] No such file or directory
      

      Expected results

      getcwd() continues to return successfully

      Actual results

      After one or more iterations, the script will stop after getting ENOENT on a getcwd() syscall:

      #./test_case3805989 
      Failed after 8 iterations
      [Errno 2] No such file or directory
      

            rhn-support-smayhew Scott Mayhew
            rhn-support-rahsingh Rahul Singh
            NFS Team NFS Team
            Zhi Li Zhi Li
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: