Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-7489

ConcurrentModificationException in RMAppImpl#getRMAppMetrics

Details

    Description

      The REST clients have sometimes failed to query applications through apps REST API in RMWebService and it happened when iterating attempts(RMWebServices#getApps --> AppInfo#<init> --> RMAppImpl#getRMAppMetrics) and meanwhile these attempts changed(AttemptFailedTransition#transition --> RMAppImpl#createAndStartNewAttempt --> RMAppImpl#createNewAttempt).
      Application state changed within the lockup period of writeLock in RMAppImpl, so that we can add readLock before iterating attempts to fix this problem.
      Exception stack:

      java.util.ConcurrentModificationException
              at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719)
              at java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:747)
              at org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl.getRMAppMetrics(RMAppImpl.java:1487)
              at org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo.<init>(AppInfo.java:199)
              at org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebServices.getApps(RMWebServices.java:597)
              at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
              at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
              at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
              at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
              at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
              at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
              at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
              at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
              at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
              at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
              at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
              at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
              at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:886)
              at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:834)
              at org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebAppFilter.doFilter(RMWebAppFilter.java:178)
              at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:795)
              at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
              at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
      

      Attachments

        1. YARN-7489.001.patch
          4 kB
          Tao Yang
        2. YARN-7489-branch-2.001.patch
          3 kB
          Tao Yang

        Activity

          bibinchundatt Bibin Chundatt added a comment -

          Thank you Tao Yang for providing patch. Making it patch available to trigger jenkins

          bibinchundatt Bibin Chundatt added a comment - Thank you Tao Yang for providing patch. Making it patch available to trigger jenkins
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 20s Docker mode activated.
                Prechecks
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
                trunk Compile Tests
          +1 mvninstall 14m 42s trunk passed
          +1 compile 0m 35s trunk passed
          +1 checkstyle 0m 23s trunk passed
          +1 mvnsite 0m 41s trunk passed
          +1 shadedclient 9m 33s branch has no errors when building and testing our client artifacts.
          +1 findbugs 0m 56s trunk passed
          +1 javadoc 0m 20s trunk passed
                Patch Compile Tests
          +1 mvninstall 0m 34s the patch passed
          +1 compile 0m 32s the patch passed
          +1 javac 0m 32s the patch passed
          +1 checkstyle 0m 21s the patch passed
          +1 mvnsite 0m 34s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 shadedclient 9m 22s patch has no errors when building and testing our client artifacts.
          +1 findbugs 1m 4s the patch passed
          +1 javadoc 0m 20s the patch passed
                Other Tests
          -1 unit 59m 33s hadoop-yarn-server-resourcemanager in the patch failed.
          +1 asflicense 0m 18s The patch does not generate ASF License warnings.
          99m 49s



          Reason Tests
          Failed junit tests hadoop.yarn.server.resourcemanager.TestRMEmbeddedElector
            hadoop.yarn.server.resourcemanager.scheduler.capacity.TestNodeLabelContainerAllocation
          Timed out junit tests org.apache.hadoop.yarn.server.resourcemanager.TestRMStoreCommands
            org.apache.hadoop.yarn.server.resourcemanager.TestReservationSystemWithRMHA
            org.apache.hadoop.yarn.server.resourcemanager.TestSubmitApplicationWithRMHA
            org.apache.hadoop.yarn.server.resourcemanager.TestKillApplicationWithRMHA



          Subsystem Report/Notes
          Docker Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:5b98639
          JIRA Issue YARN-7489
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12897664/YARN-7489.001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
          uname Linux ce8aedd80b04 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/patchprocess/precommit/personality/provided.sh
          git revision trunk / 2f379d4
          maven version: Apache Maven 3.3.9
          Default Java 1.8.0_151
          findbugs v3.1.0-RC1
          unit https://builds.apache.org/job/PreCommit-YARN-Build/18498/artifact/out/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/18498/testReport/
          Max. process+thread count 853 (vs. ulimit of 5000)
          modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/18498/console
          Powered by Apache Yetus 0.7.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 20s Docker mode activated.       Prechecks +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.       trunk Compile Tests +1 mvninstall 14m 42s trunk passed +1 compile 0m 35s trunk passed +1 checkstyle 0m 23s trunk passed +1 mvnsite 0m 41s trunk passed +1 shadedclient 9m 33s branch has no errors when building and testing our client artifacts. +1 findbugs 0m 56s trunk passed +1 javadoc 0m 20s trunk passed       Patch Compile Tests +1 mvninstall 0m 34s the patch passed +1 compile 0m 32s the patch passed +1 javac 0m 32s the patch passed +1 checkstyle 0m 21s the patch passed +1 mvnsite 0m 34s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 shadedclient 9m 22s patch has no errors when building and testing our client artifacts. +1 findbugs 1m 4s the patch passed +1 javadoc 0m 20s the patch passed       Other Tests -1 unit 59m 33s hadoop-yarn-server-resourcemanager in the patch failed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 99m 49s Reason Tests Failed junit tests hadoop.yarn.server.resourcemanager.TestRMEmbeddedElector   hadoop.yarn.server.resourcemanager.scheduler.capacity.TestNodeLabelContainerAllocation Timed out junit tests org.apache.hadoop.yarn.server.resourcemanager.TestRMStoreCommands   org.apache.hadoop.yarn.server.resourcemanager.TestReservationSystemWithRMHA   org.apache.hadoop.yarn.server.resourcemanager.TestSubmitApplicationWithRMHA   org.apache.hadoop.yarn.server.resourcemanager.TestKillApplicationWithRMHA Subsystem Report/Notes Docker Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:5b98639 JIRA Issue YARN-7489 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12897664/YARN-7489.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle uname Linux ce8aedd80b04 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/patchprocess/precommit/personality/provided.sh git revision trunk / 2f379d4 maven version: Apache Maven 3.3.9 Default Java 1.8.0_151 findbugs v3.1.0-RC1 unit https://builds.apache.org/job/PreCommit-YARN-Build/18498/artifact/out/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/18498/testReport/ Max. process+thread count 853 (vs. ulimit of 5000) modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager Console output https://builds.apache.org/job/PreCommit-YARN-Build/18498/console Powered by Apache Yetus 0.7.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          bibinchundatt Bibin Chundatt added a comment -

          +1 LGTM. rohithsharma any comments??

          bibinchundatt Bibin Chundatt added a comment - +1 LGTM. rohithsharma any comments??
          bibinchundatt Bibin Chundatt added a comment -

          Will commit patch today .

          bibinchundatt Bibin Chundatt added a comment - Will commit patch today .
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #13257 (See https://builds.apache.org/job/Hadoop-trunk-Commit/13257/)
          YARN-7489. ConcurrentModificationException in RMAppImpl#getRMAppMetrics. (bibinchundatt: rev b5b81a4f086126974c75dab9b54aea20a0c1a48f)

          • (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #13257 (See https://builds.apache.org/job/Hadoop-trunk-Commit/13257/ ) YARN-7489 . ConcurrentModificationException in RMAppImpl#getRMAppMetrics. (bibinchundatt: rev b5b81a4f086126974c75dab9b54aea20a0c1a48f) (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMAppImpl.java
          bibinchundatt Bibin Chundatt added a comment -

          Thank you Tao Yang for contribution . Committed to trunk and branch-3.0.
          Code conflicts for branch-2 . Could you provide patch for 2.9 and 2.8

          bibinchundatt Bibin Chundatt added a comment - Thank you Tao Yang for contribution . Committed to trunk and branch-3.0. Code conflicts for branch-2 . Could you provide patch for 2.9 and 2.8
          Tao Yang Tao Yang added a comment -

          Thanks bibinchundatt for your review and commit.

          Tao Yang Tao Yang added a comment - Thanks bibinchundatt for your review and commit.
          Tao Yang Tao Yang added a comment -

          Attaching patch for 2.9 and 2.8.

          Tao Yang Tao Yang added a comment - Attaching patch for 2.9 and 2.8.
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 26m 24s Docker mode activated.
                Prechecks
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
                branch-2 Compile Tests
          +1 mvninstall 12m 56s branch-2 passed
          +1 compile 0m 38s branch-2 passed
          +1 checkstyle 0m 28s branch-2 passed
          +1 mvnsite 0m 46s branch-2 passed
          +1 findbugs 1m 19s branch-2 passed
          +1 javadoc 0m 30s branch-2 passed
                Patch Compile Tests
          +1 mvninstall 0m 39s the patch passed
          +1 compile 0m 35s the patch passed
          +1 javac 0m 35s the patch passed
          +1 checkstyle 0m 20s the patch passed
          +1 mvnsite 0m 39s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 25s the patch passed
          +1 javadoc 0m 24s the patch passed
                Other Tests
          -1 unit 69m 33s hadoop-yarn-server-resourcemanager in the patch failed.
          +1 asflicense 0m 22s The patch does not generate ASF License warnings.
          118m 7s



          Reason Tests
          Failed junit tests hadoop.yarn.server.resourcemanager.scheduler.capacity.TestIncreaseAllocationExpirer



          Subsystem Report/Notes
          Docker Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:17213a0
          JIRA Issue YARN-7489
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12898436/YARN-7489-branch-2.001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
          uname Linux 7d4ee50a6b1f 4.4.0-89-generic #112-Ubuntu SMP Mon Jul 31 19:38:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/patchprocess/precommit/personality/provided.sh
          git revision branch-2 / b57ea38
          maven version: Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
          Default Java 1.7.0_151
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-YARN-Build/18575/artifact/out/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt
          Test Results https://builds.apache.org/job/PreCommit-YARN-Build/18575/testReport/
          Max. process+thread count 856 (vs. ulimit of 5000)
          modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/18575/console
          Powered by Apache Yetus 0.7.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 26m 24s Docker mode activated.       Prechecks +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.       branch-2 Compile Tests +1 mvninstall 12m 56s branch-2 passed +1 compile 0m 38s branch-2 passed +1 checkstyle 0m 28s branch-2 passed +1 mvnsite 0m 46s branch-2 passed +1 findbugs 1m 19s branch-2 passed +1 javadoc 0m 30s branch-2 passed       Patch Compile Tests +1 mvninstall 0m 39s the patch passed +1 compile 0m 35s the patch passed +1 javac 0m 35s the patch passed +1 checkstyle 0m 20s the patch passed +1 mvnsite 0m 39s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 25s the patch passed +1 javadoc 0m 24s the patch passed       Other Tests -1 unit 69m 33s hadoop-yarn-server-resourcemanager in the patch failed. +1 asflicense 0m 22s The patch does not generate ASF License warnings. 118m 7s Reason Tests Failed junit tests hadoop.yarn.server.resourcemanager.scheduler.capacity.TestIncreaseAllocationExpirer Subsystem Report/Notes Docker Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:17213a0 JIRA Issue YARN-7489 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12898436/YARN-7489-branch-2.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle uname Linux 7d4ee50a6b1f 4.4.0-89-generic #112-Ubuntu SMP Mon Jul 31 19:38:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/patchprocess/precommit/personality/provided.sh git revision branch-2 / b57ea38 maven version: Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00) Default Java 1.7.0_151 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-YARN-Build/18575/artifact/out/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/18575/testReport/ Max. process+thread count 856 (vs. ulimit of 5000) modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager Console output https://builds.apache.org/job/PreCommit-YARN-Build/18575/console Powered by Apache Yetus 0.7.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          bibinchundatt Bibin Chundatt added a comment -

          Committed to trunk,branch-3.0, branch-2.9,branch-2.8,branch-2,
          Thank you Tao Yang for contribution

          bibinchundatt Bibin Chundatt added a comment - Committed to trunk,branch-3.0, branch-2.9,branch-2.8,branch-2, Thank you Tao Yang for contribution

          People

            Tao Yang Tao Yang
            Tao Yang Tao Yang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: