Chesnay Schepler created FLINK-12642: ----------------------------------------
Summary: OutputBufferPoolUsageGauge can fail with NPE Key: FLINK-12642 URL: https://issues.apache.org/jira/browse/FLINK-12642 Project: Flink Issue Type: Bug Components: Runtime / Metrics, Runtime / Network Affects Versions: 1.9.0 Reporter: Chesnay Schepler Fix For: 1.9.0 The result partition metrics are initialized before {{ResultPartitiion#setup}} was called. If a reporter tries to access a {{OutputBufferPoolUsageGauge}} in between it will fail with an NPE since the bufferpool of the partition is still null. {code} 2019-05-27 14:49:47,031 WARN org.apache.flink.runtime.metrics.MetricRegistryImpl - Error while reporting metrics java.lang.NullPointerException at org.apache.flink.runtime.io.network.metrics.OutputBufferPoolUsageGauge.getValue(OutputBufferPoolUsageGauge.java:41) at org.apache.flink.runtime.io.network.metrics.OutputBufferPoolUsageGauge.getValue(OutputBufferPoolUsageGauge.java:27) at org.apache.flink.metrics.slf4j.Slf4jReporter.tryReport(Slf4jReporter.java:114) at org.apache.flink.metrics.slf4j.Slf4jReporter.report(Slf4jReporter.java:80) at org.apache.flink.runtime.metrics.MetricRegistryImpl$ReporterTask.run(MetricRegistryImpl.java:436) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:300) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.base/java.lang.Thread.run(Thread.java:844) {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)