Volodymyr Vysotskyi created DRILL-6793: ------------------------------------------
Summary: FragmentExecutor cannot send its final state for the case when RootExec root wasn't initialized Key: DRILL-6793 URL: https://issues.apache.org/jira/browse/DRILL-6793 Project: Apache Drill Issue Type: Bug Affects Versions: 1.15.0 Reporter: Volodymyr Vysotskyi Assignee: Bohdan Kazydub Fix For: 1.15.0 *Problem description* For the case when the exception was thrown during [initializing {{RootExec root}}|https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentExecutor.java#L264], after that {{root.dumpBatches()}} is called in {{FragmentExecutor.cleanup()}} method, so NPE will be thrown before releasing the resources and sending the final state. {noformat} 20:11:22.910 [243f2a45-cd8a-b3f8-3d5d-36fdbe8fb446:frag:0:0] ERROR o.a.d.exec.server.BootStrapContext - org.apache.drill.exec.work.WorkManager$WorkerBee$2.run() leaked an exception. Exception in thread "243f2a45-cd8a-b3f8-3d5d-36fdbe8fb446:frag:0:0" java.lang.NullPointerException at org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:211) at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:330) at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) 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) java.lang.NullPointerException: null at org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:211) ~[classes/:na] at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:330) ~[classes/:na] at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) ~[classes/:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_181] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181] {noformat} *Simple reproduce* Throw the exception in the constructor of {{ParquetRecordReader}} and run any parquet test, for example {{TestParquetMetadataCache.testPartitionPruningWithMetadataCache_1()}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)