Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6191254

File.exists() returns false if timeout error accessing soft-mounted nfs file

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      A DESCRIPTION OF THE REQUEST :
      This bug is probably related to 5003595, which deals with stale NFS file handles.

      In this case, I have a problem where I have an nfs mounted file system mounted with the 'soft' option, which allows for file accesses to abort prematurely with a timeout error. This is intermittent, depending on the load of the network and the remote server, etc.

      In this case, File.exists() returns false, even if the remote file actually exists. It would be nice if instead File.exists() could throw an IOException.
      This would have to be added to the api definition for this funciton.

      I have been able to verify this behavior, by correlating occurrences of the
      false negative result from File.exists() with timeout errors reported to
      the /var/log/messages console log file for the system.



      JUSTIFICATION :
        To make the api easier to use. It is simply intuitive that if the method returns successfully, without an exception, then it does indeed have the correct result.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      If for any reason the call encounters an NFS timeout error, it should through an IOException.
      ACTUAL -
      The method returns false, whenever there is an underlying NFS timeout error.

      CUSTOMER SUBMITTED WORKAROUND :
      The workaround is to routinely retry all calls of File.exists() multiple times, to make sure that a false result is really false. This work around only works in cases where the condition is likely to be spurious, and that
      a retry is likely therefore to succeed. This is clearly not a completely
      reliable work around.
      ###@###.### 2004-11-05 06:15:24 GMT

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alanb Alan Bateman
                Reporter:
                rmandalasunw Ranjith Mandala (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: