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

Python/Pandas UDF right after off-heap vectorized reader could cause executor crash.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.7, 3.0.1
    • Fix Version/s: 2.4.8, 3.0.2, 3.1.0
    • Component/s: PySpark, SQL
    • Labels:
      None

      Description

      Python/Pandas UDF right after off-heap vectorized reader could cause executor crash.

      E.g.,:

      spark.range(0, 100000, 1, 1).write.parquet(path)
      
      spark.conf.set("spark.sql.columnVector.offheap.enabled", True)
      
      def f(x):
          return 0
      
      fUdf = udf(f, LongType())
      
      spark.read.parquet(path).select(fUdf('id')).head()
      

      This is because, the Python evaluation consumes the parent iterator in a separate thread and it consumes more data from the parent even after the task ends and the parent is closed. If an off-heap column vector exists in the parent iterator, it could cause segmentation fault which crashes the executor.

        Attachments

          Activity

            People

            • Assignee:
              ueshin Takuya Ueshin
              Reporter:
              ueshin Takuya Ueshin
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: