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

Dangling threads when reading parquet files in local mode

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.1, 2.2.0
    • 2.1.2, 2.2.0
    • Input/Output, SQL
    • None

    Description

      On each call to spark.read.parquet, a new ForkJoinPool is created. One of the threads in the pool is kept in the WAITING state, and never stopped, which leads to unbounded growth in number of threads.

      This behavior is a regression from v2.1.0.

      Reproducible example:

      val spark = SparkSession
        .builder()
        .appName("test")
        .master("local")
        .getOrCreate()
      while(true) {
        spark.read.parquet("/path/to/file")
        Thread.sleep(5000)
      }
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            viirya L. C. Hsieh
            pnpritchard Nick Pritchard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment