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 36903] New: - ANT Java Task hangs or causes other processes to hang
Date Tue, 04 Oct 2005 03:49:08 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=36903>.
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=36903

           Summary: ANT Java Task hangs or causes other processes to hang
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: nomorogbe@idiominc.com
                CC: nomorogbe@idiominc.com
 BugsThisDependsOn: 24918


In attempting to upgrade our build process to ANT 1.6.5 from ANT 1.6.2, we have 
encountered various hangs in java or other forked processes during our build 
process.
It appears to be a serious regression in the ANT Java Task.

We observed this behavior with ANT 1.6.{3,4,5} -- this bug is present in all 
three latest versions.
Everything worked perfectly with ANT 1.6.2.

Seems Bug fix 24918 has caused this regression.
Compared the sources of ANT 1.6.2 and 1.6.5 for Java Task;
the only notable change was this fix for 24918.

By just commenting these lines out and recompiling this 1 file, the hanging 
problems go away, and everything works on ANT 1.6.5.

apache-ant-1.6.5\src\main\org\apache\tools\ant\taskdefs\Java.java

    /**
     * Set up properties on the redirector that we needed to store locally.
     */
    protected void setupRedirector() {
        redirector.setInput(input);
        redirector.setInputString(inputString);
        redirector.setOutput(output);
        redirector.setError(error);
        if (redirectorElement != null) {
            redirectorElement.configure(redirector);
        }
        // if (!spawn && input == null && inputString == null) {
        //    #24918: send standard input to the process by default.
        //    redirector.setInputStream(new KeepAliveInputStream(getProject
().getDefaultInputStream()));
        // }
    }
 
We need this fix before we can upgrade our ANT version to the latest release :-(

We observed that sometimes adding fork="yes" to Java Task works around the 
problem, but at other points removing fork="yes" works around the problem, so 
have not been able to establish a consistent pattern for how to work around 
this.
We also observed that having fork="yes" option when running a java task, can 
sometimes cause other unrelated processes later on to hang, even though the 
java process itself successfully terminates (or so it seemed).

We have fairly complicated build scripts that invoke numerous java and non-java 
processes;
I have not yet been able to isolate a simple reproducible case.
We also do our builds using Cruise Control 
(http://cruisecontrol.sourceforge.net) and first observed it there.
Though, it has nothing to do with Cruise Control, as I can reproduce the 
problems easily by invoking the same ANT targets directly from bash command 
line.

-- 
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