title: Pyspark: org.apache.spark.memory.SparkOutOfMemoryError: Unable to acquire 116 bytes of memory, got 0
body: <pre><code>spark_config = {
  #     'spark.sql.crossJoin.enabled': 'true',
      'spark.driver.memory': '5g',
      'spark.driver.maxResultSize': '5g',
      'spark.executor.memory': '4g',
      'spark.executor.memoryOverhead': '2g',
      'spark.kryoserializer.buffer.max': 1024,
      'spark.executor.instances': 16,
      'spark.executor.cores': 3,
      'spark.sql.session.timeZone':'Asia/Shanghai',
      'spark.yarn.submit.waitAppCompletion':'false',
  }
  
  </code></pre>
  
  <p>I have a dataframe </p>
  
  <pre><code>df = join_all([df_feat, df23, df_s1, df_s2, df_s3, df_ar1, df_ses], on=['store_id', 'product_id', 'ds'], how='left')
  </code></pre>
  
  <p>df_s1, df23 is looks like 
  <a href="https://i.stack.imgur.com/EyeFw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EyeFw.png" alt="enter image description here"></a></p>
  
  <p>There is a big problem obstruct me moving to the next task.</p>
  
  <p><code>df.show() , df.toPandas() , df.count()</code> would fail if I filter by some condition, for example:</p>
  
  <p>Success : </p>
  
  <ul>
  <li>df.show(10, 0)</li>
  <li>df.filter('product_id="dace8cc8-d7cc-47f7-a74c-4c8aff1914d3"').show()</li>
  <li>df.filter('store_id="40a1c9d7-15dd-4947-aa54-66dbd7e9c724"').show()</li>
  </ul>
  
  <p>Error when filter by store_id and product_id</p>
  
  <ul>
  <li>df.filter('store_id="40a1c9d7-15dd-4947-aa54-66dbd7e9c724"').filter('product_id="dace8cc8-d7cc-47f7-a74c-4c8aff1914d3"').show()</li>
  </ul>
  
  <p>detail: </p>
  
  <pre><code>---------------------------------------------------------------------------
  Py4JJavaError                             Traceback (most recent call last)
  &lt;ipython-input-95-6b99148956e2&gt; in &lt;module&gt;
  ----&gt; 1 df.filter('store_id="40a1c9d7-15dd-4947-aa54-66dbd7e9c724"').filter('product_id="dace8cc8-d7cc-47f7-a74c-4c8aff1914d3"').show()
  
  /opt/cloudera/parcels/CDH/lib/spark/python/pyspark/sql/dataframe.py in show(self, n, truncate, vertical)
      376         """
      377         if isinstance(truncate, bool) and truncate:
  --&gt; 378             print(self._jdf.showString(n, 20, vertical))
      379         else:
      380             print(self._jdf.showString(n, int(truncate), vertical))
  
  /opt/cloudera/parcels/CDH/lib/spark/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py in __call__(self, *args)
     1255         answer = self.gateway_client.send_command(command)
     1256         return_value = get_return_value(
  -&gt; 1257             answer, self.gateway_client, self.target_id, self.name)
     1258 
     1259         for temp_arg in temp_args:
  
  /opt/cloudera/parcels/CDH/lib/spark/python/pyspark/sql/utils.py in deco(*a, **kw)
       61     def deco(*a, **kw):
       62         try:
  ---&gt; 63             return f(*a, **kw)
       64         except py4j.protocol.Py4JJavaError as e:
       65             s = e.java_exception.toString()
  
  /opt/cloudera/parcels/CDH/lib/spark/python/lib/py4j-0.10.7-src.zip/py4j/protocol.py in get_return_value(answer, gateway_client, target_id, name)
      326                 raise Py4JJavaError(
      327                     "An error occurred while calling {0}{1}{2}.\n".
  --&gt; 328                     format(target_id, ".", name), value)
      329             else:
      330                 raise Py4JError(
  
  Py4JJavaError: An error occurred while calling o3649.showString.
  : org.apache.spark.SparkException: Job aborted due to stage failure: Task 11 in stage 1167.0 failed 4 times, most recent failure: Lost task 11.3 in stage 1167.0 (TID 27777, dc45, executor 22): org.apache.spark.memory.SparkOutOfMemoryError: Unable to acquire 116 bytes of memory, got 0
      at org.apache.spark.memory.MemoryConsumer.throwOom(MemoryConsumer.java:157)
      at org.apache.spark.memory.MemoryConsumer.allocatePage(MemoryConsumer.java:119)
      at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.acquireNewPageIfNecessary(UnsafeExternalSorter.java:383)
      at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.insertRecord(UnsafeExternalSorter.java:407)
      at org.apache.spark.sql.execution.UnsafeExternalRowSorter.insertRow(UnsafeExternalRowSorter.java:135)
      at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage212.sort_addToSorter_0$(Unknown Source)
      at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage212.processNext(Unknown Source)
      at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
      at org.apache.spark.sql.execution.WholeStageCodegenExec$$anonfun$11$$anon$1.hasNext(WholeStageCodegenExec.scala:624)
      at org.apache.spark.sql.execution.RowIteratorFromScala.advanceNext(RowIterator.scala:83)
      at org.apache.spark.sql.execution.joins.SortMergeJoinScanner.advancedBufferedToRowWithNullFreeJoinKey(SortMergeJoinExec.scala:811)
      at org.apache.spark.sql.execution.joins.SortMergeJoinScanner.&lt;init&gt;(SortMergeJoinExec.scala:686)
      at org.apache.spark.sql.execution.joins.SortMergeJoinExec$$anonfun$doExecute$1.apply(SortMergeJoinExec.scala:213)
      at org.apache.spark.sql.execution.joins.SortMergeJoinExec$$anonfun$doExecute$1.apply(SortMergeJoinExec.scala:150)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD$$anonfun$7.apply(RDD.scala:337)
      at org.apache.spark.rdd.RDD$$anonfun$7.apply(RDD.scala:335)
      at org.apache.spark.storage.BlockManager$$anonfun$doPutIterator$1.apply(BlockManager.scala:1176)
      at org.apache.spark.storage.BlockManager$$anonfun$doPutIterator$1.apply(BlockManager.scala:1167)
      at org.apache.spark.storage.BlockManager.doPut(BlockManager.scala:1102)
      at org.apache.spark.storage.BlockManager.doPutIterator(BlockManager.scala:1167)
      at org.apache.spark.storage.BlockManager.getOrElseUpdate(BlockManager.scala:893)
      at org.apache.spark.rdd.RDD.getOrCompute(RDD.scala:335)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:286)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
      at org.apache.spark.scheduler.Task.run(Task.scala:121)
      at org.apache.spark.executor.Executor$TaskRunner$$anonfun$11.apply(Executor.scala:407)
      at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1363)
      at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:413)
      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)
  
  Driver stacktrace:
      at org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$failJobAndIndependentStages(DAGScheduler.scala:1890)
      at org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1878)
      at org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1877)
      at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
      at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
      at org.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:1877)
      at org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:929)
      at org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:929)
      at scala.Option.foreach(Option.scala:257)
      at org.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:929)
      at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:2111)
      at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2060)
      at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2049)
      at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:49)
      at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:740)
      at org.apache.spark.SparkContext.runJob(SparkContext.scala:2081)
      at org.apache.spark.SparkContext.runJob(SparkContext.scala:2102)
      at org.apache.spark.SparkContext.runJob(SparkContext.scala:2121)
      at org.apache.spark.sql.execution.SparkPlan.executeTake(SparkPlan.scala:365)
      at org.apache.spark.sql.execution.CollectLimitExec.executeCollect(limit.scala:38)
      at org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$collectFromPlan(Dataset.scala:3383)
      at org.apache.spark.sql.Dataset$$anonfun$head$1.apply(Dataset.scala:2544)
      at org.apache.spark.sql.Dataset$$anonfun$head$1.apply(Dataset.scala:2544)
      at org.apache.spark.sql.Dataset$$anonfun$53.apply(Dataset.scala:3364)
      at org.apache.spark.sql.execution.SQLExecution$$anonfun$withNewExecutionId$1.apply(SQLExecution.scala:78)
      at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:125)
      at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:73)
      at org.apache.spark.sql.Dataset.withAction(Dataset.scala:3363)
      at org.apache.spark.sql.Dataset.head(Dataset.scala:2544)
      at org.apache.spark.sql.Dataset.take(Dataset.scala:2758)
      at org.apache.spark.sql.Dataset.getRows(Dataset.scala:254)
      at org.apache.spark.sql.Dataset.showString(Dataset.scala:291)
      at sun.reflect.GeneratedMethodAccessor146.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
      at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
      at py4j.Gateway.invoke(Gateway.java:282)
      at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
      at py4j.commands.CallCommand.execute(CallCommand.java:79)
      at py4j.GatewayConnection.run(GatewayConnection.java:238)
      at java.lang.Thread.run(Thread.java:748)
  Caused by: org.apache.spark.memory.SparkOutOfMemoryError: Unable to acquire 116 bytes of memory, got 0
      at org.apache.spark.memory.MemoryConsumer.throwOom(MemoryConsumer.java:157)
      at org.apache.spark.memory.MemoryConsumer.allocatePage(MemoryConsumer.java:119)
      at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.acquireNewPageIfNecessary(UnsafeExternalSorter.java:383)
      at org.apache.spark.util.collection.unsafe.sort.UnsafeExternalSorter.insertRecord(UnsafeExternalSorter.java:407)
      at org.apache.spark.sql.execution.UnsafeExternalRowSorter.insertRow(UnsafeExternalRowSorter.java:135)
      at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage212.sort_addToSorter_0$(Unknown Source)
      at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage212.processNext(Unknown Source)
      at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
      at org.apache.spark.sql.execution.WholeStageCodegenExec$$anonfun$11$$anon$1.hasNext(WholeStageCodegenExec.scala:624)
      at org.apache.spark.sql.execution.RowIteratorFromScala.advanceNext(RowIterator.scala:83)
      at org.apache.spark.sql.execution.joins.SortMergeJoinScanner.advancedBufferedToRowWithNullFreeJoinKey(SortMergeJoinExec.scala:811)
      at org.apache.spark.sql.execution.joins.SortMergeJoinScanner.&lt;init&gt;(SortMergeJoinExec.scala:686)
      at org.apache.spark.sql.execution.joins.SortMergeJoinExec$$anonfun$doExecute$1.apply(SortMergeJoinExec.scala:213)
      at org.apache.spark.sql.execution.joins.SortMergeJoinExec$$anonfun$doExecute$1.apply(SortMergeJoinExec.scala:150)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.ZippedPartitionsRDD2.compute(ZippedPartitionsRDD.scala:89)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD$$anonfun$7.apply(RDD.scala:337)
      at org.apache.spark.rdd.RDD$$anonfun$7.apply(RDD.scala:335)
      at org.apache.spark.storage.BlockManager$$anonfun$doPutIterator$1.apply(BlockManager.scala:1176)
      at org.apache.spark.storage.BlockManager$$anonfun$doPutIterator$1.apply(BlockManager.scala:1167)
      at org.apache.spark.storage.BlockManager.doPut(BlockManager.scala:1102)
      at org.apache.spark.storage.BlockManager.doPutIterator(BlockManager.scala:1167)
      at org.apache.spark.storage.BlockManager.getOrElseUpdate(BlockManager.scala:893)
      at org.apache.spark.rdd.RDD.getOrCompute(RDD.scala:335)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:286)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
      at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
      at org.apache.spark.scheduler.Task.run(Task.scala:121)
      at org.apache.spark.executor.Executor$TaskRunner$$anonfun$11.apply(Executor.scala:407)
      at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1363)
      at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:413)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      ... 1 more
  
  </code></pre>
  
  <p>Then I tried fitler first, however this successed ...</p>
  
  <pre><code>df = join_all([
  df_feat.filter('store_id="40a1c9d7-15dd-4947-aa54-66dbd7e9c724"').filter('product_id="dace8cc8-d7cc-47f7-a74c-4c8aff1914d3"'),
  df23.filter('store_id="40a1c9d7-15dd-4947-aa54-66dbd7e9c724"').filter('product_id="dace8cc8-d7cc-47f7-a74c-4c8aff1914d3"'),
  df_s1.filter('store_id="40a1c9d7-15dd-4947-aa54-66dbd7e9c724"').filter('product_id="dace8cc8-d7cc-47f7-a74c-4c8aff1914d3"'),
  df_s2.filter('store_id="40a1c9d7-15dd-4947-aa54-66dbd7e9c724"').filter('product_id="dace8cc8-d7cc-47f7-a74c-4c8aff1914d3"'),
  df_s3.filter('store_id="40a1c9d7-15dd-4947-aa54-66dbd7e9c724"').filter('product_id="dace8cc8-d7cc-47f7-a74c-4c8aff1914d3"'),
  df_ar1.filter('store_id="40a1c9d7-15dd-4947-aa54-66dbd7e9c724"').filter('product_id="dace8cc8-d7cc-47f7-a74c-4c8aff1914d3"'),
  df_ses.filter('store_id="40a1c9d7-15dd-4947-aa54-66dbd7e9c724"').filter('product_id="dace8cc8-d7cc-47f7-a74c-4c8aff1914d3"'),
  ], on=['store_id', 'product_id', 'ds'], how='left')
  
  
  df.filter('store_id="40a1c9d7-15dd-4947-aa54-66dbd7e9c724"').filter('product_id="dace8cc8-d7cc-47f7-a74c-4c8aff1914d3"').show()
  
  </code></pre>
  
  <p>spark webui</p>
  
  <p><a href="https://i.stack.imgur.com/ppvRl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ppvRl.png" alt="enter image description here"></a></p>
  
  <h2><a href="https://i.stack.imgur.com/cgF1Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cgF1Y.png" alt="enter image description here"></a></h2>
  
  <p>I have completely no idea where this error come from , this error doesn't make sence . How do I solve this problem?</p>