You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by Apache Jenkins Server <je...@builds.apache.org> on 2017/12/10 08:59:29 UTC

Jenkins build became unstable: Ant-Build-Matrix-master-Linux » JDK 1.8 (latest) #977

See <https://builds.apache.org/job/Ant-Build-Matrix-master-Linux/jdk=JDK%201.8%20(latest)/977/display/redirect?page=changes>


Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux» JDK 1.8 (latest) #977

Posted by Stefan Bodewig <bo...@apache.org>.
Strangely the test passes when I run it manually on the VM running
Gump. I'll look into it further but am running out of time for now.

Stefan

On 2017-12-13, Jaikiran Pai wrote:

> Do let me know if there's anything I can do to help investigate
> this. I'm curious myself to see what's causing this.

> -Jaikiran


> On 13/12/17 2:56 AM, Stefan Bodewig wrote:
>> On 2017-12-12, Stefan Bodewig wrote:

>>> On 2017-12-12, Jaikiran Pai wrote:
>>>> So the one final test that's still failing is this one[1]. It's
>>>> failing consistently only on Jenkins, that too with only Java 8
>>>> (jdk1.8.0_131). I have tried reproducing that one locally with that
>>>> exact Java version and even the latest Java 8 and haven't been able to
>>>> reproduce it. Before I try and debug this on that Jenkins environment
>>>> (which doesn't seem to be easy to do), I would like to know if this is
>>>> reproducible for anyone else.
>>> No, I haven't been able either.
>> it also fails in Gump:
>> http://vmgump-vm3.apache.org/ant/test-ant/gump_work/build_ant_test-ant.txt

>> I have got shell access to vmgump-vm3 and will try to find some time
>> understanding the error in the comming days.

>> Stefan

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


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


Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux » JDK 1.8 (latest) #977

Posted by Jaikiran Pai <ja...@gmail.com>.
Do let me know if there's anything I can do to help investigate this. 
I'm curious myself to see what's causing this.

-Jaikiran


On 13/12/17 2:56 AM, Stefan Bodewig wrote:
> On 2017-12-12, Stefan Bodewig wrote:
>
>> On 2017-12-12, Jaikiran Pai wrote:
>>> So the one final test that's still failing is this one[1]. It's
>>> failing consistently only on Jenkins, that too with only Java 8
>>> (jdk1.8.0_131). I have tried reproducing that one locally with that
>>> exact Java version and even the latest Java 8 and haven't been able to
>>> reproduce it. Before I try and debug this on that Jenkins environment
>>> (which doesn't seem to be easy to do), I would like to know if this is
>>> reproducible for anyone else.
>> No, I haven't been able either.
> it also fails in Gump:
> http://vmgump-vm3.apache.org/ant/test-ant/gump_work/build_ant_test-ant.txt
>
> I have got shell access to vmgump-vm3 and will try to find some time
> understanding the error in the comming days.
>
> Stefan
>
> ---------------------------------------------------------------------
> 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: Jenkins build became unstable: Ant-Build-Matrix-master-Linux» JDK 1.8 (latest) #977

Posted by Stefan Bodewig <bo...@apache.org>.
On 2017-12-12, Stefan Bodewig wrote:

> On 2017-12-12, Jaikiran Pai wrote:

>> So the one final test that's still failing is this one[1]. It's
>> failing consistently only on Jenkins, that too with only Java 8
>> (jdk1.8.0_131). I have tried reproducing that one locally with that
>> exact Java version and even the latest Java 8 and haven't been able to
>> reproduce it. Before I try and debug this on that Jenkins environment
>> (which doesn't seem to be easy to do), I would like to know if this is
>> reproducible for anyone else.

> No, I haven't been able either.

it also fails in Gump:
http://vmgump-vm3.apache.org/ant/test-ant/gump_work/build_ant_test-ant.txt

I have got shell access to vmgump-vm3 and will try to find some time
understanding the error in the comming days.

Stefan

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


Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux» JDK 1.8 (latest) #977

Posted by Stefan Bodewig <bo...@apache.org>.
On 2017-12-12, Jaikiran Pai wrote:

> So the one final test that's still failing is this one[1]. It's
> failing consistently only on Jenkins, that too with only Java 8
> (jdk1.8.0_131). I have tried reproducing that one locally with that
> exact Java version and even the latest Java 8 and haven't been able to
> reproduce it. Before I try and debug this on that Jenkins environment
> (which doesn't seem to be easy to do), I would like to know if this is
> reproducible for anyone else.

No, I haven't been able either.

Stefan

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


Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux » JDK 1.8 (latest) #977

Posted by Jaikiran Pai <ja...@gmail.com>.
So the one final test that's still failing is this one[1]. It's failing 
consistently only on Jenkins, that too with only Java 8 (jdk1.8.0_131). 
I have tried reproducing that one locally with that exact Java version 
and even the latest Java 8 and haven't been able to reproduce it. Before 
I try and debug this on that Jenkins environment (which doesn't seem to 
be easy to do), I would like to know if this is reproducible for anyone 
else.

[1] 
https://builds.apache.org/job/Ant-Build-Matrix-master-Linux/lastCompletedBuild/jdk=JDK%201.8%20(latest)/testReport/org.apache.tools.ant.taskdefs.optional.unix/SymlinkTest/testRecreate/

-Jaikiran

On 10/12/17 3:13 PM, Stefan Bodewig wrote:
> On 2017-12-10, Stefan Bodewig wrote:
>
>> testCreateDoubleHanging is related to
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=38199 judging from the
>> history. Here the link points to a non-existent file and Files.exists
>> returns false in Java8.
> fixed by
>
> @@ -37,6 +37,7 @@ import java.io.IOException;
>   import java.io.InputStream;
>   import java.io.PrintStream;
>   import java.nio.file.Files;
> +import java.nio.file.LinkOption;
>   import java.nio.file.Path;
>   import java.nio.file.Paths;
>   import java.util.ArrayList;
> @@ -440,7 +441,7 @@ public class Symlink extends DispatchTask {
>       private void doLink(String res, String lnk) throws BuildException {
>           final Path link = Paths.get(lnk);
>           final Path target = Paths.get(res);
> -        final boolean alreadyExists = Files.exists(link);
> +        final boolean alreadyExists = Files.exists(link, LinkOption.NOFOLLOW_LINKS);
>           if (!alreadyExists) {
>               // if the path (at which the link is expected to be created) isn't already present
>               // then we just go ahead and attempt to symlink
>
>
> ---------------------------------------------------------------------
> 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: Jenkins build became unstable: Ant-Build-Matrix-master-Linux » JDK 1.8 (latest) #977

Posted by Jaikiran Pai <ja...@gmail.com>.
You are right, that indeed was the issue (for one of that failing test). 
I have pushed a commit with this change to fix that one.

-Jaikiran


On 10/12/17 3:13 PM, Stefan Bodewig wrote:
> On 2017-12-10, Stefan Bodewig wrote:
>
>> testCreateDoubleHanging is related to
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=38199 judging from the
>> history. Here the link points to a non-existent file and Files.exists
>> returns false in Java8.
> fixed by
>
> @@ -37,6 +37,7 @@ import java.io.IOException;
>   import java.io.InputStream;
>   import java.io.PrintStream;
>   import java.nio.file.Files;
> +import java.nio.file.LinkOption;
>   import java.nio.file.Path;
>   import java.nio.file.Paths;
>   import java.util.ArrayList;
> @@ -440,7 +441,7 @@ public class Symlink extends DispatchTask {
>       private void doLink(String res, String lnk) throws BuildException {
>           final Path link = Paths.get(lnk);
>           final Path target = Paths.get(res);
> -        final boolean alreadyExists = Files.exists(link);
> +        final boolean alreadyExists = Files.exists(link, LinkOption.NOFOLLOW_LINKS);
>           if (!alreadyExists) {
>               // if the path (at which the link is expected to be created) isn't already present
>               // then we just go ahead and attempt to symlink
>
>
> ---------------------------------------------------------------------
> 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: Jenkins build became unstable: Ant-Build-Matrix-master-Linux» JDK 1.8 (latest) #977

Posted by Stefan Bodewig <bo...@apache.org>.
On 2017-12-10, Stefan Bodewig wrote:

> testCreateDoubleHanging is related to
> https://bz.apache.org/bugzilla/show_bug.cgi?id=38199 judging from the
> history. Here the link points to a non-existent file and Files.exists
> returns false in Java8.

fixed by

@@ -37,6 +37,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintStream;
 import java.nio.file.Files;
+import java.nio.file.LinkOption;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.ArrayList;
@@ -440,7 +441,7 @@ public class Symlink extends DispatchTask {
     private void doLink(String res, String lnk) throws BuildException {
         final Path link = Paths.get(lnk);
         final Path target = Paths.get(res);
-        final boolean alreadyExists = Files.exists(link);
+        final boolean alreadyExists = Files.exists(link, LinkOption.NOFOLLOW_LINKS);
         if (!alreadyExists) {
             // if the path (at which the link is expected to be created) isn't already present
             // then we just go ahead and attempt to symlink


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


Re: Potential breaking change to symlink task [ was Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux » JDK 1.8 (latest) #977]

Posted by Stefan Bodewig <bo...@apache.org>.
On 2017-12-12, Jaikiran Pai wrote:

>>> So I have now pushed a fix[1] on top of my previous changes, which
>>> should accommodate both these use cases (and continue to use Java 7
>>> APIs for symlinking).
>> This is very useful, many thanks. We may want to modify the manual so it
>> becomes clear that overwrite will replace regular files as well.
> Done. The documentation of symlink task is now updated
> https://github.com/apache/ant/commit/485b92fe7494c5473e019329cbf7a33e556acad6

Thanks

        Stefan

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


Re: Potential breaking change to symlink task [ was Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux » JDK 1.8 (latest) #977]

Posted by Jaikiran Pai <ja...@gmail.com>.
>> So I have now pushed a fix[1] on top of my previous changes, which
>> should accommodate both these use cases (and continue to use Java 7
>> APIs for symlinking).
> This is very useful, many thanks. We may want to modify the manual so it
> becomes clear that overwrite will replace regular files as well.
Done. The documentation of symlink task is now updated 
https://github.com/apache/ant/commit/485b92fe7494c5473e019329cbf7a33e556acad6

-Jaikiran

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


Re: Potential breaking change to symlink task [ was Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux » JDK 1.8 (latest) #977]

Posted by Stefan Bodewig <bo...@apache.org>.
On 2017-12-12, Jaikiran Pai wrote:

> I went back and read up both these bugzilla reports again and I now
> realize that supporting one doesn't necessarily mean not supporting
> the other. BZ-43426 is about letting existing file be overwritten
> (irrespective of the type of the file) if the overwrite flag is
> true. BZ-58683 is about not overwriting any kind of file, if overwrite
> flag is false (before the changes I introduced, it was in fact
> overwriting files even when overwrite was false, a side-effect of the
> ln -s usage).

Great!

> So I have now pushed a fix[1] on top of my previous changes, which
> should accommodate both these use cases (and continue to use Java 7
> APIs for symlinking).

This is very useful, many thanks. We may want to modify the manual so it
becomes clear that overwrite will replace regular files as well.

Stefan

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


Re: Potential breaking change to symlink task [ was Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux » JDK 1.8 (latest) #977]

Posted by Jaikiran Pai <ja...@gmail.com>.
I went back and read up both these bugzilla reports again and I now 
realize that supporting one doesn't necessarily mean not supporting the 
other. BZ-43426 is about letting existing file be overwritten 
(irrespective of the type of the file) if the overwrite flag is true. 
BZ-58683 is about not overwriting any kind of file, if overwrite flag is 
false (before the changes I introduced, it was in fact overwriting files 
even when overwrite was false, a side-effect of the ln -s usage).

So I have now pushed a fix[1] on top of my previous changes, which 
should accommodate both these use cases (and continue to use Java 7 APIs 
for symlinking). No change has been done to the existing test and it now 
passes. Do let me know, if this is good enough to have BZ-58683 fixed 
and yet maintain backward compatibility with existing released versions 
of Ant. If you do see any issues with this set of changes, I am willing 
to undo them and go back to the original state that was before I started 
these changes.

[1] 
https://github.com/apache/ant/commit/b3c7d5dc451960986a94d24785a2c1d24b0b0d6a

-Jaikiran


On 10/12/17 5:15 PM, Stefan Bodewig wrote:
> [@Steve I'm trying to drag you in as you've been the one who brought in
> the change that gets contested by
> https://bz.apache.org/bugzilla/show_bug.cgi?id=58683 and maybe you
> recall the details better than we do.]
>
> On 2017-12-10, Jaikiran Pai wrote:
>
>> On 10/12/17 3:09 PM, Stefan Bodewig wrote:
>>> On 2017-12-10, Jaikiran Pai wrote:
>>>> I'll investigate why this is failing (local tests pass for me) and fix it.
>>> Target testCreateOverFile in the antunit test explicitly tries to
>>> replace a file with a link, doing exactly what the bugzilla report says
>>> is a bug. So the behavior seems to have been intentional.
>>> We now need to figure out whether the bug report was genuine (and list
>>> the change as breaking) or we want to revert part of your fix, change
>>> the documentation and change the bugzilla issue's resolution to a
>>> WONTFIX.
>> The symlink task documentation[1] states this for the "overwrite" attribute:
>> <quote>
>> Overwrite existing links or not.
>> </quote>
>> It does explicitly mention that it's meant for overwriting links. The
>> test here, like you note, tries to overwrite a non-symlink file and
>> IMO it should error out, like it does with this change. After all, the
>> entire symlink task is meant to just deal with symlinks and
>> overwriting non-symlinks doesn't seem right. Having said that, I do
>> agree that this is a change in behaviour and we should list this as
>> such, if we do decide to let this change stay.
>> The reason why that existing test was introduced in first place and
>> the feature to let the symlink task overwrite a non-symlink file goes
>> back to this issue
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=43426. The rationale in
>> that description seems to be that the Unix ln -sf apparently allows
>> overwriting non-symlink file with a symlink. Given that context, I'm
>> not really sure how we should proceed. Should we make this breaking
>> change or should we let the prior behaviour continue?
>> I'm in favour of this breaking change, but I won't mind switching back
>> to the prior behaviour if you and others think that's a better thing
>> to do.
> Thank you for digging into the history, Jaikiran.
>
> 43426 is explicitly listed as a fixed bug (in 1.8.0) so I'm leaning
> towards keeping and documenting the behavior of allowing <symlink> to
> replace regular files.
>
> Stefan
>
> ---------------------------------------------------------------------
> 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: Potential breaking change to symlink task [ was Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux » JDK 1.8 (latest) #977]

Posted by Stefan Bodewig <bo...@apache.org>.
[@Steve I'm trying to drag you in as you've been the one who brought in
the change that gets contested by
https://bz.apache.org/bugzilla/show_bug.cgi?id=58683 and maybe you
recall the details better than we do.]

On 2017-12-10, Jaikiran Pai wrote:

> On 10/12/17 3:09 PM, Stefan Bodewig wrote:
>> On 2017-12-10, Jaikiran Pai wrote:

>>> I'll investigate why this is failing (local tests pass for me) and fix it.

>> Target testCreateOverFile in the antunit test explicitly tries to
>> replace a file with a link, doing exactly what the bugzilla report says
>> is a bug. So the behavior seems to have been intentional.

>> We now need to figure out whether the bug report was genuine (and list
>> the change as breaking) or we want to revert part of your fix, change
>> the documentation and change the bugzilla issue's resolution to a
>> WONTFIX.

> The symlink task documentation[1] states this for the "overwrite" attribute:

> <quote>
> Overwrite existing links or not.
> </quote>

> It does explicitly mention that it's meant for overwriting links. The
> test here, like you note, tries to overwrite a non-symlink file and
> IMO it should error out, like it does with this change. After all, the
> entire symlink task is meant to just deal with symlinks and
> overwriting non-symlinks doesn't seem right. Having said that, I do
> agree that this is a change in behaviour and we should list this as
> such, if we do decide to let this change stay.

> The reason why that existing test was introduced in first place and
> the feature to let the symlink task overwrite a non-symlink file goes
> back to this issue
> https://bz.apache.org/bugzilla/show_bug.cgi?id=43426. The rationale in
> that description seems to be that the Unix ln -sf apparently allows
> overwriting non-symlink file with a symlink. Given that context, I'm
> not really sure how we should proceed. Should we make this breaking
> change or should we let the prior behaviour continue?

> I'm in favour of this breaking change, but I won't mind switching back
> to the prior behaviour if you and others think that's a better thing
> to do.

Thank you for digging into the history, Jaikiran.

43426 is explicitly listed as a fixed bug (in 1.8.0) so I'm leaning
towards keeping and documenting the behavior of allowing <symlink> to
replace regular files.

Stefan

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


Potential breaking change to symlink task [ was Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux » JDK 1.8 (latest) #977]

Posted by Jaikiran Pai <ja...@gmail.com>.
On 10/12/17 3:09 PM, Stefan Bodewig wrote:
> On 2017-12-10, Jaikiran Pai wrote:
>
>> I'll investigate why this is failing (local tests pass for me) and fix it.
>
> Target testCreateOverFile in the antunit test explicitly tries to
> replace a file with a link, doing exactly what the bugzilla report says
> is a bug. So the behavior seems to have been intentional.
>
> We now need to figure out whether the bug report was genuine (and list
> the change as breaking) or we want to revert part of your fix, change
> the documentation and change the bugzilla issue's resolution to a
> WONTFIX.
>
The symlink task documentation[1] states this for the "overwrite" attribute:

<quote>
Overwrite existing links or not.
</quote>

It does explicitly mention that it's meant for overwriting links. The 
test here, like you note, tries to overwrite a non-symlink file and IMO 
it should error out, like it does with this change. After all, the 
entire symlink task is meant to just deal with symlinks and overwriting 
non-symlinks doesn't seem right. Having said that, I do agree that this 
is a change in behaviour and we should list this as such, if we do 
decide to let this change stay.


The reason why that existing test was introduced in first place and the 
feature to let the symlink task overwrite a non-symlink file goes back 
to this issue https://bz.apache.org/bugzilla/show_bug.cgi?id=43426. The 
rationale in that description seems to be that the Unix ln -sf 
apparently allows overwriting non-symlink file with a symlink. Given 
that context, I'm not really sure how we should proceed. Should we make 
this breaking change or should we let the prior behaviour continue?

I'm in favour of this breaking change, but I won't mind switching back 
to the prior behaviour if you and others think that's a better thing to do.


[1] https://ant.apache.org/manual/Tasks/symlink.html

-Jaikiran

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


Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux» JDK 1.8 (latest) #977

Posted by Stefan Bodewig <bo...@apache.org>.
On 2017-12-10, Jaikiran Pai wrote:

> I'll investigate why this is failing (local tests pass for me) and fix it.

Are you using Java9 locally? The test only fail for Java8 in Jenkins,
this could explain the difference. The antunit tests fail for me with
Java 8 as well, while the JUnit test passes.

testCreateDoubleHanging is related to
https://bz.apache.org/bugzilla/show_bug.cgi?id=38199 judging from the
history. Here the link points to a non-existent file and Files.exists
returns false in Java8.

Target testCreateOverFile in the antunit test explicitly tries to
replace a file with a link, doing exactly what the bugzilla report says
is a bug. So the behavior seems to have been intentional.

We now need to figure out whether the bug report was genuine (and list
the change as breaking) or we want to revert part of your fix, change
the documentation and change the bugzilla issue's resolution to a
WONTFIX.

Stefan

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


Re: Jenkins build became unstable: Ant-Build-Matrix-master-Linux » JDK 1.8 (latest) #977

Posted by Jaikiran Pai <ja...@gmail.com>.
I'll investigate why this is failing (local tests pass for me) and fix it.

-Jaikiran


On 10/12/17 2:29 PM, Apache Jenkins Server wrote:
> See <https://builds.apache.org/job/Ant-Build-Matrix-master-Linux/jdk=JDK%201.8%20(latest)/977/display/redirect?page=changes>
>


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