You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vladimir Ivanov (JIRA)" <ji...@apache.org> on 2007/03/09 14:07:25 UTC

[jira] Created: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

[classlib] [io] ant exec.redirector is unstable while works on HDK
------------------------------------------------------------------

                 Key: HARMONY-3347
                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
             Project: Harmony
          Issue Type: Bug
          Components: App-Oriented Bug Reports
            Reporter: Vladimir Ivanov


The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
For me it report 'no revision' ~ 2times for 5 runs.

The execution log is:
harmony\trunk>build_sf.bat
Setting environment for using Microsoft Visual Studio .NET 2003 tools.
(If you have another version of Visual Studio or Visual C++ installed and wish
to use its tools from the command line, run vcvars32.bat for that version.)
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
http://incubator.apache.org/harmony
Buildfile: build.xml

svn-prop:

init:

show_props:
     [echo]
     [echo]                    Apache Harmony Federated Build
     [echo]             ==========================================
     [echo]             svn rev          :  r516383
     [echo]             operating system :  windows
     [echo]             architecture     :  x86-32
     [echo]             ant os name/arch :  Windows XP/x86
     [echo]             output location  :  target
     [echo]             DRLVM classlib   :  ../../../working_classlib
     [echo]

<...>

harmony\trunk>build_sf.bat
Setting environment for using Microsoft Visual Studio .NET 2003 tools.
(If you have another version of Visual Studio or Visual C++ installed and wish
to use its tools from the command line, run vcvars32.bat for that version.)
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
http://incubator.apache.org/harmony
Buildfile: build.xml

svn-prop:

init:

show_props:
     [echo]
     [echo]                    Apache Harmony Federated Build
     [echo]             ==========================================
     [echo]             svn rev          :  r
     [echo]             operating system :  windows
     [echo]             architecture     :  x86-32
     [echo]             ant os name/arch :  Windows XP/x86
     [echo]             output location  :  target
     [echo]             DRLVM classlib   :  ../../../working_classlib
     [echo]

BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Mikhail Markov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495598 ] 

Mikhail Markov commented on HARMONY-3347:
-----------------------------------------

I've instrumented ant code and found that ant caught IOException (in org.apache.tools.ant.taskdefs.StreamPumper class) from PipedInputStream with "Pipe broken" message.

Here is a piece of code from PipedInputStream method throwing "Pipe broken" IOException:
...
            boolean first = true;
            while (in == -1) {
                // Are we at end of stream?
                if (isClosed) {
                    return -1;
                }
                if (!first && lastWriter != null && !lastWriter.isAlive()) {
                    throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
                }
                first = false;
                // Notify callers of receive()
                notifyAll();
                wait(1000);
            }
...
So, to avoid infinite waits, if writer thread (i.e. the thread writing to PipedOutputStream) is not alive, then PipedInputStream will wait max 1 sec for stream to be closed and will throw IOException with "Pipe broken" message.

I've added debug prints to PipedInputStream and found that indeed there are 3 threads working with Piped in/out streams: 1-st writes to the stream (writer), 2-nd reads from the stream (reader) and 3-rd closes the stream (seems like this is a system thread, which is spawned when Runtime.exec() method is called for running "svn". The problem is that the gap between writer thread became not alive and the moment when closing thread actually closes the thread is more that 1 sec.
I've black-box tested RI's logic and found that it waits 3 sec before throwing IOException "Pipe broken".

If i add 1 more sec of waiting then the ant starts working:
...
            int attempts = 2;
            while (in == -1) {
                // Are we at end of stream?
                if (isClosed) {
                    return -1;
                }
                if ((attempts-- <= 0) && lastWriter != null && !lastWriter.isAlive()) {
                    throw new IOException(Msg.getString("K0076")); //$NON-NLS-1$
                }
                // Notify callers of receive()
                notifyAll();
                wait(1000);
            }
...

So, in my opinion it makes sense to also add more iterations of waiting (perhaps, at least the same time as in RI, i.e. the number of attempts in the code above should be 3). On some slow machines, perhaps, the code might still fails but generally it becomes more robust.

> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>         Attachments: my_build.xml
>
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Vladimir Ivanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480321 ] 

Vladimir Ivanov commented on HARMONY-3347:
------------------------------------------

Ant version:
harmony\trunk>ant -version
Apache Ant version 1.6.5 compiled on June 2 2005

RI version (to build HDK):
harmony\trunk>java -version
java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480320 ] 

Alexey Petrenko commented on HARMONY-3347:
------------------------------------------

Vladimir, what ant version do you use?

> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492077 ] 

Tony Wu commented on HARMONY-3347:
----------------------------------

Hi Vladimir,

what's the value of env LC_MESSAGES? this variable will affect the output of "svn info", the output message might be localized so that ant can not get the revision by matching the line start with "Revision:".

please set the LC_MESSAGES to en_US and have a try.

> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov reassigned HARMONY-3347:
----------------------------------------

    Assignee: Alexei Zakharov

> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>         Assigned To: Alexei Zakharov
>         Attachments: H-3347.patch, my_build.xml, Test.java
>
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Mikhail Markov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Markov updated HARMONY-3347:
------------------------------------

    Attachment: my_build.xml

Here is a small ant build file to reproduce the intermittent failure.

> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>         Attachments: my_build.xml
>
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Mikhail Markov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Markov updated HARMONY-3347:
------------------------------------

    Attachment: Test.java

Here is the test to understand the difference between Harmony & RI:

On RI sometimes (~1 time out of 10 on my machine) i get the following output:
Done with writing.
read: 1000
PipeReader caught exception: java.io.IOException: Pipe broken, waited for 3008

On Harmony I get (for J9, for example):
Done with writing.
read: 1000
PipeReader caught exception: java.io.IOException: Pipe broken, waited for 1154


> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>         Attachments: my_build.xml, Test.java
>
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Mikhail Markov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497443 ] 

Mikhail Markov commented on HARMONY-3347:
-----------------------------------------

Thanks, Alexei - integrated as expected!

As for you questions:
1) The tests is synthetic and was created to test RI's behaviour. It prints ~ 1 time out of 10 on my machine something like: 
Done with writing. 
read: 1000 
PipeReader caught exception: java.io.IOException: Pipe broken, waited for 3008 
>From this output i've made the assumption that Harmony waits too little before throwing "Pipe broken" exception.
The rest 9 times test prints:
Done with writing.
read: 1000
PipeReader caught exception: java.io.IOException: Write end dead, waited for 0
2) About receive() method: it closely realted with write() method from PipedOutputStream (called by it) and the documentation for Harmony PipedOutputStream.write() method stays that IOException is thrown  "If the receiving thread was terminated without closing the pipe. This case is not currently handled correctly.". So this should be additionally investigated. I suggest to leave it intact for now.

> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>         Assigned To: Alexei Zakharov
>         Attachments: H-3347.patch, my_build.xml, Test.java
>
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov resolved HARMONY-3347.
--------------------------------------

    Resolution: Fixed

Mikhail, I can't say I completely understand your test from attached Test.java . However, the patch itself looks good - I understand it at least :). And I was able to completely rebuild the classlib using patched version of HARMONY (patched classlib on top of j9). Was integrated at the revision 539776. Thanks! And please verify I have applied it right.

p.s. BTW, shouldn't we add this three-attempts strategy to the receive() method also?

> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>         Assigned To: Alexei Zakharov
>         Attachments: H-3347.patch, my_build.xml, Test.java
>
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov closed HARMONY-3347.
------------------------------------


Ok. JIRA closed.

> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>         Assigned To: Alexei Zakharov
>         Attachments: H-3347.patch, my_build.xml, Test.java
>
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Mikhail Markov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494776 ] 

Mikhail Markov commented on HARMONY-3347:
-----------------------------------------

Hi Tony,

I've tried to set LC_MESSAGES variable to en_US and still could intermittently reproduce the descrinbed problem on WinXP.


> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3347) [classlib] [io] ant exec.redirector is unstable while works on HDK

Posted by "Mikhail Markov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Markov updated HARMONY-3347:
------------------------------------

    Attachment: H-3347.patch

And here is the patch increasing the time of waiting to 3 sec. in case of dead writer thread.
I've checked and with this patch the original problem is resolved - svn version is got without problems.

> [classlib] [io] ant exec.redirector is unstable while works on HDK
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3347
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3347
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports
>            Reporter: Vladimir Ivanov
>         Attachments: H-3347.patch, my_build.xml, Test.java
>
>
> The build of HDK sometimes failed when it run over HDK because can't define the svn revision.
> For me it report 'no revision' ~ 2times for 5 runs.
> The execution log is:
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r516383
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> <...>
> harmony\trunk>build_sf.bat
> Setting environment for using Microsoft Visual Studio .NET 2003 tools.
> (If you have another version of Visual Studio or Visual C++ installed and wish
> to use its tools from the command line, run vcvars32.bat for that version.)
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r516383, (Mar  9 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Buildfile: build.xml
> svn-prop:
> init:
> show_props:
>      [echo]
>      [echo]                    Apache Harmony Federated Build
>      [echo]             ==========================================
>      [echo]             svn rev          :  r
>      [echo]             operating system :  windows
>      [echo]             architecture     :  x86-32
>      [echo]             ant os name/arch :  Windows XP/x86
>      [echo]             output location  :  target
>      [echo]             DRLVM classlib   :  ../../../working_classlib
>      [echo]
> BUILD FAILED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.