Hadoop Common
  1. Hadoop Common
  2. HADOOP-1935

NullPointerException in internalReleaseCreate

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.15.0
    • Fix Version/s: 0.15.0
    • Component/s: None
    • Labels:
      None

      Description

      The exception occurs during abandonFileInProgress().

      07/09/21 13:59:28 ERROR fs.FSNamesystem: java.lang.NullPointerException
              at org.apache.hadoop.dfs.FSNamesystem.internalReleaseCreate(FSNamesystem.java:1494)
              at org.apache.hadoop.dfs.FSNamesystem.access$100(FSNamesystem.java:50)
              at org.apache.hadoop.dfs.FSNamesystem$Lease.releaseLocks(FSNamesystem.java:1385)
              at org.apache.hadoop.dfs.FSNamesystem$LeaseMonitor.run(FSNamesystem.java:1447)
              at java.lang.Thread.run(Thread.java:595)
      

      My guess is that the client sends abandonFileInProgress() after create(), which timed out and was not executed by the name-node.
      That is why dir.getFileINode(src) returns null in internalReleaseCreate().

      1. npePendingCreate3.patch
        1.0 kB
        dhruba borthakur

        Activity

        Hide
        Konstantin Shvachko added a comment - - edited

        I'd add that file does not exist. Also formatting should be corrected, long line.

              NameNode.stateChangeLog.warn("DIR* NameSystem.internalReleaseCreate: "
                                           + "attempt to release a create lock on "
                                           + src.toString() + " file does not exist.");
        

        You did not get rid of the NPE. Probably need to return.

        Show
        Konstantin Shvachko added a comment - - edited I'd add that file does not exist. Also formatting should be corrected, long line. NameNode.stateChangeLog.warn( "DIR* NameSystem.internalReleaseCreate: " + "attempt to release a create lock on " + src.toString() + " file does not exist." ); You did not get rid of the NPE. Probably need to return.
        Hide
        dhruba borthakur added a comment -

        Incorporates Konstantin's comments.

        Show
        dhruba borthakur added a comment - Incorporates Konstantin's comments.
        Hide
        dhruba borthakur added a comment -

        I am submitting this patch so that HadoopQA gets to run all tests. Have incorporated all review comments. Konstantin: if you care to review it once more, please do so.

        Show
        dhruba borthakur added a comment - I am submitting this patch so that HadoopQA gets to run all tests. Have incorporated all review comments. Konstantin: if you care to review it once more, please do so.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12366794/npePendingCreate2.patch
        against trunk revision r580487.

        @author +1. The patch does not contain any @author tags.

        javadoc +1. The javadoc tool did not generate any warning messages.

        javac +1. The applied patch does not generate any new compiler warnings.

        findbugs -1. The patch appears to introduce 1 new Findbugs warnings.

        core tests +1. The patch passed core unit tests.

        contrib tests +1. The patch passed contrib unit tests.

        Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/848/testReport/
        Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/848/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/848/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/848/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12366794/npePendingCreate2.patch against trunk revision r580487. @author +1. The patch does not contain any @author tags. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new compiler warnings. findbugs -1. The patch appears to introduce 1 new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/848/testReport/ Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/848/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/848/artifact/trunk/build/test/checkstyle-errors.html Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/848/console This message is automatically generated.
        Hide
        dhruba borthakur added a comment -

        Fixed findbugs warning found in earlier patch.

        Show
        dhruba borthakur added a comment - Fixed findbugs warning found in earlier patch.
        Hide
        dhruba borthakur added a comment -

        Fix findbugs warning introduced by earlier patch.

        Show
        dhruba borthakur added a comment - Fix findbugs warning introduced by earlier patch.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12366796/npePendingCreate3.patch
        against trunk revision r580487.

        @author +1. The patch does not contain any @author tags.

        javadoc +1. The javadoc tool did not generate any warning messages.

        javac +1. The applied patch does not generate any new compiler warnings.

        findbugs +1. The patch does not introduce any new Findbugs warnings.

        core tests +1. The patch passed core unit tests.

        contrib tests +1. The patch passed contrib unit tests.

        Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/849/testReport/
        Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/849/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/849/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/849/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12366796/npePendingCreate3.patch against trunk revision r580487. @author +1. The patch does not contain any @author tags. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new compiler warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/849/testReport/ Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/849/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/849/artifact/trunk/build/test/checkstyle-errors.html Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/849/console This message is automatically generated.
        Hide
        Konstantin Shvachko added a comment -

        +1

        Show
        Konstantin Shvachko added a comment - +1
        Hide
        dhruba borthakur added a comment -

        I just submitted this.

        Show
        dhruba borthakur added a comment - I just submitted this.
        Hide
        Hudson added a comment -
        Show
        Hudson added a comment - Integrated in Hadoop-Nightly #256 (See http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/256/ )

          People

          • Assignee:
            dhruba borthakur
            Reporter:
            Konstantin Shvachko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development