You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Blake Bender (Jira)" <ji...@apache.org> on 2019/11/27 16:57:00 UTC

[jira] [Closed] (GEODE-7299) Memory leak in PdxInstanceImpl::updatePdxStream

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

Blake Bender closed GEODE-7299.
-------------------------------

> Memory leak in PdxInstanceImpl::updatePdxStream
> -----------------------------------------------
>
>                 Key: GEODE-7299
>                 URL: https://issues.apache.org/jira/browse/GEODE-7299
>             Project: Geode
>          Issue Type: Bug
>          Components: native client
>            Reporter: Blake Bender
>            Priority: Major
>             Fix For: 1.12.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The `PdxInstanceImpl::updatePdxStream` method assigns the result of `DataInput::getBufferCopy` to its `m_buffer` member variable, but `m_buffer` is deleted by `PdxInstanceImpl` in its destructor, implying that `PdxInstanceImpl` owns the pointer, which means, in this case, that the existing `m_buffer`, if there is one, is leaked in this call.  We discovered that `updatePdxStream` is called on every put of a Pdx type, so in a tight loop with a lot of puts we are potentially leaking _a lot_ of memory.
>  
> Repro steps:
> Run the soon-to-be-implemented `LeakPdxMemory` test in the NC integration test suite.  Test will attempt to do a large number of puts of a large Pdx object, and look for an out of memory exception.
>  
> Expected result:
> Test passes
>  
> Actual result:
> Test fails.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)