[jbosstools-issues] [JBoss JIRA] (JBIDE-11539) Memory leak in org.jboss.tools.jst.web.kb

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Tue Apr 24 13:28:17 EDT 2012


    [ https://issues.jboss.org/browse/JBIDE-11539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12687318#comment-12687318 ] 

Viacheslav Kabanovich commented on JBIDE-11539:
-----------------------------------------------

I have created an xml inside Java source folder, with file size of 40Kb, containing 2000 EL instances like #{beanName.propertyName}. I made sure that if I use wrong property name, like #{beanName.wrongpropertyName}, validator puts error marker to it. Then I created 200 copies of the file, rebuilt the project, and checked increase in memory used by Java . It amounted to 500Mb. The map contained just these 200 entries, no memory leak, just heavy memory load. It seems clear what takes most memory - it is JobSafeStructuredDocument objects, referenced by cached context objects.

Sigi, you can make certain that your xml files are monitored by KB builder by putting EL #{beanName.wrongpropertyName} into a file, where 'beanName' should be a bean name available in the project. If you get an error marker '"wrongpropertyName" cannot be resolved'. 

Also, could you please check by your dump that most of 485,306,072 bytes, accumulated in HashMap you mentioned, are taken by JobSafeStructuredDocument and BasicStructuredDocument objects. If that is so, probably we should not keep reference to the document, but request it every time we need it; or if it deteriorates performance, elaborate an algorithm, that keeps some documents, while they are heavily used, and disposes them, when they are not in much demand.
                
> Memory leak in org.jboss.tools.jst.web.kb
> -----------------------------------------
>
>                 Key: JBIDE-11539
>                 URL: https://issues.jboss.org/browse/JBIDE-11539
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: common/jst/core
>    Affects Versions: 3.3.0.Beta2
>         Environment: Windows XP
> Eclipse 3.7
> JBoss Tools(over marketplace, last update 4/11/2012
>            Reporter: Sigi Kiermayer
>            Assignee: Viacheslav Kabanovich
>            Priority: Critical
>             Fix For: 3.3.0.Beta3
>
>
> I have huge memory problems and two days ago i made a heap dump and got following information:
> The classloader/component "org.jboss.tools.jst.web.kb" occupies 485,306,072 (76.24%) bytes. The memory is accumulated in one instance of "java.util.HashMap$Entry[]" loaded by "<system class loader>".
> Keywords
> java.util.HashMap$Entry[]
> org.jboss.tools.jst.web.kb
> It is full of HashMapentries:
> key: org.eclipse.core.internal.resources.File
> value: org.jboss.tools.jst.web.kb.internal.XmlContextImpl
> I have the memory dump here. i can provide it if you think it is a reproducible bug or you have an idea how that can happen.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list