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

8274033: Some tier-4 CDS EpsilonGC tests throw OOM #5626

Closed
wants to merge 3 commits into from

Conversation

iklam
Copy link
Member

@iklam iklam commented Sep 22, 2021

Problem:

In Oracle hs-tier4, in order to test the support of archived heap objects in EpsilonGC, we run all test cases under open/test/hotspot/jtreg/runtime/cds with -Dtest.cds.runtime.options=-XX:+UnlockExperimentalVMOptions,-XX:+UseEpsilonGC. Some of those tests may create a lot of objects, some of those will eventually become unreferenced. Because EpsilonGC cannot collect garbage, the tests will fail with OOM.

Fix:

Limit the set of tests to be executed by introducing a test group hotspot_cds_epsilongc. This reduces the number of tests from 200+ to about 50. The problematic runtime/cds/appcds/methodHandles cases are excluded.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8274033: Some tier-4 CDS EpsilonGC tests throw OOM

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5626/head:pull/5626
$ git checkout pull/5626

Update a local copy of the PR:
$ git checkout pull/5626
$ git pull https://git.openjdk.java.net/jdk pull/5626/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5626

View PR using the GUI difftool:
$ git pr show -t 5626

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5626.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 22, 2021

👋 Welcome back iklam! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 22, 2021

@iklam The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Sep 22, 2021
@iklam
Copy link
Member Author

iklam commented Sep 22, 2021

/label remove hotspot
/label add hotspot-runtime

@openjdk openjdk bot removed the hotspot hotspot-dev@openjdk.org label Sep 22, 2021
@openjdk
Copy link

openjdk bot commented Sep 22, 2021

@iklam
The hotspot label was successfully removed.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Sep 22, 2021
@openjdk
Copy link

openjdk bot commented Sep 22, 2021

@iklam
The hotspot-runtime label was successfully added.

@iklam iklam marked this pull request as ready for review September 22, 2021 05:56
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 22, 2021
@mlbridge
Copy link

mlbridge bot commented Sep 22, 2021

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Hi Ioi,

The changes to the test files seem unrelated to the current issue. ??

The group change seems okay but please add a comment.

Thanks,
David

@@ -399,6 +399,17 @@ hotspot_cds_verify_shared_spaces = \
runtime/cds/appcds/jvmti/dumpingWithAgent/DumpingWithJavaAgent.java \
runtime/cds/appcds/sharedStrings/SharedStringsBasic.java

hotspot_cds_epsilongc = \
Copy link
Member

Choose a reason for hiding this comment

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

I don't know why we don't comment groups in this file but please add a comment here that these are low-memory using tests that won't fail (with a reasonable heap size) when run with a fake GC.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a comment.

@iklam
Copy link
Member Author

iklam commented Sep 22, 2021

The changes to the test files seem unrelated to the current issue. ??

The fix in DynamicArchiveTestBase.java is needed because we were not passing -XX:+UseEpsilonGC to dynamicArchive/HelloDynamic.java (even when this file is in the hotspot_cds_epsilongc group).

@@ -399,6 +399,8 @@ hotspot_cds_verify_shared_spaces = \
runtime/cds/appcds/jvmti/dumpingWithAgent/DumpingWithJavaAgent.java \
runtime/cds/appcds/sharedStrings/SharedStringsBasic.java

# No need to run ever test with EpsilonGC. A small subset will provide enough
Copy link
Member

Choose a reason for hiding this comment

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

s/ever/every/

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

The fix to DynamicArchiveTestBase.java still seems like an independent fix to a test not directly related to the subject of this issue. If we aren't passing -XX:+UseEpsilonGC then presumably we are not passing -XX:UseXGC for any X?

@@ -590,6 +590,11 @@ public static OutputAnalyzer checkExecReturn(OutputAnalyzer output, int ret,
}


public static String[] concat(ArrayList<String> prefix, String... extra) {
Copy link
Member

Choose a reason for hiding this comment

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

So you start with an ArrayList<String> then convert that to a String[] which you pass to a function that then creates a new ArrayList<String>, adds all the Strings to it and then converts it to a String[] again! can't help but think there has to be a simpler way to combine an ArrayList with a String[] ??

Copy link
Contributor

Choose a reason for hiding this comment

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

Could use the prefix, add extra to the list then prefix.toArray to avoid such conversion between ArrayList and array.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've removed this code from the current PR. I found other cases where the "runtime prefix" was not passed to child processes. I'll do a more general fix in https://bugs.openjdk.java.net/browse/JDK-8274166

Copy link
Member

@calvinccheung calvinccheung left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk
Copy link

openjdk bot commented Sep 22, 2021

@iklam This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8274033: Some tier-4 CDS EpsilonGC tests throw OOM

Reviewed-by: dholmes, ccheung, minqi

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 26 new commits pushed to the master branch:

  • 6031388: 8273714: jdk/jfr/api/consumer/TestRecordedFrame.java still times out after JDK-8273047
  • 8821b00: 8205137: Remove Applet support from SwingSet2
  • 57fe11c: 8274120: [JVMCI] CompileBroker should resolve parameter types for JVMCI compiles
  • 81d4164: 8272759: (fc) java/nio/channels/FileChannel/Transfer2GPlus.java failed in timeout
  • da38ced: 8271602: Add Math.ceilDiv() family parallel to Math.floorDiv() family
  • d39aad9: 8273924: ArrayIndexOutOfBoundsException thrown in java.util.JapaneseImperialCalendar.add()
  • c9de806: 8274039: codestrings gtest fails when hsdis is present
  • 33df388: 8274003: ProcessHandleImpl.Info toString has an if check which is always true
  • 0a36163: 8272600: (test) Use native "sleep" in Basic.java
  • c6df3c9: 8274071: Clean up java.lang.ref comments and documentation
  • ... and 16 more: https://git.openjdk.java.net/jdk/compare/0fc47e99d20a1ee886df878f1302769bdd913aab...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 22, 2021
Copy link
Contributor

@yminqi yminqi left a comment

Choose a reason for hiding this comment

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

LGTM.

@iklam
Copy link
Member Author

iklam commented Sep 23, 2021

Thanks @calvinccheung @dholmes-ora @yminqi for the review.
/integrate

@openjdk
Copy link

openjdk bot commented Sep 23, 2021

Going to push as commit 0fbbe4c.
Since your change was applied there have been 27 commits pushed to the master branch:

  • 9d3379b: 8267356: AArch64: Vector API SVE codegen support
  • 6031388: 8273714: jdk/jfr/api/consumer/TestRecordedFrame.java still times out after JDK-8273047
  • 8821b00: 8205137: Remove Applet support from SwingSet2
  • 57fe11c: 8274120: [JVMCI] CompileBroker should resolve parameter types for JVMCI compiles
  • 81d4164: 8272759: (fc) java/nio/channels/FileChannel/Transfer2GPlus.java failed in timeout
  • da38ced: 8271602: Add Math.ceilDiv() family parallel to Math.floorDiv() family
  • d39aad9: 8273924: ArrayIndexOutOfBoundsException thrown in java.util.JapaneseImperialCalendar.add()
  • c9de806: 8274039: codestrings gtest fails when hsdis is present
  • 33df388: 8274003: ProcessHandleImpl.Info toString has an if check which is always true
  • 0a36163: 8272600: (test) Use native "sleep" in Basic.java
  • ... and 17 more: https://git.openjdk.java.net/jdk/compare/0fc47e99d20a1ee886df878f1302769bdd913aab...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 23, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 23, 2021
@openjdk
Copy link

openjdk bot commented Sep 23, 2021

@iklam Pushed as commit 0fbbe4c.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
5 participants