[ 
https://issues.apache.org/jira/browse/HIVE-7021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14333428#comment-14333428
 ] 

Naveen Gangam commented on HIVE-7021:
-------------------------------------

I filed this issue for leaks observed for specific set of classes as reported 
by a customer using a preliminary patch for HIVE-4629. If there are other 
leaks, I think it makes sense to make this sort of an umbrella bug and track 
each leak separately in a jira but link them to this jira. So we would have one 
place to find all relevant leaks.
The reason this fix was not committed back when I uploaded the patch was 
because HIVE-4629 had not been committed then. It was built on a patch made 
available and I had to hold off on committing this dependent fix until 
HIVE-4629 re-work was complete.
If you could please add your testcases that cause memory leak, it would help in 
investigating the issue. Thanks

> HiveServer2 memory leak on failed queries
> -----------------------------------------
>
>                 Key: HIVE-7021
>                 URL: https://issues.apache.org/jira/browse/HIVE-7021
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>    Affects Versions: 0.12.0
>            Reporter: Naveen Gangam
>            Assignee: Naveen Gangam
>         Attachments: HIVE-4629+HIVE-7021.1.patch, HIVE-7021.1.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to