ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ales Nosek (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IVY-1332) OutOfMemoryError: PermGen caused by IvyContext leaked when building subprojects
Date Sun, 22 Jan 2012 21:18:40 GMT

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

Ales Nosek updated IVY-1332:
----------------------------

    Attachment: ivy_eclipse_memory_analyzer.png
                build-caller.xml
                build.xml

Start this test case with:
ANT_OPTS="-XX:MaxPermSize=20m -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError" ant -f
build-caller.xml
                
> OutOfMemoryError: PermGen caused by IvyContext leaked when building subprojects
> -------------------------------------------------------------------------------
>
>                 Key: IVY-1332
>                 URL: https://issues.apache.org/jira/browse/IVY-1332
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>            Reporter: Ales Nosek
>         Attachments: build-caller.xml, build.xml, ivy_eclipse_memory_analyzer.png
>
>
> The build.xml files of my subprojects include Ant's <taskdef/> element to define
Ivy tasks. This element causes creation of a new classloader to load the Ivy jars.
> The code from IvyContext.java:
> public class IvyContext {
>     private static ThreadLocal/*<Stack<IvyContext>>*/ current = new ThreadLocal();
> ...
> }
> This static initialization runs once with every classloader and creates a new ThreadLocal
object every time. All those ThreadLocal objects are visible (referenced) from the main Thread.
For 12 subprojects I end up with 12 ThreadLocal objects each containing one Stack holding
IvyContext objects. The IvyContext objects point to its class which points to its ClassLoader.
The 12 ClassLoaders stay retained.

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

        

Mime
View raw message