Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10878

TestDFSClientRetries#testIdempotentAllocateBlockAndClose throws ConcurrentModificationException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.3
    • Fix Version/s: 2.7.4, 3.0.0-alpha2
    • Component/s: hdfs-client
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      This failed in our internal build

      java.util.ConcurrentModificationException: null
      	at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
      	at java.util.ArrayList$Itr.next(ArrayList.java:851)
      	at org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguousUnderConstruction.appendUCParts(BlockInfoContiguousUnderConstruction.java:396)
      	at org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguousUnderConstruction.appendStringTo(BlockInfoContiguousUnderConstruction.java:382)
      	at org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguousUnderConstruction.toString(BlockInfoContiguousUnderConstruction.java:375)
      	at java.lang.String.valueOf(String.java:2982)
      	at java.lang.StringBuilder.append(StringBuilder.java:131)
      	at org.apache.hadoop.hdfs.protocol.ExtendedBlock.toString(ExtendedBlock.java:121)
      	at com.google.common.base.Joiner.toString(Joiner.java:533)
      	at com.google.common.base.Joiner.appendTo(Joiner.java:124)
      	at com.google.common.base.Joiner.appendTo(Joiner.java:181)
      	at com.google.common.base.Joiner.join(Joiner.java:237)
      	at com.google.common.base.Joiner.join(Joiner.java:226)
      	at com.google.common.base.Joiner.join(Joiner.java:245)
      	at org.apache.hadoop.hdfs.TestDFSClientRetries$3.answer(TestDFSClientRetries.java:485)
      	at org.apache.hadoop.hdfs.TestDFSClientRetries$3.answer(TestDFSClientRetries.java:477)
      	at org.mockito.internal.stubbing.StubbedInvocationMatcher.answer(StubbedInvocationMatcher.java:31)
      	at org.mockito.internal.MockHandler.handle(MockHandler.java:97)
      	at org.mockito.internal.creation.MethodInterceptorFilter.intercept(MethodInterceptorFilter.java:47)
      	at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer$$EnhancerByMockitoWithCGLIB$$cca97ed1.complete(<generated>)
      	at org.apache.hadoop.hdfs.DFSOutputStream.completeFile(DFSOutputStream.java:2303)
      	at org.apache.hadoop.hdfs.DFSOutputStream.closeImpl(DFSOutputStream.java:2279)
      	at org.apache.hadoop.hdfs.DFSOutputStream.close(DFSOutputStream.java:2243)
      	at org.apache.hadoop.hdfs.TestDFSClientRetries.testIdempotentAllocateBlockAndClose(TestDFSClientRetries.java:507)
      

      Its getting NPE in following Log message

      TestDFSClientRetries.java
       @Test
        public void testIdempotentAllocateBlockAndClose() throws Exception {
                  ...
                  public Boolean answer(InvocationOnMock invocation) throws Throwable {
                // complete() may return false a few times before it returns
                // true. We want to wait until it returns true, and then
                // make it retry one more time after that.
                LOG.info("Called complete(: " +
                    Joiner.on(",").join(invocation.getArguments()) + ")");
                 ...
      }
      
      1. HDFS-10878.patch
        1 kB
        Rushabh S Shah
      2. HDFS-10878-1.patch
        1 kB
        Rushabh S Shah

        Activity

        Hide
        shahrs87 Rushabh S Shah added a comment -

        Here is a simple patch which removes the invocation arguments from the log line.
        There is no need to print any ways since there is only one block.

        Show
        shahrs87 Rushabh S Shah added a comment - Here is a simple patch which removes the invocation arguments from the log line. There is no need to print any ways since there is only one block.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 13s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 8m 5s trunk passed
        +1 compile 0m 49s trunk passed
        +1 checkstyle 0m 28s trunk passed
        +1 mvnsite 0m 56s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 46s trunk passed
        +1 javadoc 0m 56s trunk passed
        +1 mvninstall 0m 47s the patch passed
        +1 compile 0m 42s the patch passed
        +1 javac 0m 42s the patch passed
        -0 checkstyle 0m 25s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 106 unchanged - 0 fixed = 107 total (was 106)
        +1 mvnsite 0m 48s the patch passed
        +1 mvneclipse 0m 9s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 45s the patch passed
        +1 javadoc 0m 52s the patch passed
        -1 unit 57m 48s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 18s The patch does not generate ASF License warnings.
        78m 13s



        Reason Tests
        Failed junit tests hadoop.hdfs.TestDFSShell



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HDFS-10878
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12829430/HDFS-10878.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 3e87bbead7a2 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 9f03b40
        Default Java 1.8.0_101
        findbugs v3.0.0
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16812/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/16812/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16812/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16812/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 13s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 8m 5s trunk passed +1 compile 0m 49s trunk passed +1 checkstyle 0m 28s trunk passed +1 mvnsite 0m 56s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 46s trunk passed +1 javadoc 0m 56s trunk passed +1 mvninstall 0m 47s the patch passed +1 compile 0m 42s the patch passed +1 javac 0m 42s the patch passed -0 checkstyle 0m 25s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 106 unchanged - 0 fixed = 107 total (was 106) +1 mvnsite 0m 48s the patch passed +1 mvneclipse 0m 9s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 45s the patch passed +1 javadoc 0m 52s the patch passed -1 unit 57m 48s hadoop-hdfs in the patch failed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 78m 13s Reason Tests Failed junit tests hadoop.hdfs.TestDFSShell Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10878 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12829430/HDFS-10878.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 3e87bbead7a2 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 9f03b40 Default Java 1.8.0_101 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16812/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/16812/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16812/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16812/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        shahrs87 Rushabh S Shah added a comment -

        Need to address checkstyle warning.

        Show
        shahrs87 Rushabh S Shah added a comment - Need to address checkstyle warning.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 0s Docker mode activated.
        -1 docker 0m 2s Docker failed to build yetus/hadoop:9560f25.



        Subsystem Report/Notes
        JIRA Issue HDFS-10878
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831395/HDFS-10878-1.patch
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16983/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s Docker mode activated. -1 docker 0m 2s Docker failed to build yetus/hadoop:9560f25. Subsystem Report/Notes JIRA Issue HDFS-10878 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831395/HDFS-10878-1.patch Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16983/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 18s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 7m 13s trunk passed
        +1 compile 0m 53s trunk passed
        +1 checkstyle 0m 30s trunk passed
        +1 mvnsite 1m 5s trunk passed
        +1 mvneclipse 0m 12s trunk passed
        +1 findbugs 1m 58s trunk passed
        +1 javadoc 1m 1s trunk passed
        +1 mvninstall 0m 58s the patch passed
        +1 compile 0m 49s the patch passed
        +1 javac 0m 49s the patch passed
        +1 checkstyle 0m 27s the patch passed
        +1 mvnsite 0m 57s the patch passed
        +1 mvneclipse 0m 12s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 2m 0s the patch passed
        +1 javadoc 0m 58s the patch passed
        -1 unit 69m 40s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 23s The patch does not generate ASF License warnings.
        90m 57s



        Reason Tests
        Failed junit tests hadoop.hdfs.server.namenode.TestDecommissioningStatus
          hadoop.hdfs.server.blockmanagement.TestRBWBlockInvalidation



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HDFS-10878
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831395/HDFS-10878-1.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 0898211e8803 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 736d33c
        Default Java 1.8.0_101
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/16985/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16985/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16985/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 18s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 13s trunk passed +1 compile 0m 53s trunk passed +1 checkstyle 0m 30s trunk passed +1 mvnsite 1m 5s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 58s trunk passed +1 javadoc 1m 1s trunk passed +1 mvninstall 0m 58s the patch passed +1 compile 0m 49s the patch passed +1 javac 0m 49s the patch passed +1 checkstyle 0m 27s the patch passed +1 mvnsite 0m 57s the patch passed +1 mvneclipse 0m 12s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 2m 0s the patch passed +1 javadoc 0m 58s the patch passed -1 unit 69m 40s hadoop-hdfs in the patch failed. +1 asflicense 0m 23s The patch does not generate ASF License warnings. 90m 57s Reason Tests Failed junit tests hadoop.hdfs.server.namenode.TestDecommissioningStatus   hadoop.hdfs.server.blockmanagement.TestRBWBlockInvalidation Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10878 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12831395/HDFS-10878-1.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 0898211e8803 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 736d33c Default Java 1.8.0_101 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/16985/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16985/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16985/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        shahrs87 Rushabh S Shah added a comment -
        Failed junit tests:
               hadoop.hdfs.server.namenode.TestDecommissioningStatus
               hadoop.hdfs.server.blockmanagement.TestRBWBlockInvalidation 
        

        Both of this tests passes fine on my local machine.

        Show
        shahrs87 Rushabh S Shah added a comment - Failed junit tests: hadoop.hdfs.server.namenode.TestDecommissioningStatus hadoop.hdfs.server.blockmanagement.TestRBWBlockInvalidation Both of this tests passes fine on my local machine.
        Hide
        kihwal Kihwal Lee added a comment -

        +1 looks good to me.

        Show
        kihwal Kihwal Lee added a comment - +1 looks good to me.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10539 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10539/)
        HDFS-10878. TestDFSClientRetries#testIdempotentAllocateBlockAndClose (kihwal: rev 382307cbdd94107350fe6fad1acf87d63c9be9d6)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientRetries.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10539 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10539/ ) HDFS-10878 . TestDFSClientRetries#testIdempotentAllocateBlockAndClose (kihwal: rev 382307cbdd94107350fe6fad1acf87d63c9be9d6) (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientRetries.java
        Hide
        kihwal Kihwal Lee added a comment -

        Committed to from trunk all the way to branch-2.7. Thanks for fixing this, Rushabh S Shah.

        Show
        kihwal Kihwal Lee added a comment - Committed to from trunk all the way to branch-2.7. Thanks for fixing this, Rushabh S Shah .
        Hide
        shahrs87 Rushabh S Shah added a comment -

        Thanks Kihwal Lee for reviews and committing.

        Show
        shahrs87 Rushabh S Shah added a comment - Thanks Kihwal Lee for reviews and committing.

          People

          • Assignee:
            shahrs87 Rushabh S Shah
            Reporter:
            shahrs87 Rushabh S Shah
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development