You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Loughran <st...@apache.org> on 2007/06/21 18:31:41 UTC

OOmemory, ant1.7, java1.5+, windows only

the big smartfrog build is suddenly oom-ing, on windows only, more often 
on java1.6 but now on java1.5 too.

we're using ivy to choreograph, running threads for functional testing. 
javac, rmic, junit, all are set to fork, but still we run out of memory 
after about 40 minutes into the full build/test. All is well on unix, 
but not windows.

Anyone got any ideas? What's the best way to debug this? I've never 
profiled a build before. We could maybe have a new listener that prints 
out memory/heap space status as it exits projects, a profiling 
listener...then there is the profilers under netbeans and the 
java1.5/1.6 memory tools.

-steve

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


Re: OOmemory, ant1.7, java1.5+, windows only

Posted by Peter Reilly <pe...@gmail.com>.
I found that trying in a debugger is not a good
idea - as the memory gets used up faster! and things
stop working.

Use the  -XX:+HeapDumpOnOutOfMemoryError option for
java (in ANT_OPTS) and get the heap dump when the program
terminates.

Another option is to get a heap dump always, something
like -Xrunhprof:file=dump.hprof,format=b.


Load the heap dump into your favorite heap dump analyzer,
and look at the largest retained objects.

I found that the yourkit profiler was excellent at this.
http://www.yourkit.com/changes/index.jsp#memory

Peter

On 6/21/07, Steve Loughran <st...@apache.org> wrote:
>
> the big smartfrog build is suddenly oom-ing, on windows only, more often
> on java1.6 but now on java1.5 too.
>
> we're using ivy to choreograph, running threads for functional testing.
> javac, rmic, junit, all are set to fork, but still we run out of memory
> after about 40 minutes into the full build/test. All is well on unix,
> but not windows.
>
> Anyone got any ideas? What's the best way to debug this? I've never
> profiled a build before. We could maybe have a new listener that prints
> out memory/heap space status as it exits projects, a profiling
> listener...then there is the profilers under netbeans and the
> java1.5/1.6 memory tools.
>
> -steve
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

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