Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12588

Fix intermittent test failure of TestGangliaMetrics

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 2.7.3, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Jenkins found this test failure on HADOOP-11149.

      Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.773 sec <<< FAILURE! - in org.apache.hadoop.metrics2.impl.TestGangliaMetrics
      testGangliaMetrics2(org.apache.hadoop.metrics2.impl.TestGangliaMetrics) Time elapsed: 0.39 sec <<< FAILURE!
      java.lang.AssertionError: Missing metrics: test.s1rec.Xxx
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.assertTrue(Assert.java:41)
      at org.apache.hadoop.metrics2.impl.TestGangliaMetrics.checkMetrics(TestGangliaMetrics.java:159)
      at org.apache.hadoop.metrics2.impl.TestGangliaMetrics.testGangliaMetrics2(TestGangliaMetrics.java:137)

      1. HADOOP-12588.addendum.patch
        1 kB
        Masatake Iwasaki
      2. HADOOP-12588.addendum.03.patch
        2 kB
        Masatake Iwasaki
      3. HADOOP-12588.addendum.02.patch
        2 kB
        Masatake Iwasaki
      4. HADOOP-12588.001.patch
        2 kB
        Masatake Iwasaki

        Issue Links

          Activity

          Hide
          vinodkv Vinod Kumar Vavilapalli added a comment -

          Closing the JIRA as part of 2.7.3 release.

          Show
          vinodkv Vinod Kumar Vavilapalli added a comment - Closing the JIRA as part of 2.7.3 release.
          Hide
          iwasakims Masatake Iwasaki added a comment -

          I filed HADOOP-13439 for following up.

          Show
          iwasakims Masatake Iwasaki added a comment - I filed HADOOP-13439 for following up.
          Show
          liuml07 Mingliang Liu added a comment - Was this resolved? Seeing this in recent run https://builds.apache.org/job/PreCommit-HADOOP-Build/10106/testReport/org.apache.hadoop.metrics2.impl/TestGangliaMetrics/testGangliaMetrics2/ Thanks.
          Hide
          vinodkv Vinod Kumar Vavilapalli added a comment -

          I'm about to release 2.7.3, so this can't be in open state unless the original patch gets reverted. Instead, let's open a new JIRA for more fixes.

          Show
          vinodkv Vinod Kumar Vavilapalli added a comment - I'm about to release 2.7.3, so this can't be in open state unless the original patch gets reverted. Instead, let's open a new JIRA for more fixes.
          Hide
          iwasakims Masatake Iwasaki added a comment -

          Thanks for reporting this, Steve Loughran. The test log of HADOOP-13323 indicates there is a race with TestMetricsSystemImpl. The TestGangliaMetrics#testGangliaMetrics2 sets *.period to 120 but 8 was used.

          2016-06-27 15:21:31,480 INFO  impl.MetricsSystemImpl (MetricsSystemImpl.java:startTimer(375)) - Scheduled snapshot period at 8 second(s).
          

          I will upload additional patch or open another issue if I need major refactoring of the test.

          Show
          iwasakims Masatake Iwasaki added a comment - Thanks for reporting this, Steve Loughran . The test log of HADOOP-13323 indicates there is a race with TestMetricsSystemImpl . The TestGangliaMetrics#testGangliaMetrics2 sets *.period to 120 but 8 was used. 2016-06-27 15:21:31,480 INFO impl.MetricsSystemImpl (MetricsSystemImpl.java:startTimer(375)) - Scheduled snapshot period at 8 second(s). I will upload additional patch or open another issue if I need major refactoring of the test.
          Hide
          stevel@apache.org Steve Loughran added a comment -

          I'm still seeing failures here, such as in HADOOP-13323

          If we can't stabilise this test, I think we should just cull it. It fails so often it is ignored, so if a regression did show up, we wouldn't catch it

          Show
          stevel@apache.org Steve Loughran added a comment - I'm still seeing failures here, such as in HADOOP-13323 If we can't stabilise this test, I think we should just cull it. It fails so often it is ignored, so if a regression did show up, we wouldn't catch it
          Hide
          iwasakims Masatake Iwasaki added a comment -

          I committed this to branch-2.7.3 too.

          Show
          iwasakims Masatake Iwasaki added a comment - I committed this to branch-2.7.3 too.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Thanks Masatake Iwasaki for committing this. Would you commit this to branch-2.7.3 as well?

          Show
          ajisakaa Akira Ajisaka added a comment - Thanks Masatake Iwasaki for committing this. Would you commit this to branch-2.7.3 as well?
          Hide
          iwasakims Masatake Iwasaki added a comment -

          Thanks, Akira Ajisaka. Committed addendum.

          Show
          iwasakims Masatake Iwasaki added a comment - Thanks, Akira Ajisaka . Committed addendum.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #9999 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9999/)
          HADOOP-12588. addendum patch to fix intermittent failure of (iwasakims: rev 67089875f0ea2a47cca0c237fccf239bf6fe2d53)

          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #9999 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9999/ ) HADOOP-12588 . addendum patch to fix intermittent failure of (iwasakims: rev 67089875f0ea2a47cca0c237fccf239bf6fe2d53) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Thanks Masatake Iwasaki for digging the cause of the problem and updating the patch. LGTM, +1.

          Show
          ajisakaa Akira Ajisaka added a comment - Thanks Masatake Iwasaki for digging the cause of the problem and updating the patch. LGTM, +1.
          Hide
          hadoopqa Hadoop QA added a comment -
          +1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 27s 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 32s trunk passed
          +1 compile 7m 34s trunk passed
          +1 checkstyle 0m 24s trunk passed
          +1 mvnsite 0m 57s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 1m 25s trunk passed
          +1 javadoc 0m 47s trunk passed
          +1 mvninstall 0m 40s the patch passed
          +1 compile 6m 56s the patch passed
          +1 javac 6m 56s the patch passed
          +1 checkstyle 0m 24s the patch passed
          +1 mvnsite 0m 53s the patch passed
          +1 mvneclipse 0m 12s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 39s the patch passed
          +1 javadoc 0m 46s the patch passed
          +1 unit 8m 14s hadoop-common in the patch passed.
          +1 asflicense 0m 21s The patch does not generate ASF License warnings.
          40m 10s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:e2f6409
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12812131/HADOOP-12588.addendum.03.patch
          JIRA Issue HADOOP-12588
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 83bb80077649 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 / f2ac132
          Default Java 1.8.0_91
          findbugs v3.0.0
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/9844/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/9844/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 27s 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 32s trunk passed +1 compile 7m 34s trunk passed +1 checkstyle 0m 24s trunk passed +1 mvnsite 0m 57s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 25s trunk passed +1 javadoc 0m 47s trunk passed +1 mvninstall 0m 40s the patch passed +1 compile 6m 56s the patch passed +1 javac 6m 56s the patch passed +1 checkstyle 0m 24s the patch passed +1 mvnsite 0m 53s the patch passed +1 mvneclipse 0m 12s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 39s the patch passed +1 javadoc 0m 46s the patch passed +1 unit 8m 14s hadoop-common in the patch passed. +1 asflicense 0m 21s The patch does not generate ASF License warnings. 40m 10s Subsystem Report/Notes Docker Image:yetus/hadoop:e2f6409 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12812131/HADOOP-12588.addendum.03.patch JIRA Issue HADOOP-12588 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 83bb80077649 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 / f2ac132 Default Java 1.8.0_91 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/9844/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/9844/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          iwasakims Masatake Iwasaki added a comment -

          If metrics is published by the timer in MetricsSystemImpl after sinks are registered and before metrics system is stopped, we get metrics more than expected, though I could not reproduce this without adding artificial delay on my environment.

              // register the sinks
              ms.register("gsink30", "gsink30 desc", gsink30);
              ms.register("gsink31", "gsink31 desc", gsink31);
              ms.publishMetricsNow(); // publish the metrics
          
              ms.stop();
          

          We can avoid the situation by setting long publishing interval. Since we manually publish metrics by calling publishMetricsNow, we don't need periodic publishing. The configuration to set the interval must be *.period rather than default.period.

          I will upload a patch addressing this.

          Show
          iwasakims Masatake Iwasaki added a comment - If metrics is published by the timer in MetricsSystemImpl after sinks are registered and before metrics system is stopped, we get metrics more than expected, though I could not reproduce this without adding artificial delay on my environment. // register the sinks ms.register( "gsink30" , "gsink30 desc" , gsink30); ms.register( "gsink31" , "gsink31 desc" , gsink31); ms.publishMetricsNow(); // publish the metrics ms.stop(); We can avoid the situation by setting long publishing interval. Since we manually publish metrics by calling publishMetricsNow , we don't need periodic publishing. The configuration to set the interval must be *.period rather than default.period . I will upload a patch addressing this.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Hi Masatake Iwasaki, any update on this?

          Show
          ajisakaa Akira Ajisaka added a comment - Hi Masatake Iwasaki , any update on this?
          Hide
          iwasakims Masatake Iwasaki added a comment -

          Hmm... The submitted patch is addressing the issue that expected result is not found. Mismatch in record count: expected:<6> but was:<27> means it got results more than expected. I think it is another problem but maybe related. I'm digging and will address the issue too here.

          Show
          iwasakims Masatake Iwasaki added a comment - Hmm... The submitted patch is addressing the issue that expected result is not found. Mismatch in record count: expected:<6> but was:<27> means it got results more than expected. I think it is another problem but maybe related. I'm digging and will address the issue too here.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Hi Masatake Iwasaki, thank you for continuing the work.
          I have one question. Is the test failure related to your addendum patch?
          https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/testReport/org.apache.hadoop.metrics2.impl/TestGangliaMetrics/testGangliaMetrics2/

          java.lang.AssertionError: Mismatch in record count:  expected:<6> but was:<27>
          	at org.junit.Assert.fail(Assert.java:88)
          	at org.junit.Assert.failNotEquals(Assert.java:743)
          	at org.junit.Assert.assertEquals(Assert.java:118)
          	at org.junit.Assert.assertEquals(Assert.java:555)
          	at org.apache.hadoop.metrics2.impl.TestGangliaMetrics.checkMetrics(TestGangliaMetrics.java:164)
          	at org.apache.hadoop.metrics2.impl.TestGangliaMetrics.testGangliaMetrics2(TestGangliaMetrics.java:138)
          
          Show
          ajisakaa Akira Ajisaka added a comment - Hi Masatake Iwasaki , thank you for continuing the work. I have one question. Is the test failure related to your addendum patch? https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/testReport/org.apache.hadoop.metrics2.impl/TestGangliaMetrics/testGangliaMetrics2/ java.lang.AssertionError: Mismatch in record count: expected:<6> but was:<27> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:743) at org.junit.Assert.assertEquals(Assert.java:118) at org.junit.Assert.assertEquals(Assert.java:555) at org.apache.hadoop.metrics2.impl.TestGangliaMetrics.checkMetrics(TestGangliaMetrics.java:164) at org.apache.hadoop.metrics2.impl.TestGangliaMetrics.testGangliaMetrics2(TestGangliaMetrics.java:138)
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s 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 59s trunk passed
          +1 compile 9m 26s trunk passed with JDK v1.8.0_66
          +1 compile 8m 53s trunk passed with JDK v1.7.0_91
          +1 checkstyle 0m 16s trunk passed
          +1 mvnsite 1m 4s trunk passed
          +1 mvneclipse 0m 13s trunk passed
          +1 findbugs 1m 57s trunk passed
          +1 javadoc 1m 0s trunk passed with JDK v1.8.0_66
          +1 javadoc 1m 5s trunk passed with JDK v1.7.0_91
          +1 mvninstall 1m 27s the patch passed
          +1 compile 9m 10s the patch passed with JDK v1.8.0_66
          +1 javac 9m 10s the patch passed
          +1 compile 8m 54s the patch passed with JDK v1.7.0_91
          +1 javac 8m 54s the patch passed
          +1 checkstyle 0m 16s the patch passed
          +1 mvnsite 1m 2s the patch passed
          +1 mvneclipse 0m 13s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 2m 0s the patch passed
          +1 javadoc 1m 0s the patch passed with JDK v1.8.0_66
          +1 javadoc 1m 6s the patch passed with JDK v1.7.0_91
          -1 unit 7m 59s hadoop-common in the patch failed with JDK v1.8.0_66.
          -1 unit 7m 43s hadoop-common in the patch failed with JDK v1.7.0_91.
          +1 asflicense 0m 23s Patch does not generate ASF License warnings.
          74m 22s



          Reason Tests
          JDK v1.8.0_66 Failed junit tests hadoop.test.TestTimedOutTestsListener
          JDK v1.7.0_91 Failed junit tests hadoop.security.ssl.TestReloadingX509TrustManager
            hadoop.metrics2.impl.TestGangliaMetrics



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:0ca8df7
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12782019/HADOOP-12588.addendum.02.patch
          JIRA Issue HADOOP-12588
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux cdd193b1152a 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 / c0537bc
          Default Java 1.7.0_91
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt
          unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt
          JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Max memory used 76MB
          Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/console

          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 @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 59s trunk passed +1 compile 9m 26s trunk passed with JDK v1.8.0_66 +1 compile 8m 53s trunk passed with JDK v1.7.0_91 +1 checkstyle 0m 16s trunk passed +1 mvnsite 1m 4s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 57s trunk passed +1 javadoc 1m 0s trunk passed with JDK v1.8.0_66 +1 javadoc 1m 5s trunk passed with JDK v1.7.0_91 +1 mvninstall 1m 27s the patch passed +1 compile 9m 10s the patch passed with JDK v1.8.0_66 +1 javac 9m 10s the patch passed +1 compile 8m 54s the patch passed with JDK v1.7.0_91 +1 javac 8m 54s the patch passed +1 checkstyle 0m 16s the patch passed +1 mvnsite 1m 2s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 0s the patch passed +1 javadoc 1m 0s the patch passed with JDK v1.8.0_66 +1 javadoc 1m 6s the patch passed with JDK v1.7.0_91 -1 unit 7m 59s hadoop-common in the patch failed with JDK v1.8.0_66. -1 unit 7m 43s hadoop-common in the patch failed with JDK v1.7.0_91. +1 asflicense 0m 23s Patch does not generate ASF License warnings. 74m 22s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.test.TestTimedOutTestsListener JDK v1.7.0_91 Failed junit tests hadoop.security.ssl.TestReloadingX509TrustManager   hadoop.metrics2.impl.TestGangliaMetrics Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12782019/HADOOP-12588.addendum.02.patch JIRA Issue HADOOP-12588 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux cdd193b1152a 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 / c0537bc Default Java 1.7.0_91 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Max memory used 76MB Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8399/console This message was automatically generated.
          Hide
          iwasakims Masatake Iwasaki added a comment -

          attaching addendum.02.

          I need to run the TestGangliaMetrics repeatedly for more long time to veryfy the fix since the failure is rare on my environment.

          Show
          iwasakims Masatake Iwasaki added a comment - attaching addendum.02. I need to run the TestGangliaMetrics repeatedly for more long time to veryfy the fix since the failure is rare on my environment.
          Hide
          iwasakims Masatake Iwasaki added a comment -

          The first patch and addendum was based on wrong assumption.. Sorry about that.

          We need to make sure that MockDatagramSocket#getCapturedSend in test thread happens after the last call of MockDatagramSocket#send in sink thread. Given the synchronization between MetricsSystemImpl#publishMetricsNow and MetricsSink#putMetrics, making the getCapturedSend and send should be sufficient.

          Replacing ArrayList with CopyOnWriteArrayList is unnecessary and misleading. It should be reverted in the next patch.

          Show
          iwasakims Masatake Iwasaki added a comment - The first patch and addendum was based on wrong assumption.. Sorry about that. We need to make sure that MockDatagramSocket#getCapturedSend in test thread happens after the last call of MockDatagramSocket#send in sink thread. Given the synchronization between MetricsSystemImpl#publishMetricsNow and MetricsSink#putMetrics , making the getCapturedSend and send should be sufficient. Replacing ArrayList with CopyOnWriteArrayList is unnecessary and misleading. It should be reverted in the next patch.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s Docker mode activated.
          +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.
          +1 mvninstall 8m 14s trunk passed
          +1 compile 8m 56s trunk passed with JDK v1.8.0_66
          +1 compile 9m 34s trunk passed with JDK v1.7.0_91
          +1 checkstyle 0m 17s trunk passed
          +1 mvnsite 1m 10s trunk passed
          +1 mvneclipse 0m 14s trunk passed
          +1 findbugs 1m 56s trunk passed
          +1 javadoc 0m 59s trunk passed with JDK v1.8.0_66
          +1 javadoc 1m 10s trunk passed with JDK v1.7.0_91
          +1 mvninstall 1m 39s the patch passed
          +1 compile 8m 55s the patch passed with JDK v1.8.0_66
          +1 javac 8m 55s the patch passed
          +1 compile 9m 28s the patch passed with JDK v1.7.0_91
          +1 javac 9m 28s the patch passed
          -1 checkstyle 0m 18s Patch generated 1 new checkstyle issues in hadoop-common-project/hadoop-common (total was 23, now 23).
          +1 mvnsite 1m 9s the patch passed
          +1 mvneclipse 0m 15s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          -1 findbugs 2m 11s hadoop-common-project/hadoop-common introduced 1 new FindBugs issues.
          +1 javadoc 0m 58s the patch passed with JDK v1.8.0_66
          +1 javadoc 1m 9s the patch passed with JDK v1.7.0_91
          -1 unit 8m 1s hadoop-common in the patch failed with JDK v1.8.0_66.
          +1 unit 8m 23s hadoop-common in the patch passed with JDK v1.7.0_91.
          +1 asflicense 0m 25s Patch does not generate ASF License warnings.
          76m 44s



          Reason Tests
          FindBugs module:hadoop-common-project/hadoop-common
            Inconsistent synchronization of org.apache.hadoop.metrics2.sink.ganglia.AbstractGangliaSink.datagramSocket; locked 66% of time Unsynchronized access at AbstractGangliaSink.java:66% of time Unsynchronized access at AbstractGangliaSink.java:[line 279]
          JDK v1.8.0_66 Failed junit tests hadoop.fs.TestLocalFsFCStatistics



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:0ca8df7
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12781845/HADOOP-12588.addendum.patch
          JIRA Issue HADOOP-12588
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux d431937dfefb 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 / 25051c3
          Default Java 1.7.0_91
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91
          findbugs v3.0.0
          checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt
          findbugs https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/artifact/patchprocess/new-findbugs-hadoop-common-project_hadoop-common.html
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt
          unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt
          JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Max memory used 76MB
          Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/console

          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 @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. +1 mvninstall 8m 14s trunk passed +1 compile 8m 56s trunk passed with JDK v1.8.0_66 +1 compile 9m 34s trunk passed with JDK v1.7.0_91 +1 checkstyle 0m 17s trunk passed +1 mvnsite 1m 10s trunk passed +1 mvneclipse 0m 14s trunk passed +1 findbugs 1m 56s trunk passed +1 javadoc 0m 59s trunk passed with JDK v1.8.0_66 +1 javadoc 1m 10s trunk passed with JDK v1.7.0_91 +1 mvninstall 1m 39s the patch passed +1 compile 8m 55s the patch passed with JDK v1.8.0_66 +1 javac 8m 55s the patch passed +1 compile 9m 28s the patch passed with JDK v1.7.0_91 +1 javac 9m 28s the patch passed -1 checkstyle 0m 18s Patch generated 1 new checkstyle issues in hadoop-common-project/hadoop-common (total was 23, now 23). +1 mvnsite 1m 9s the patch passed +1 mvneclipse 0m 15s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. -1 findbugs 2m 11s hadoop-common-project/hadoop-common introduced 1 new FindBugs issues. +1 javadoc 0m 58s the patch passed with JDK v1.8.0_66 +1 javadoc 1m 9s the patch passed with JDK v1.7.0_91 -1 unit 8m 1s hadoop-common in the patch failed with JDK v1.8.0_66. +1 unit 8m 23s hadoop-common in the patch passed with JDK v1.7.0_91. +1 asflicense 0m 25s Patch does not generate ASF License warnings. 76m 44s Reason Tests FindBugs module:hadoop-common-project/hadoop-common   Inconsistent synchronization of org.apache.hadoop.metrics2.sink.ganglia.AbstractGangliaSink.datagramSocket; locked 66% of time Unsynchronized access at AbstractGangliaSink.java:66% of time Unsynchronized access at AbstractGangliaSink.java: [line 279] JDK v1.8.0_66 Failed junit tests hadoop.fs.TestLocalFsFCStatistics Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12781845/HADOOP-12588.addendum.patch JIRA Issue HADOOP-12588 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux d431937dfefb 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 / 25051c3 Default Java 1.7.0_91 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_91 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt findbugs https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/artifact/patchprocess/new-findbugs-hadoop-common-project_hadoop-common.html unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Max memory used 76MB Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8392/console This message was automatically generated.
          Hide
          iwasakims Masatake Iwasaki added a comment -

          I'm attaching addendum patch.

          Show
          iwasakims Masatake Iwasaki added a comment - I'm attaching addendum patch.
          Hide
          iwasakims Masatake Iwasaki added a comment -

          I saw this test failure again today. The fix seemed to be not enough.

          java.lang.AssertionError: Missing metrics: test.s1rec.Xxx
          	at org.junit.Assert.fail(Assert.java:88)
          	at org.junit.Assert.assertTrue(Assert.java:41)
          	at org.apache.hadoop.metrics2.impl.TestGangliaMetrics.checkMetrics(TestGangliaMetrics.java:161)
          	at org.apache.hadoop.metrics2.impl.TestGangliaMetrics.testGangliaMetrics2(TestGangliaMetrics.java:139)
          
          Show
          iwasakims Masatake Iwasaki added a comment - I saw this test failure again today. The fix seemed to be not enough. java.lang.AssertionError: Missing metrics: test.s1rec.Xxx at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.assertTrue(Assert.java:41) at org.apache.hadoop.metrics2.impl.TestGangliaMetrics.checkMetrics(TestGangliaMetrics.java:161) at org.apache.hadoop.metrics2.impl.TestGangliaMetrics.testGangliaMetrics2(TestGangliaMetrics.java:139)
          Hide
          iwasakims Masatake Iwasaki added a comment -

          Thanks, Akira Ajisaka!

          Show
          iwasakims Masatake Iwasaki added a comment - Thanks, Akira Ajisaka !
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #8993 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8993/)
          HADOOP-12588. Fix intermittent test failure of TestGangliaMetrics. (aajisaka: rev bd5e207432c54cc75fd8c040e232241678987e53)

          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8993 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8993/ ) HADOOP-12588 . Fix intermittent test failure of TestGangliaMetrics. (aajisaka: rev bd5e207432c54cc75fd8c040e232241678987e53) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/metrics2/impl/TestGangliaMetrics.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          ajisakaa Akira Ajisaka added a comment -

          I've committed this to trunk, branch-2, branch-2.8, and branch-2.7. Thanks Masatake Iwasaki for the contribution.
          Please reopen this issue if the test is still failing.

          Show
          ajisakaa Akira Ajisaka added a comment - I've committed this to trunk, branch-2, branch-2.8, and branch-2.7. Thanks Masatake Iwasaki for the contribution. Please reopen this issue if the test is still failing.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          +1, thanks Masatake.

          • I'm thinking the visibility looks to be the cause because there are no other reason to fail the test. (I couldn't reproduce the error locally, so I couldn't confirmed that the visibility is the real cause.)
          • The patch is safe to apply.
          • The test failures are unrelated because the patch changes TestGangliaMetrics only.
          Show
          ajisakaa Akira Ajisaka added a comment - +1, thanks Masatake. I'm thinking the visibility looks to be the cause because there are no other reason to fail the test. (I couldn't reproduce the error locally, so I couldn't confirmed that the visibility is the real cause.) The patch is safe to apply. The test failures are unrelated because the patch changes TestGangliaMetrics only.
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s 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 11m 35s trunk passed
          +1 compile 14m 46s trunk passed with JDK v1.8.0_66
          +1 compile 12m 34s trunk passed with JDK v1.7.0_91
          +1 checkstyle 0m 22s trunk passed
          +1 mvnsite 1m 28s trunk passed
          +1 mvneclipse 0m 19s trunk passed
          +1 findbugs 2m 40s trunk passed
          +1 javadoc 1m 30s trunk passed with JDK v1.8.0_66
          +1 javadoc 1m 37s trunk passed with JDK v1.7.0_91
          +1 mvninstall 2m 10s the patch passed
          +1 compile 14m 54s the patch passed with JDK v1.8.0_66
          +1 javac 14m 54s the patch passed
          +1 compile 12m 43s the patch passed with JDK v1.7.0_91
          +1 javac 12m 43s the patch passed
          +1 checkstyle 0m 22s the patch passed
          +1 mvnsite 1m 27s the patch passed
          +1 mvneclipse 0m 20s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 2m 54s the patch passed
          +1 javadoc 1m 34s the patch passed with JDK v1.8.0_66
          +1 javadoc 1m 38s the patch passed with JDK v1.7.0_91
          -1 unit 11m 22s hadoop-common in the patch failed with JDK v1.8.0_66.
          -1 unit 10m 23s hadoop-common in the patch failed with JDK v1.7.0_91.
          +1 asflicense 0m 29s Patch does not generate ASF License warnings.
          108m 54s



          Reason Tests
          JDK v1.8.0_66 Failed junit tests hadoop.test.TestTimedOutTestsListener
            hadoop.fs.shell.find.TestIname
            hadoop.fs.shell.find.TestFind
          JDK v1.7.0_91 Failed junit tests hadoop.fs.TestLocalFsFCStatistics
            hadoop.ipc.TestIPC



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:0ca8df7
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12775465/HADOOP-12588.001.patch
          JIRA Issue HADOOP-12588
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 7c4f5be9ed73 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 / e8bd1ba
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt
          unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt
          unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt
          JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/testReport/
          modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
          Max memory used 76MB
          Powered by Apache Yetus http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/console

          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 @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 11m 35s trunk passed +1 compile 14m 46s trunk passed with JDK v1.8.0_66 +1 compile 12m 34s trunk passed with JDK v1.7.0_91 +1 checkstyle 0m 22s trunk passed +1 mvnsite 1m 28s trunk passed +1 mvneclipse 0m 19s trunk passed +1 findbugs 2m 40s trunk passed +1 javadoc 1m 30s trunk passed with JDK v1.8.0_66 +1 javadoc 1m 37s trunk passed with JDK v1.7.0_91 +1 mvninstall 2m 10s the patch passed +1 compile 14m 54s the patch passed with JDK v1.8.0_66 +1 javac 14m 54s the patch passed +1 compile 12m 43s the patch passed with JDK v1.7.0_91 +1 javac 12m 43s the patch passed +1 checkstyle 0m 22s the patch passed +1 mvnsite 1m 27s the patch passed +1 mvneclipse 0m 20s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 54s the patch passed +1 javadoc 1m 34s the patch passed with JDK v1.8.0_66 +1 javadoc 1m 38s the patch passed with JDK v1.7.0_91 -1 unit 11m 22s hadoop-common in the patch failed with JDK v1.8.0_66. -1 unit 10m 23s hadoop-common in the patch failed with JDK v1.7.0_91. +1 asflicense 0m 29s Patch does not generate ASF License warnings. 108m 54s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.test.TestTimedOutTestsListener   hadoop.fs.shell.find.TestIname   hadoop.fs.shell.find.TestFind JDK v1.7.0_91 Failed junit tests hadoop.fs.TestLocalFsFCStatistics   hadoop.ipc.TestIPC Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12775465/HADOOP-12588.001.patch JIRA Issue HADOOP-12588 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 7c4f5be9ed73 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 / e8bd1ba findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt unit test logs https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_91.txt JDK v1.7.0_91 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Max memory used 76MB Powered by Apache Yetus http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/8177/console This message was automatically generated.
          Hide
          iwasakims Masatake Iwasaki added a comment -

          The cause seems to be visibility between test thread and sink thread.

          I attached 001.

          Show
          iwasakims Masatake Iwasaki added a comment - The cause seems to be visibility between test thread and sink thread. I attached 001.

            People

            • Assignee:
              iwasakims Masatake Iwasaki
              Reporter:
              ozawa Tsuyoshi Ozawa
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development