[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6219) Memory leak with Infinispan cache

Sergey Astakhov (JIRA) noreply at atlassian.com
Mon May 16 12:05:29 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42327#action_42327 ] 

Sergey Astakhov commented on HHH-6219:
--------------------------------------

After adding clearing refs in PendingPutMap (class org.hibernate.cache.infinispan.accessPutFromLoadValidator) in method invalidate(), the memory leak seems to be gone. But I didn't sure that this is right way to fix:

{code}
      public void invalidate() {
         if (singlePendingPut != null) {
            singlePendingPut.completed = true;
> singlePendingPut = null;
         } else if (fullMap != null) {
            for (PendingPut pp : fullMap.values()) {
               pp.completed = true;
            }
> fullMap = null;
         }
      }
{code}


> Memory leak with Infinispan cache
> ---------------------------------
>
>                 Key: HHH-6219
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6219
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: caching (L2)
>    Affects Versions: 3.6.4
>         Environment: JBoss 6.1, Hibernate 3.6.4.Final, Infinispan 4.2.1.Final
>            Reporter: Sergey Astakhov
>            Priority: Blocker
>
> We have problem with an memory leak in our application when setup Hibernate with use Infinispan as L2 cache. After investigation of memory dumps, looks like all memory is consumed by links, comming from PutFromLoadValidator objects (by pendingPuts map collections). The PendingPutMap objects holding references to the PendingPut objects with the state 'completed=true'. The state 'completed=true' is comming from invalidateKey/invalidateRegion calls, but I didn't find any removals of the objects in this state from PendingPutMap collections - may be this is cause of the leak.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list