Gary Yao created FLINK-14780:
--------------------------------
Summary: Avoid leaking instance of DefaultScheduler before object is constructed
Key: FLINK-14780
URL:
https://issues.apache.org/jira/browse/FLINK-14780 Project: Flink
Issue Type: Sub-task
Components: Runtime / Coordination
Affects Versions: 1.10.0
Reporter: Gary Yao
Fix For: 1.10.0
An instance of {{DefaultScheduler}} may leak to a metric reporter thread before the instance of the object is fully constructed. This can lead to an NPE (see below.
https://api.travis-ci.org/v3/job/611597698/log.txt{noformat}
java.lang.NullPointerException
at org.apache.flink.runtime.scheduler.DefaultScheduler.getNumberOfRestarts(DefaultScheduler.java:156)
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.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)