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

ASF subversion and git services commented on GEODE-5292:
--------------------------------------------------------

Commit 69c871091d570312264c4e7e5060109cab4c8d64 in geode's branch 
refs/heads/develop from Bradford Boyle
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=69c8710 ]

GEODE-5292: Fix memory leak for off heap regions with overflow

For a region that has been configured with off-heap storage and overflow
to disk, memory can be leaked if

- region clear
- region destroy
- region replace

all happen concurrently. The root cause appears to be region clear
modifying entries for values stored on disk without synchronizing the
entries. This prevents replace from freeing the off-heap memory for the
new value when the replace fails because the region is being destroyed.

This commit adds an integration test that uses spies on a region entry
to trigger the concurrent events during a replace operation and checks
for orphaned off-heap memory.

The proposed fix is to not modify the region entries on disk while
performing a clear operation.

Signed-off-by: Dan Smith <dsm...@pivotal.io>

> Replace with concurrent clear and destroy leaks off heap memory
> ---------------------------------------------------------------
>
>                 Key: GEODE-5292
>                 URL: https://issues.apache.org/jira/browse/GEODE-5292
>             Project: Geode
>          Issue Type: Bug
>          Components: regions
>            Reporter: Dan Smith
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.8.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> For a region that has been configured with off-heap storage and overflow to 
> disk, memory can be leaked if
>  * region clear
>  * region destroy 
>  * region replace
> all happen concurrently. The root cause appears to be region clear modifying 
> entries for values stored on disk without synchronizing the entries. This 
> prevents replace from freeing the off-heap memory for the new value when the 
> replace fails because the region is being destroyed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to