Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5284 Roll-up of final fixes for managed sort
  3. DRILL-5262

NPE in managed external sort while spilling to disk

    XMLWordPrintableJSON

Details

    Description

      git.commit.id.abbrev=300e934

      The data (parquet) set used in the below query contains 1000 files which only contain a single row with one integer column and 1 large file ~37 MB. The query fails during spilling

      alter session set `planner.memory.max_query_memory_per_node` = 37127360;
      alter session set `planner.width.max_per_node` = 1;
      select count(*) from (select * from small_large_parquet order by col1 desc) d; 
      Error: RESOURCE ERROR: External Sort encountered an error while spilling to disk
      
      Fragment 2:0
      
      [Error Id: 50859d9e-373c-4a97-b270-09f1aae74e3b on qa-node183.qa.lab:31010] (state=,code=0)
      

      Exception from the logs

      2017-02-13 17:01:06,430 [275da989-3005-1c5f-a40c-2415e6d4e89f:frag:2:0] INFO  o.a.d.e.p.i.x.m.ExternalSortBatch - User Error Occurred: External Sort encountered an error while spilling to disk (null)
      org.apache.drill.common.exceptions.UserException: RESOURCE ERROR: External Sort encountered an error while spilling to disk
      
      
      [Error Id: 50859d9e-373c-4a97-b270-09f1aae74e3b ]
              at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:544) ~[drill-common-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.doMergeAndSpill(ExternalSortBatch.java:1336) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.mergeAndSpill(ExternalSortBatch.java:1266) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.consolidateBatches(ExternalSortBatch.java:1221) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.mergeSpilledRuns(ExternalSortBatch.java:1122) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.load(ExternalSortBatch.java:626) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.innerNext(ExternalSortBatch.java:506) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext(RemovingRecordBatch.java:93) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:104) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.SingleSenderCreator$SingleSenderRootExec.innerNext(SingleSenderCreator.java:92) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:94) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:232) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:226) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_92]
              at javax.security.auth.Subject.doAs(Subject.java:422) [na:1.8.0_92]
              at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1595) [hadoop-common-2.7.0-mapr-1607.jar:na]
              at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:226) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38) [drill-common-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_92]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_92]
              at java.lang.Thread.run(Thread.java:745) [na:1.8.0_92]
      Caused by: java.lang.NullPointerException: null
              at org.apache.drill.exec.physical.impl.xsort.managed.BatchGroup.getValueVectorId(BatchGroup.java:334) ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.CopierHolder$BatchMerger.constructHyperBatch(CopierHolder.java:282) ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.CopierHolder$BatchMerger.<init>(CopierHolder.java:205) ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.CopierHolder$BatchMerger.<init>(CopierHolder.java:190) ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.CopierHolder$BatchMerger.<init>(CopierHolder.java:171) ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.CopierHolder.startMerge(CopierHolder.java:71) ~[drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              at org.apache.drill.exec.physical.impl.xsort.managed.ExternalSortBatch.doMergeAndSpill(ExternalSortBatch.java:1290) [drill-java-exec-1.10.0-SNAPSHOT.jar:1.10.0-SNAPSHOT]
              ... 26 common frames omitted
      

      Log files and profiles attached

      Attachments

        1. 275da989-3005-1c5f-a40c-2415e6d4e89f.sys.drill
          96 kB
          Rahul Kumar Challapalli
        2. drillbit.log
          6.26 MB
          Rahul Kumar Challapalli
        3. drill-env.sh
          1 kB
          Rahul Kumar Challapalli
        4. drill-override.conf
          1 kB
          Rahul Kumar Challapalli

        Activity

          People

            paul-rogers Paul Rogers
            rkins Rahul Kumar Challapalli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: