Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-12642

OutputBufferPoolUsageGauge can fail with NPE

    XMLWordPrintableJSON

    Details

      Description

      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.

      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)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                azagrebin Andrey Zagrebin
                Reporter:
                chesnay Chesnay Schepler
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m