You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Venki Korukanti (JIRA)" <ji...@apache.org> on 2016/03/14 18:31:34 UTC

[jira] [Created] (DRILL-4508) Null proof all AutoCloseable.close() methods

Venki Korukanti created DRILL-4508:
--------------------------------------

             Summary: Null proof all AutoCloseable.close() methods
                 Key: DRILL-4508
                 URL: https://issues.apache.org/jira/browse/DRILL-4508
             Project: Apache Drill
          Issue Type: Bug
          Components:  Server
    Affects Versions: 1.5.0
            Reporter: Venki Korukanti
            Priority: Minor
             Fix For: 1.7.0


If Drillbit fails to start (due to incorrect configuration or storage plugin information not found etc.), we end up calling close on various components such as WebServer, Drillbit etc. Some of these components may not have initialized and may have null values. Close() method is not checking for null values before reading them. One example is here:

{code}
java.lang.NullPointerException: null
        at org.apache.drill.exec.server.options.SystemOptionManager.close(SystemOptionManager.java:280) ~[drill-java-exec-1.6.0.jar:1.6.0]
        at org.apache.drill.exec.server.DrillbitContext.close(DrillbitContext.java:185) ~[drill-java-exec-1.6.0.jar:1.6.0]
        at org.apache.drill.exec.work.WorkManager.close(WorkManager.java:157) ~[drill-java-exec-1.6.0.jar:1.6.0]
        at org.apache.drill.common.AutoCloseables.close(AutoCloseables.java:76) ~[drill-common-1.6.0.jar:1.6.0]
        at org.apache.drill.common.AutoCloseables.close(AutoCloseables.java:64) ~[drill-common-1.6.0.jar:1.6.0]
        at org.apache.drill.exec.server.Drillbit.close(Drillbit.java:149) [drill-java-exec-1.6.0.jar:1.6.0]
        at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:283) [drill-java-exec-1.6.0.jar:1.6.0]
        at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:261) [drill-java-exec-1.6.0.jar:1.6.0]
        at org.apache.drill.exec.server.Drillbit.main(Drillbit.java:257) [drill-java-exec-1.6.0.jar:1.6.0]
{code}

This masks the actual error (incorrect configuration) and it is hard to know what went wrong.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)