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

Ignore JVMJ9VM090I message in java -version output #113

Merged
merged 1 commit into from
Apr 22, 2021

Conversation

Mesbah-Alam
Copy link
Contributor

@Mesbah-Alam Mesbah-Alam commented Apr 19, 2021

This PR is to Ignore JVMJ9VM090I messages in java -version output.

it should fix the related issue reported in to eclipse-openj9/openj9#12470. Meaning, next time we encounter network issues which cause java -version to output JVMJ9VM090I as below, STF would ignore it and continue.

GEN stderr Exception in thread "main" net.adoptopenjdk.stf.StfException: 'Java -version' output does not start with 'java version'. Actual output was: JVMJ9VM090I Slow response to network query (160 secs), check your IP DNS configuration
GEN stderr openjdk version "11.0.11-internal" 2021-04-20
GEN stderr OpenJDK Runtime Environment (build 11.0.11-internal+0-adhoc.jenkins.BuildJDK11ppc64aixNightly)
GEN stderr Eclipse OpenJ9 VM (build master-22fc5113773, JRE 11 AIX ppc64-64-Bit Compressed References 20210418_687 (JIT enabled, AOT enabled)
GEN stderr OpenJ9   - 22fc5113773
GEN stderr OMR      - 0f967b721d2
GEN stderr JCL      - ba1caf576ee based on jdk-11.0.11+8)

Signed-off-by: [email protected] [email protected]

@Mesbah-Alam
Copy link
Contributor Author

Tested : internal/Grinder/14822

Note: the original issue which causes java -version to output JVMJ9VM090I was not reproducible.

@Mesbah-Alam
Copy link
Contributor Author

@[email protected] - please review.

@Mesbah-Alam Mesbah-Alam self-assigned this Apr 19, 2021
@karianna karianna added this to the April 2021 milestone Apr 19, 2021
while (javaVersionOutput.startsWith("JVMJ9VM082E") || javaVersionOutput.startsWith("JIT:")) {
// Eat superfluous first lines (e.g. JIT: env var TR_OPTIONS etc, or JVMJ9VM082E Unable to switch to IFA processor,
// or JVMJ9VM090I Slow response to network query)
while (javaVersionOutput.startsWith("JVMJ9VM082E") || javaVersionOutput.startsWith("JIT:")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be more robust to skip anything that starts with "JVMJ9VM" rather than these specific messages. Not sure if there are other possibilities besides these two, and additional ones could be added in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see! Agreed. Updated PR.

@llxia
Copy link
Contributor

llxia commented Apr 19, 2021

Does it make sense to use String.matches() with regex (openjdk|java) version? We just need to validate that java -version output contains (openjdk|java) version. Does it matter if it contains any other messages?

@Mesbah-Alam
Copy link
Contributor Author

We just need to validate that java -version output contains (openjdk|java) version

The way this piece of STF code was implemented is suggestive of the fact that the people involved in coding it had decided to validate if java -version output starts with 'java version'. I have no knowledge of why they decided to do that.

If we want to change this check's criteria, we can change it to whatever we want. We just need to come to an agreement. That's all.

FYI @lumpfish

@Mesbah-Alam
Copy link
Contributor Author

@llxia : As discussed at the AQAvit call, could we deliver this PR so that it unblocks build from any reoccurrence of the issue reported in eclipse-openj9/openj9#12470?

As the next step, I'll create a second issue to remove the version check altogether and update the logic of figuring out various Java versions in JavaVersion.java to depend on Java system properties instead of parsing java -version output.

@Mesbah-Alam Mesbah-Alam merged commit b6833d9 into adoptium:master Apr 22, 2021
@Mesbah-Alam
Copy link
Contributor Author

Issue for second step mentioned above: #114

@smlambert
Copy link
Contributor

We are still technically in a code freeze for release week.

@Mesbah-Alam
Copy link
Contributor Author

We are still technically in a code freeze for release week.

That was a slip from my side!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants