Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-softlayer-rhel74-x64-1 have 'ant-contrib' issue #269

Closed
sophia-guo opened this issue Mar 7, 2018 · 17 comments
Closed

test-softlayer-rhel74-x64-1 have 'ant-contrib' issue #269

sophia-guo opened this issue Mar 7, 2018 · 17 comments
Assignees

Comments

@sophia-guo
Copy link

Test build running on test-softlayer-rhel74-x64-1 got

14:35:47 BUILD FAILED
14:35:47 /home/jenkins/workspace/openjdk8_j9_openjdktest_x86-64_linux/openjdk-tests/TestConfig/scripts/build_test.xml:36: Problem: failed to create task or type if
14:35:47 Cause: The name is undefined.
14:35:47 Action: Check the spelling.
14:35:47 Action: Check that any custom tasks/types have been declared.
14:35:47 Action: Check that any / declarations have taken place.
https://ci.adoptopenjdk.net/view/OpenJDK%20tests/job/openjdk8_j9_openjdktest_x86-64_linux/41/console

https://ci.adoptopenjdk.net/view/OpenJDK%20tests/job/openjdk8_j9_openjdktest_x86-64_linux/41/console

Suspect either ant-contrib isn't installed or installed with issue.

@bblondin
Copy link
Contributor

bblondin commented Mar 8, 2018

host seems ok:

[jenkins@test-softlayer-rhel7-x64-1 ~]$ ant -diagnostics

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: /usr/share/ant
ant-launcher.jar (19063 bytes)
ant-contrib.jar (232225 bytes)
ant.jar (1999724 bytes)
ant-bootstrap.jar (20919 bytes)
[jenkins@test-softlayer-rhel7-x64-1 ~]$ ls -lah /usr/share/ant/lib/ant-contrib.jar
-rw-r--r--. 1 root root 227K Mar  3 08:23 /usr/share/ant/lib/ant-contrib.jar

Are you sure the code is passing the environment into make?

@sophia-guo
Copy link
Author

Exactly same build job works on other machines. The only difference is jenkins distribute the job to this machine as it has same required labels.
Other test jobs got other ant issue on this machine

tests/TestConfig/../../jvmtest/TestConfig/resources -DJCK_ROOT= -DJVM_VERSION=openjdk10
15:51:32 Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
15:51:32 Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher
15:51:32 make: *** [compile] Error 1

https://ci.adoptopenjdk.net/view/System%20tests/job/openjdk10_hs_systemtest_x86-64_linux/26/console

@sophia-guo
Copy link
Author

sophia-guo commented Mar 8, 2018

It is not a test job setting issue. It should be ant issue on rhel with playbook.

I did login this machine and tried a simple build.xml with<if>tag and got exactly same issue.
[jenkins@test-softlayer-rhel74-x64-1 test_personal]$ vi build.xml
[jenkins@test-softlayer-rhel74-x64-1 test_personal]$ ant
Buildfile: /home/jenkins/workspace/test_personal/build.xml
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.

BUILD FAILED
/home/jenkins/workspace/test_personal/build.xml:9: Problem: failed to create task or type if
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.

@bblondin
Copy link
Contributor

bblondin commented Mar 8, 2018

Exactly same build job works on other machines.

Which machines? do you have a link to that job?

@sophia-guo
Copy link
Author

Link is in my first comment.

@sophia-guo
Copy link
Author

@bblondin Could we disable this machine for now, affects test build.
https://ci.adoptopenjdk.net/view/work%20in%20progress/job/TestBuild_Sandbox2/137/console

@bblondin
Copy link
Contributor

bblondin commented Mar 8, 2018

That didn't answer the question... both of those links look like test-softlayer-rhel74-x64-1

Could you please tell me what machines it works on?

@sophia-guo
Copy link
Author

Works for following except test-softlayer-rhel74-x64-1
https://ci.adoptopenjdk.net/label/test&&linux&&x64/

@sophia-guo
Copy link
Author

@sophia-guo
Copy link
Author

Those different links are different test build jobs, all of which failed for running on this rhel machine. The reason I comment here is it affects more than more test job. I'd like to disable this machine.

@bblondin
Copy link
Contributor

bblondin commented Mar 8, 2018

So...
This test is known to work only on Ubuntu systems.
With the addition of a new RHEL system the test now fails but only on RHEL.
You believe its has something to do with ant-contrib

I have disabled test-softlayer-rhel74-x64-1

@bblondin
Copy link
Contributor

bblondin commented Mar 8, 2018

Basic ant build.xml test

build.xml

<project name="ant-propregex-simple" default="run">
    <taskdef resource="net/sf/antcontrib/antlib.xml" />
    <target name="run">
        <property name="line.to.test" value="First Second" />
        <property name="the.regex" value="^([^ ]*) ([^ ]*)$" />
        <propertyregex 
            input="${line.to.test}" 
            regexp="${the.regex}" 
            select="\2" 
            property="the.match" 
        />
        <echo>${the.match}</echo>
    </target>
</project>

Passes on Ubuntu
Fails on RHEL

adding <pathelement location="/MYPATH/ant-contrib.jar"/> to the build.xml (ie point it to where the ant-contrib.jar lives fixes the issue

thus ant-contrib is not where ant thinks it should be on RHEL

@bblondin
Copy link
Contributor

bblondin commented Mar 8, 2018

Installed ant-contrib from red hat. my test now works.
re-enabled host, please test

@bblondin
Copy link
Contributor

bblondin commented Mar 8, 2018

Created pull request #275 to add solution to the playbook

@bblondin bblondin self-assigned this Mar 8, 2018
@sophia-guo
Copy link
Author

@sophia-guo
Copy link
Author

Didn't notice same machine still have another ant issue commented before still happened:

15:51:32 Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
15:51:32 Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher
15:51:32 make: *** [compile] Error 1

https://ci.adoptopenjdk.net/view/System%20tests/job/openjdk10_hs_systemtest_x86-64_linux/26/console

https://ci.adoptopenjdk.net/view/System%20tests/job/openjdk10_hs_systemtest_x86-64_linux/26/console

If it's not a same issue I can close this one and open a new one.

@bblondin
Copy link
Contributor

bblondin commented Mar 9, 2018

please open a new issue for this

@bblondin bblondin closed this as completed Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants