ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 42742] - big Ant/Ivy builds run out of permanent memory. Classloader leaks?
Date Mon, 16 Jul 2007 13:57:13 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42742>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42742





------- Additional Comments From peterreilly@apache.org  2007-07-16 06:57 -------
Hi Steve,
Thanks, I can now repeat the problem
with the following build file:

<project name="e" default="run">
  <property name="ac"
            location="${user.home}/apps/ant-contrib/ant-contrib-1.0b3.jar"/>
  <target name="run">
    <typedef resource="net/sf/antcontrib/antlib.xml"
             classpath="${ac}"/>
    <for begin="1" end="1000" param="p">
      <sequential>
        <antcall target="define"/>
        <echo>@{p}</echo>
      </sequential>
    </for>
  </target>
  <target name="define">
    <typedef resource="net/sf/antcontrib/antlib.xml"
             classpath="${ac}"/>
  </target>
</project>
If I set ANT_OPTS to:
export ANT_OPTS="-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:SurvivorRatio=2

The build completes - but painfully slowly, (after ~ 300 iterations the
slowdown is very noticable), the time reported for
the build is ~30 minutes.

If I set ANT_OPTS to:
export ANT_OPTS="-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:SurvivorRatio=2 
-XX:MaxPermSize=8m -XX:PermSize=8m"
The build completes relatively quickly (~ 2 1/2 minutes)
(see : http://developers.sun.com/mobility/midp/articles/garbagecollection2/#3.3
for use and description of GC flags)
I conclude that for this build file, the problem is not
ant, but it is the GC in java and its treatment of classes.



It may be useful to add a check in <typedef> to
see if the same typedef has been done before - this
may cause other problems (the contents of the
jars made have changed - adding new classes or antlibs definitions).

As Stephane does, I also normally fork build files to
avoid similar (and other) problems.

I use the following  macro:

  <macrodef name="sub">
    <attribute name="dir"/>
    <attribute name="target"/>
    <sequential>
      <exec executable="bash"
            dir="@{dir}"
            failonerror="yes">
        <arg value="-c"/>
        <arg value="ant -emacs @{target}"/>
      </exec>
    </sequential>
  </macrodef>



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message