ant-notifications mailing list archives

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


Ales Nosek updated IVY-1332:

    Attachment: ivy_eclipse_memory_analyzer.png

Start this test case with:
ANT_OPTS="-XX:MaxPermSize=20m -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError" ant -f
> OutOfMemoryError: PermGen caused by IvyContext leaked when building subprojects
> -------------------------------------------------------------------------------
>                 Key: IVY-1332
>                 URL:
>             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
> 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:!default.jspa
For more information on JIRA, see:


View raw message