Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2510

Unclosed allocators detected in Java shutdown hook

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7.0
    • 0.8.0
    • Execution - Flow
    • None

    Description

      We're seeing errors in logs that look like this:

      Exception in thread "Drillbit-ShutdownHook#1" 
      java.lang.IllegalStateException: Failure while trying to close allocator: Child level allocators not closed. Stack trace:
                      java.lang.Thread.getStackTrace(Thread.java:1589)
                      org.apache.drill.exec.memory.TopLevelAllocator.getChildAllocator(TopLevelAllocator.java:126)
                      org.apache.drill.exec.ops.FragmentContext.<init>(FragmentContext.java:111)
                      org.apache.drill.exec.work.foreman.Foreman.setupRootFragment(Foreman.java:763)
                      org.apache.drill.exec.work.foreman.Foreman.runPhysicalPlan(Foreman.java:349)
                      org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:737)
                      org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:202)
                      org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
                      java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
                      java.lang.Thread.run(Thread.java:745)
      
              at org.apache.drill.exec.memory.TopLevelAllocator.close(TopLevelAllocator.java:159)
              at org.apache.drill.exec.server.BootStrapContext.close(BootStrapContext.java:75)
              at com.google.common.io.Closeables.close(Closeables.java:77)
              at com.google.common.io.Closeables.closeQuietly(Closeables.java:108)
              at org.apache.drill.exec.server.Drillbit.close(Drillbit.java:267)
              at org.apache.drill.exec.server.Drillbit$ShutdownThread.run(Drillbit.java:285)
      

      This might be a result of sharing the jvm across test classes during mvn install runs, but it might also be a new problem, because some examples can be seen in individual tests run from IDEs.

      Investigate.

      Attachments

        1. DRILL-2510.2.patch.txt
          16 kB
          Chris Westin
        2. DRILL-2510.1.patch.txt
          15 kB
          Chris Westin

        Issue Links

          Activity

            People

              jnadeau Jacques Nadeau
              cwestin Chris Westin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: