You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Zhi Tang (Jira)" <ji...@apache.org> on 2023/04/26 12:35:00 UTC

[jira] [Comment Edited] (IMPALA-12102) The JniUtil::GetJniExceptionMsg() method has the risk of memory leakage when handling JNI exceptions

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

Zhi Tang edited comment on IMPALA-12102 at 4/26/23 12:34 PM:
-------------------------------------------------------------

The problem can be reproduced in the following ways:

  1、Create a udf implemented in java and name it test_udf. Here is its implementation:
{code:java}
public class testUdf extends UDF {
  public String evaluate() throws Exception {
    throw new NullPointerException();
  }
} {code}
  2、Trigger a query to continuously execute test_udf,such as
{code:java}
set num_nodes=1;
select test_udf() from tpch.lineitem;{code}
3、After some time, the current  coordinator will hang due to JVM memory overflow.

 

 

 

 

 


was (Author: tangzhi):
The problem can be reproduced in the following ways:

  1、Create a udf implemented in java and name it test_udf. Here is its implementation:

 
{code:java}
public class testUdf extends UDF {
  public String evaluate() throws Exception {
    throw new NullPointerException();
  }
} {code}
 

  2、Trigger a query to continuously execute test_udf,such as

 
{code:java}
set num_nodes=1;
select test_udf() from tpch.lineitem;{code}
3、After some time, the current  coordinator will hang due to JVM memory overflow.

 

 

 

 

 

> The JniUtil::GetJniExceptionMsg() method has the risk of memory leakage when handling JNI exceptions
> ----------------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-12102
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12102
>             Project: IMPALA
>          Issue Type: Bug
>    Affects Versions: Impala 4.1.2
>            Reporter: Zhi Tang
>            Assignee: Zhi Tang
>            Priority: Major
>
> When the JniUtil::GetJniExceptionMsg() method handles the JNI exceptions, the reference to the jstring object is not released in time, which may cause a memory leak problem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org