You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Martijn Kruithof <jm...@kruithof.xs4all.nl> on 2005/01/13 20:09:43 UTC

Out of memory errors since recent changes.

I do not know what has been changed the last 44 hours, but somewhere in 
between a big memory leak has been caused.
build test fails with an OutOfMemoryError in:
FixCrLfTest on XP / 1.5.0 and on Linux / 1.4.2_06
ExecuteOnTest on XP / 1.4.2_06 and on XP / 1.3.1_13
BZip2Test on XP / 1.2.2_017
While, with exactly the same setup 44 hours ago everything went fine. 
(Well there was an issue with 1.2.2)

Martijn

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


Re: Out of memory errors since recent changes.

Posted by Peter Reilly <pe...@apache.org>.
Ok, I have seen the problem on my machine
(after removing export ANT_OPTS="-Xms200m -Xmx1000m"
from my .bashrc file).

I tryed to make a solution that required less memory but it did not
work.
So I pulled the local property impl (for the moment).

Jose's solution is possibly the way to go at the moment - with
a removal of any created properties using the generated names at the end
of the macroinstance execution.

Peter


Matt Benson wrote:

>--- Peter Reilly <pe...@apache.org> wrote:
>
>  
>
>>Is this a specific test, or is it all the tests?
>>
>>Peter
>>    
>>
>
>Peter, it's when running the full suite; it's an
>accumulation problem.  Mine usually dies around
>oata.taskdefs.F* , usually FixCRLFTest but sometimes
>FilterTest, and Martijn also mentioned ExecuteOnTest,
>so there's an "E" as well.  I ran in offline mode and
>got a little further presumably because some things
>were skipped.  :)
>
>-Matt
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>---------------------------------------------------------------------
>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


Re: Out of memory errors since recent changes.

Posted by Matt Benson <gu...@yahoo.com>.
--- Peter Reilly <pe...@apache.org> wrote:

> Is this a specific test, or is it all the tests?
> 
> Peter

Peter, it's when running the full suite; it's an
accumulation problem.  Mine usually dies around
oata.taskdefs.F* , usually FixCRLFTest but sometimes
FilterTest, and Martijn also mentioned ExecuteOnTest,
so there's an "E" as well.  I ran in offline mode and
got a little further presumably because some things
were skipped.  :)

-Matt

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Out of memory errors since recent changes.

Posted by Peter Reilly <pe...@apache.org>.
Martijn Kruithof wrote:

> I can see from traces I added to the code that thousands of 
> LocalPropertyStacks
> are created via the |InheritableThreadLocal|, hundreds of them seem to be
> never cleaned up, at the same time the number of threads remains more 
> or less
> constant. When rolling back the last two commits (local properties) 
> tests runs again.

Is this a specific test, or is it all the tests?

Peter

>
> Kind Regards, Martijn
>
> Matt Benson wrote:
>
>> I usually update at least every morning, and I was
>> running ant test yesterday evening... 20 hours ago,
>> without this.  I would put the offending change
>> sometime within the last 28 hours... also, it looks
>> like an accumulation, rather than a problem with a
>> specific test.  The most widely applicable code
>> changes that have gone in are the Property stuff and
>> the Reference Project... anyone have any ideas?
>>
>> -Matt
>>
>> --- Martijn Kruithof <jm...@kruithof.xs4all.nl> wrote:
>>
>>  
>>
>>> I do not know what has been changed the last 44
>>> hours, but somewhere in between a big memory leak has been caused.
>>> build test fails with an OutOfMemoryError in:
>>> FixCrLfTest on XP / 1.5.0 and on Linux / 1.4.2_06
>>> ExecuteOnTest on XP / 1.4.2_06 and on XP / 1.3.1_13
>>> BZip2Test on XP / 1.2.2_017
>>> While, with exactly the same setup 44 hours ago
>>> everything went fine. (Well there was an issue with 1.2.2)
>>>
>>> Martijn
>>>
>>>   
>>
>
> ---------------------------------------------------------------------
> 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


Re: Out of memory errors since recent changes.

Posted by "Alexey N. Solofnenko" <A....@mdl.com>.
Implementation seems strange. Usually thread local objects are used as 
following:

private static ThreadLocal threadLocalProperties=new 
InheritableThreadLocal(); // notice "static" there

public static ThreadLocalProperties getLocalProperties() { // static too
  ThreadLocalProperties 
properties=(ThreadLocalProperties)threadLocalProperties.get();
  if (properties==null) threadLocalProperties.set(properties=new 
ThreadLocalProperties());
  return properties;
}

Are you sure the current implementation works?

- Alexey.

Matt Benson wrote:

>You said they are created via the ITL get()?  So does
>it look like there are lots of Threads but when they
>did their ITLs instances aren't getting cleaned up? Or
>does it rather look like we are creating more
>LocalPropertyStacks than necessary?
>
>-Matt
>
>--- Martijn Kruithof <jm...@kruithof.xs4all.nl> wrote:
>
>  
>
>>I can see from traces I added to the code that
>>thousands of 
>>LocalPropertyStacks
>>are created via the |InheritableThreadLocal|,
>>    
>>
>[snip]
>
>  
>


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


Re: Out of memory errors since recent changes.

Posted by Matt Benson <gu...@yahoo.com>.
You said they are created via the ITL get()?  So does
it look like there are lots of Threads but when they
did their ITLs instances aren't getting cleaned up? Or
does it rather look like we are creating more
LocalPropertyStacks than necessary?

-Matt

--- Martijn Kruithof <jm...@kruithof.xs4all.nl> wrote:

> I can see from traces I added to the code that
> thousands of 
> LocalPropertyStacks
> are created via the |InheritableThreadLocal|,
[snip]

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Out of memory errors since recent changes.

Posted by Martijn Kruithof <jm...@kruithof.xs4all.nl>.
I can see from traces I added to the code that thousands of 
LocalPropertyStacks
are created via the |InheritableThreadLocal|, hundreds of them seem to be
never cleaned up, at the same time the number of threads remains more or 
less
constant. When rolling back the last two commits (local properties) 
tests runs again.

Kind Regards, Martijn

Matt Benson wrote:

>I usually update at least every morning, and I was
>running ant test yesterday evening... 20 hours ago,
>without this.  I would put the offending change
>sometime within the last 28 hours... also, it looks
>like an accumulation, rather than a problem with a
>specific test.  The most widely applicable code
>changes that have gone in are the Property stuff and
>the Reference Project... anyone have any ideas?
>
>-Matt
>
>--- Martijn Kruithof <jm...@kruithof.xs4all.nl> wrote:
>
>  
>
>>I do not know what has been changed the last 44
>>hours, but somewhere in 
>>between a big memory leak has been caused.
>>build test fails with an OutOfMemoryError in:
>>FixCrLfTest on XP / 1.5.0 and on Linux / 1.4.2_06
>>ExecuteOnTest on XP / 1.4.2_06 and on XP / 1.3.1_13
>>BZip2Test on XP / 1.2.2_017
>>While, with exactly the same setup 44 hours ago
>>everything went fine. 
>>(Well there was an issue with 1.2.2)
>>
>>Martijn
>>
>>    
>>

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


Re: Out of memory errors since recent changes.

Posted by Matt Benson <gu...@yahoo.com>.
I usually update at least every morning, and I was
running ant test yesterday evening... 20 hours ago,
without this.  I would put the offending change
sometime within the last 28 hours... also, it looks
like an accumulation, rather than a problem with a
specific test.  The most widely applicable code
changes that have gone in are the Property stuff and
the Reference Project... anyone have any ideas?

-Matt

--- Martijn Kruithof <jm...@kruithof.xs4all.nl> wrote:

> I do not know what has been changed the last 44
> hours, but somewhere in 
> between a big memory leak has been caused.
> build test fails with an OutOfMemoryError in:
> FixCrLfTest on XP / 1.5.0 and on Linux / 1.4.2_06
> ExecuteOnTest on XP / 1.4.2_06 and on XP / 1.3.1_13
> BZip2Test on XP / 1.2.2_017
> While, with exactly the same setup 44 hours ago
> everything went fine. 
> (Well there was an issue with 1.2.2)
> 
> Martijn
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
> 
> 



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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