Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-7021

HiveServer2 memory leak on failed queries

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.12.0
    • Fix Version/s: None
    • Component/s: HiveServer2
    • Labels:
      None

      Description

      The number of the following objects keeps increasing if a query causes an exception:
      org.apache.hive.service.cli.HandleIdentifier
      org.apache.hive.service.cli.OperationHandle
      org.apache.hive.service.cli.log.LinkedStringBuffer
      org.apache.hive.service.cli.log.OperationLog

      The leak can be observed using a JDBCClient that runs something like this
      connection = DriverManager.getConnection("jdbc:hive2://" + hostname + ":10000/default", "", "");
      statement = connection.createStatement();
      statement.execute("CREATE TEMPORARY FUNCTION dummy_function AS 'dummy.class.name'");

      The above SQL will fail if HS2 cannot load "dummy.class.name" class. Each iteration of such query will result in +1 increase in instance count for the classes mentioned above.

      This will eventually cause OOM in the HS2 service.

        Attachments

        1. HIVE-4629+HIVE-7021.1.patch
          124 kB
          Naveen Gangam
        2. HIVE-7021.1.patch
          4 kB
          Naveen Gangam

          Issue Links

            Activity

              People

              • Assignee:
                ngangam Naveen Gangam
                Reporter:
                ngangam Naveen Gangam
              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: