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

ASF subversion and git services commented on IMPALA-11176:
----------------------------------------------------------

Commit 38062b4ec0cfdf28474c84d136718510fe712437 in impala's branch 
refs/heads/master from Yida Wu
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=38062b4 ]

IMPALA-11196 Fix a ClientCacheTest flaky test

The memory leak detection testcase is flaky, in local environment,
it could fail over 10 times out of 100. The fix changes to use
the ordinary ADD_BE_TEST to replace ADD_UNIFIED_BE_LSAN_TEST,
there could be some elements in the unified test which affect the
process vm size occasionally.

After the fix, the testcase ran 5000 times without a failure, and
can still catch the memory leak issue in IMPALA-11176.

Tests:
Ran Core Tests in DEBUG/RELEASE/ASAN build.
Ran consecutive 5000 times of the testcase and all passed.

Change-Id: I6ee273db4f9b0a518b6438df6982325f5ad1fa0c
Reviewed-on: http://gerrit.cloudera.org:8080/18363
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> Memory leak in ClientCacheHelper
> --------------------------------
>
>                 Key: IMPALA-11176
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11176
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 4.0.0, Impala 3.4.0
>            Reporter: Yida Wu
>            Assignee: Yida Wu
>            Priority: Critical
>             Fix For: Impala 4.1.0
>
>
> ClientCacheHelper::CreateClient uses a function pointer "factory_method" to 
> create a new ThriftClientImpl object and store it in a share pointer of type 
> ThriftClientImpl.
> However, in the implementation of the function pointer, which uses 
> ClientCache::MakeClient, it creates a derived object of ThriftClientImpl and 
> return the pointer as the base object pointer ThriftClientImpl*. When the 
> ClientCacheHelper::CreateClient uses the returned pointer to create a base 
> shared pointer, it can't recognize that the pointer is from a derived object, 
> therefore something goes wrong that the shared pointer couldn't release all 
> the memory occupied by the derived object.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to