[jboss-jira] [JBoss JIRA] Resolved: (JBCACHE-1325) ClassLoader and probable memory leak in ReusableObjectInputStream

Manik Surtani (JIRA) jira-events at lists.jboss.org
Fri Apr 11 07:22:54 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBCACHE-1325?page=all ]

Manik Surtani resolved JBCACHE-1325.
------------------------------------

    Resolution: Done

Reverting back to JDK streams

> ClassLoader and probable memory leak in ReusableObjectInputStream
> -----------------------------------------------------------------
>
>                 Key: JBCACHE-1325
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-1325
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.1.0.GA
>            Reporter: Brian Stansberry
>         Assigned To: Manik Surtani
>            Priority: Critical
>             Fix For: 2.1.1.GA
>
>
> java.io.ObjectInputStream maintains an internal table of objects it has deserialized. If you don't close the stream (i.e. try to reuse it) that table doesn't get cleared. A classloader leak analysis I'm doing shows this as a cause of a classloader leak; looking at the java.io.ObjectInputStream code's use of its HandleTable inner class makes me think not closing the stream is very likely a memory leak as well.
> Reference chain leading to a leaked classloader:
> !--BaseClassLoader at 7441b1fd{vfsfile:/home/bes/dev/jboss/trunk/testsuite/output/lib/cluster-clleak-field.war}
> !--!--ClassLoaderReference @ class org.jboss.test.cluster.web.aop.Person
> !--!--!--arrayRef [Ljava.lang.Object;[23] id=@1804215529
> !--!--!--!--FieldReference java.lang.Object[] java.io.ObjectInputStream$HandleTable.entries=java.io.ObjectInputStream$HandleTable at 254ca71
> !--!--!--!--!--FieldReference UndefinedField at org.jboss.cache.marshall.io.ReusableObjectInputStream@3274ae84=org.jboss.cache.marshall.io.ReusableObjectInputStream at 3274ae84
> !--!--!--!--!--!--FieldReference volatile java.lang.Object java.util.concurrent.LinkedBlockingQueue$Node.item=java.util.concurrent.LinkedBlockingQueue$Node at 185d3a64
> !--!--!--!--!--!--!--FieldReference private transient java.util.concurrent.LinkedBlockingQueue$Node java.util.concurrent.LinkedBlockingQueue.last=[org.jboss.cache.marshall.io.ReusableObjectInputStream at 59e8f902, org.jboss.cache.marshall.io.ReusableObjectInputStream at 4e34206b, org.jboss.cache.marshall.io.ReusableObjectInputStream at 403c78e9, org.jboss.cache.marshall.io.ReusableObjectInputStream at 422629f1, org.jboss.cache.marshall.io.ReusableObjectInputStream at 578baf24, org.jboss.cache.marshall.io.ReusableObjectInputStream at 13979163, org.jboss.cache.marshall.io.ReusableObjectInputStream at 43ca04a1, org.jboss.cache.marshall.io.ReusableObjectInputStream at 3f608cc, org.jboss.cache.marshall.io.ReusableObjectInputStream at dbb8b1c, org.jboss.cache.marshall.io.ReusableObjectInputStream at 13a9e24f, org.jboss.cache.marshall.io.ReusableObjectInputStream at 7648ba9e, org.jboss.cache.marshall.io.ReusableObjectInputStream at 20d417bd, org.jboss.cache.marshall.io.ReusableObjectInputStream at 44628a21, org.jboss.cache.marshall.io.ReusableObjectInputStream at 215a9f9a, org.jboss.cache.marshall.io.ReusableObjectInputStream at 44a44891, org.jboss.cache.marshall.io.ReusableObjectInputStream at 7d984acb, org.jboss.cache.marshall.io.ReusableObjectInputStream at 195695d8, org.jboss.cache.marshall.io.ReusableObjectInputStream at 387a4e7, org.jboss.cache.marshall.io.ReusableObjectInputStream at 3e5b3b80, org.jboss.cache.marshall.io.ReusableObjectInputStream at 579f707b, org.jboss.cache.marshall.io.ReusableObjectInputStream at 2491c82e, org.jboss.cache.marshall.io.ReusableObjectInputStream at 5eed56c3, org.jboss.cache.marshall.io.ReusableObjectInputStream at 2fdb4ce5, org.jboss.cache.marshall.io.ReusableObjectInputStream at 669566ee, org.jboss.cache.marshall.io.ReusableObjectInputStream at 5a98c7df, org.jboss.cache.marshall.io.ReusableObjectInputStream at 646a2ff0, org.jboss.cache.marshall.io.ReusableObjectInputStream at 77716910, org.jboss.cache.marshall.io.ReusableObjectInputStream at 36a8d6b3, org.jboss.cache.marshall.io.ReusableObjectInputStream at 6a79dce, org.jboss.cache.marshall.io.ReusableObjectInputStream at 666942cb, org.jboss.cache.marshall.io.ReusableObjectInputStream at 8a051f4, org.jboss.cache.marshall.io.ReusableObjectInputStream at 55646e98, org.jboss.cache.marshall.io.ReusableObjectInputStream at 3498e8f4, org.jboss.cache.marshall.io.ReusableObjectInputStream at 22e60626, org.jboss.cache.marshall.io.ReusableObjectInputStream at 2b9dbab0, org.jboss.cache.marshall.io.ReusableObjectInputStream at 4b8f2f, org.jboss.cache.marshall.io.ReusableObjectInputStream at 60a556cf, org.jboss.cache.marshall.io.ReusableObjectInputStream at 6e6619b, org.jboss.cache.marshall.io.ReusableObjectInputStream at 7f120aa6, org.jboss.cache.marshall.io.ReusableObjectInputStream at 79795976, org.jboss.cache.marshall.io.ReusableObjectInputStream at de09048, org.jboss.cache.marshall.io.ReusableObjectInputStream at 12206e16, org.jboss.cache.marshall.io.ReusableObjectInputStream at f1b6fa6, org.jboss.cache.marshall.io.ReusableObjectInputStream at 523f0309, org.jboss.cache.marshall.io.ReusableObjectInputStream at 26e06e0e, org.jboss.cache.marshall.io.ReusableObjectInputStream at 58596d12, org.jboss.cache.marshall.io.ReusableObjectInputStream at 5707e60e, org.jboss.cache.marshall.io.ReusableObjectInputStream at 4790cdc5, org.jboss.cache.marshall.io.ReusableObjectInputStream at 73b56537, org.jboss.cache.marshall.io.ReusableObjectInputStream at 3274ae84]
> !--!--!--!--!--!--!--!--FieldReference java.util.concurrent.BlockingQueue org.jboss.cache.marshall.io.ObjectStreamPool.inputStreams=org.jboss.cache.marshall.io.ObjectStreamPool at 21e513fb
> !--!--!--!--!--!--!--!--!--FieldReference org.jboss.cache.marshall.io.ObjectStreamPool org.jboss.cache.marshall.VersionAwareMarshaller.pool=org.jboss.cache.marshall.VersionAwareMarshaller at 37760a63 

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

       




More information about the jboss-jira mailing list