You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Yida Wu (Jira)" <ji...@apache.org> on 2022/04/03 04:38:00 UTC

[jira] [Resolved] (IMPALA-11176) Memory leak in ClientCacheHelper

     [ https://issues.apache.org/jira/browse/IMPALA-11176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yida Wu resolved IMPALA-11176.
------------------------------
    Resolution: Fixed

> 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)