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

JTReg Fail on aix: com/sun/jdi/EvalArraysAsList.sh #1718

Closed
M-Davies opened this issue Apr 6, 2020 · 5 comments · Fixed by #2376
Closed

JTReg Fail on aix: com/sun/jdi/EvalArraysAsList.sh #1718

M-Davies opened this issue Apr 6, 2020 · 5 comments · Fixed by #2376
Milestone

Comments

@M-Davies
Copy link
Contributor

M-Davies commented Apr 6, 2020

https://github.com/AdoptOpenJDK/openjdk-jdk8u/blob/master/jdk/test/com/sun/jdi/EvalArraysAsList.sh is failing on jdk8 hotspot aix runs since 31/03/2020. Fails due to a syntax error in the test.

There is a lot of history on JBS for this bug and also some soloutions but only on jdk11+. This would need to be backported to jdk8 if this test is to pass

09:44:40  STDERR:
09:44:40  ShellScaffold.sh: Version
09:44:40  EvalArraysAsList.java:4: error: ')' expected
09:44:40          System.out.println("java.util.Arrays.asList(null, "a") returns: " + l);
09:44:40                                                             ^
09:44:40  EvalArraysAsList.java:4: error: not a statement
09:44:40          System.out.println("java.util.Arrays.asList(null, "a") returns: " + l);
09:44:40                                                                            ^
09:44:40  EvalArraysAsList.java:4: error: ';' expected
09:44:40          System.out.println("java.util.Arrays.asList(null, "a") returns: " + l);
09:44:40                                                                               ^
09:44:40  3 errors

Grinder Rebuild: https://ci.adoptopenjdk.net/job/Grinder/parambuild/?JDK_VERSION=8&JDK_IMPL=hotspot&BUILD_LIST=openjdk&PLATFORM=ppc64_aix&CUSTOM_TARGET=jdk/test/com/sun/jdi/EvalArraysAsList.sh&TARGET=jdk_custom_0

@M-Davies
Copy link
Contributor Author

M-Davies commented Apr 6, 2020

Exclude PR while local testing is underway #1719

@M-Davies
Copy link
Contributor Author

M-Davies commented Apr 6, 2020

I managed to recreate this on a local machine that failed in the exact same way.

Because of the way that aix uses quotes, the quotation marks are not escaped at https://github.com/AdoptOpenJDK/openjdk-jdk8u/blob/baec42c5baec170b8da5a2fae4388104530b6262/jdk/test/com/sun/jdi/EvalArraysAsList.sh#L42 which leads to the syntax error.

Adding in the changes from https://bugs.openjdk.java.net/browse/JDK-8207766 resolves the problem by adding in extra quotes to escape this semicolons.
https://github.com/M-Davies/openjdk-jdk8u/commit/bdf787bf8212c768ee4ff47b573b69f12dd89c81

----------System.out:(26/1386)----------
--Compiling first version of /home/jenkins/workspace/mrgTemp/jdk8u252-b08/bin/JTwork/classes/com/sun/jdi/aa6947200/EvalArraysAsList.java with options: 
compiling  EvalArraysAsList.java

--Starting jdb, address=
Listening at address: aix72p7rt1.canlab.ibm.com:32826
--Starting debuggee
Cmd: /home/jenkins/workspace/mrgTemp/jdk8u252-b08/bin/java  -classpath /home/jenkins/workspace/mrgTemp/jdk8u252-b08/bin/JTwork/classes/com/sun/jdi/aa6947200 -DHANGINGJAVA-6947200_DEB              -Djtreg.classDir=/home/jenkins/workspace/mrgTemp/jdk8u252-b08/bin/JTwork/classes/com/sun/jdi/aa6947200             -showversion              -agentlib:jdwp=transport=dt_socket,address=32826,server=n,suspend=y              EvalArraysAsList
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
Initializing jdb ...
> 
VM Started: No frames on the current call stack

main[1] Deferring breakpoint EvalArraysAsList:5.
It will be set after the class is loaded.
main[1] > Set deferred breakpoint EvalArraysAsList:5
java.util.Arrays.asList(null, "a") returns: [null, a]

Breakpoint hit: "thread=main", EvalArraysAsList.main(), line=5 bci=42
5            return;    // @1 breakpoint

main[1]  java.util.Arrays.asList(null, null) = "[null, null]"
main[1]  java.util.Arrays.asList(null, "a") = "[null, a]"
main[1]  java.util.Arrays.asList("a", null) = "[a, null]"
main[1] 
--Done: test passed

@andrew-m-leonard Could this be contributed/backported to jdk8? If so, what is the process for contributing? I'll admit I have not looked into it much but IIRC, it involves putting out an email on a mailing list somewhere?

@andrew-m-leonard
Copy link
Contributor

Yes this could be contributed, see: https://openjdk.java.net/contribute/

@M-Davies
Copy link
Contributor Author

Haven't seen any indication of this test failing recently https://ci.adoptopenjdk.net/view/Test_openjdk/job/Test_openjdk8_hs_sanity.openjdk_ppc64_aix/

@sophia-guo
Copy link
Contributor

Test has been excluded so no failure. Reopen it and if there is no failures when re-enabled we can close this.

@sophia-guo sophia-guo reopened this Mar 12, 2021
@karianna karianna added this to the March 2021 milestone Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants