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

Memory leak in Spark Thrift Server

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.0.2, 2.2.1
    • 2.3.0
    • SQL
    • None

    Description

      1. Start HiveThriftServer2.
      2. Connect to thriftserver through beeline.
      3. Close the beeline.
      4. repeat step2 and step 3 for several times, which caused the leak of Memory.

      we found there are many directories never be dropped under the path

      hive.exec.local.scratchdir
      

      and

      hive.exec.scratchdir
      

      , as we know the scratchdir has been added to deleteOnExit when it be created. So it means that the cache size of FileSystem deleteOnExit will keep increasing until JVM terminated.

      In addition, we use

      jmap -histo:live [PID]
      

      to printout the size of objects in HiveThriftServer2 Process, we can find the object "org.apache.spark.sql.hive.client.HiveClientImpl" and "org.apache.hadoop.hive.ql.session.SessionState" keep increasing even though we closed all the beeline connections, which caused the leak of Memory.

      Attachments

        Issue Links

          Activity

            People

              zuo.tingbing9 zuotingbing
              zuo.tingbing9 zuotingbing
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: