ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murray, Mike" <>
Subject RE: OutOfMemoryError: unable to create new native thread
Date Wed, 07 Jul 2010 14:51:08 GMT
Is there a bug reported for this?  I can't find one.  If not, I will
create one.

Previously this issue was just a memory leak.  Recently it was found to
be the cause of a nasty hang on a particular subset of XP machines only.
Someone added a forked java task without adding inputstring="", and a
downstream sub-process has hanging and we could get no stack info, or
debug it.  We had to painstakingly identify the cause by trial and error
of many scenarios.

-----Original Message-----
From: Murray, Mike [] 
Sent: Friday, January 30, 2009 8:13 AM
To: Ant Users List
Subject: RE: OutOfMemoryError: unable to create new native thread

Inclusion of revisions 579975 and 711860 did not resolve the eternal
threads issue.  I'll try the inputstring work around on all the forked

Thanks, Mike

-----Original Message-----
From: Stefan Bodewig [] 
Sent: Friday, January 30, 2009 6:25 AM
Subject: Re: OutOfMemoryError: unable to create new native thread

On 2009-01-30, Murray, Mike <> wrote:

> All the "hung" threads display the same "blocked" scenario as
> thread-1199.

> Name: Thread-1199

> State: BLOCKED on owned by:
> Thread-11

> Total blocked: 1  Total waited: 0

> Stack trace:

> This is 1.7.1 code, but it appears that cvs might
> contained a fixed version.

If you could build Ant's trunk from source to verify it fixes your
problem, that would be great.

These pumpers are created when you fork new processes with <exec> or
<java> (or use other tasks that fork new processes internally).  I many
cases where we see threads piling up it is related to reading user input
more than capturing process output.

If you go through the tasks that fork processes and identify processes
that will never need to read user input at all, it is generally a good
idea to provide them with empty input (like <exec inputstring="" .../>)
- I'd suggest you try that to see whether it fixes your problem


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message