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 [mailto:[email protected]] 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 tasks. Thanks, Mike -----Original Message----- From: Stefan Bodewig [mailto:[email protected]] Sent: Friday, January 30, 2009 6:25 AM To: [email protected] Subject: Re: OutOfMemoryError: unable to create new native thread On 2009-01-30, Murray, Mike <[email protected]> wrote: > All the "hung" threads display the same "blocked" scenario as > thread-1199. > Name: Thread-1199 > State: BLOCKED on java.io.bufferedinputstr...@1b5973f owned by: > Thread-11 > Total blocked: 1 Total waited: 0 > Stack trace: > java.io.BufferedInputStream.read(BufferedInputStream.java:308) > java.io.FilterInputStream.read(FilterInputStream.java:116) > java.io.FilterInputStream.read(FilterInputStream.java:90) > org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:92) > java.lang.Thread.run(Thread.java:619) > This is 1.7.1 StreamPumper.java 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 immediately. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
