Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-22517

NullPointerException in ShuffleExternalSorter.spill()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.2.0
    • None
    • Spark Core
    • None

    Description

      I see a NullPointerException during sorting with the following stacktrace:

      17/11/13 15:02:56 ERROR Executor: Exception in task 138.0 in stage 9.0 (TID 13497)
      java.lang.NullPointerException
              at org.apache.spark.memory.TaskMemoryManager.getPage(TaskMemoryManager.java:383)
              at org.apache.spark.shuffle.sort.ShuffleExternalSorter.writeSortedFile(ShuffleExternalSorter.java:193)
              at org.apache.spark.shuffle.sort.ShuffleExternalSorter.spill(ShuffleExternalSorter.java:254)
              at org.apache.spark.memory.TaskMemoryManager.acquireExecutionMemory(TaskMemoryManager.java:203)
              at org.apache.spark.memory.TaskMemoryManager.allocatePage(TaskMemoryManager.java:281)
              at org.apache.spark.memory.MemoryConsumer.allocateArray(MemoryConsumer.java:90)
              at org.apache.spark.shuffle.sort.ShuffleInMemorySorter.reset(ShuffleInMemorySorter.java:100)
              at org.apache.spark.shuffle.sort.ShuffleExternalSorter.spill(ShuffleExternalSorter.java:256)
              at org.apache.spark.memory.TaskMemoryManager.acquireExecutionMemory(TaskMemoryManager.java:203)
              at org.apache.spark.memory.TaskMemoryManager.allocatePage(TaskMemoryManager.java:281)
              at org.apache.spark.memory.MemoryConsumer.allocateArray(MemoryConsumer.java:90)
              at org.apache.spark.shuffle.sort.ShuffleExternalSorter.growPointerArrayIfNecessary(ShuffleExternalSorter.java:328)
              at org.apache.spark.shuffle.sort.ShuffleExternalSorter.insertRecord(ShuffleExternalSorter.java:379)
              at org.apache.spark.shuffle.sort.UnsafeShuffleWriter.insertRecordIntoSorter(UnsafeShuffleWriter.java:246)
              at org.apache.spark.shuffle.sort.UnsafeShuffleWriter.write(UnsafeShuffleWriter.java:167)
              at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:96)
              at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:53)
              at org.apache.spark.scheduler.Task.run(Task.scala:108)
              at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:335)
              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)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              asmaier Andreas Maier
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: