[
https://issues.apache.org/jira/browse/HADOOP-10062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14277204#comment-14277204
]
Sangjin Lee commented on HADOOP-10062:
--------------------------------------
I'd like to revive interest in this. We see this test fail with some regularity
in our CI environment (CentOS 6 w/ JDK 7).
Clearly we need the fix in the current patch as the test waits on the wrong
barrier.
In addition, MetricsSystemImpl.publicMetricsNow() is not quite correct in
synchronization because sinks.size() > 0 are checked unsynchronized (sinks is
not a thread-safe data structure). So that needs to be fixed. However, I don't
believe that is causing this test to fail (I don't think sinks are mutated
while test threads run).
Is the failure reproduced with the barrier fix? If so, could it be some kind of
missed signals between the sink thread and the main thread, or something along
that line? These are guesses at the moment.
> TestMetricsSystemImpl#testMultiThreadedPublish fails on trunk
> -------------------------------------------------------------
>
> Key: HADOOP-10062
> URL: https://issues.apache.org/jira/browse/HADOOP-10062
> Project: Hadoop Common
> Issue Type: Bug
> Components: metrics
> Affects Versions: 3.0.0
> Environment: CentOS 6.4, Oracle JDK 1.6.0_31, JDK1.7.0_45
> Reporter: Shinichi Yamashita
> Priority: Minor
> Attachments: HADOOP-10062-failed.txt, HADOOP-10062-success.txt,
> HADOOP-10062.patch, HADOOP-10062.patch
>
>
> TestMetricsSystemInpl#testMultiThreadedPublish failed with "Metrics not
> collected"
> {code}
> Running org.apache.hadoop.metrics2.impl.TestMetricsSystemImpl
> Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.688 sec <<<
> FAILURE! - in org.apache.hadoop.metrics2.impl.TestMetricsSystemImpl
> testMultiThreadedPublish(org.apache.hadoop.metrics2.impl.TestMetricsSystemImpl)
> Time elapsed: 0.056 sec <<< FAILURE!
> java.lang.AssertionError: Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Passed
> at org.junit.Assert.fail(Assert.java:93)
> at org.junit.Assert.assertTrue(Assert.java:43)
> at
> org.apache.hadoop.metrics2.impl.TestMetricsSystemImpl.testMultiThreadedPublish(TestMetricsSystemImpl.java:232)
> Results :
> Failed tests:
> TestMetricsSystemImpl.testMultiThreadedPublish:232 Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Metric not collected!
> Passed
> Tests run: 6, Failures: 1, Errors: 0, Skipped: 0
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)