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

JDK-8313781: Add regression tests for large page logging and user-facing error messages #15159

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Aug 4, 2023

In preparation for the UseSHM removal (https://bugs.openjdk.org/browse/JDK-8310841) I'd like more regression tests.

The new test basically checks the behavior of the JVM when confronted with different variations of:

  • OS capabilities
  • JVM settings.

For example: If the JVM is started with -XX:+UseLargePages, but on the OS side there are no huge pages configured, or the kernel does not even support hugepages, the JVM should disable large pages and issue a warning.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8313781: Add regression tests for large page logging and user-facing error messages (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15159/head:pull/15159
$ git checkout pull/15159

Update a local copy of the PR:
$ git checkout pull/15159
$ git pull https://git.openjdk.org/jdk.git pull/15159/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15159

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15159.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 4, 2023

👋 Welcome back stuefe! 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 Aug 4, 2023

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

  • hotspot-runtime

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-runtime hotspot-runtime-dev@openjdk.org label Aug 4, 2023
@tstuefe tstuefe marked this pull request as ready for review August 5, 2023 10:25
@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 5, 2023
@mlbridge
Copy link

mlbridge bot commented Aug 5, 2023

@tstuefe
Copy link
Member Author

tstuefe commented Aug 10, 2023

Any takers?

Copy link
Contributor

@kstefanj kstefanj left a comment

Choose a reason for hiding this comment

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

Looks good, just one minor thing.

I saw the comment about LargePageSizeInBytes and thought that it should be required away but realized that ProcessTools.createJavaProcessBuilder() doesn't add the passed in options.

Also did some manual runs on an aarch64 system where the default 512m pages are not configured but the 2m pages are. This seem to generate output which will be accepted by the test.

@openjdk
Copy link

openjdk bot commented Aug 15, 2023

@tstuefe 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:

8313781: Add regression tests for large page logging and user-facing error messages

Reviewed-by: sjohanss, dholmes

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 79 new commits pushed to the master branch:

  • 9123961: 8318096: Introduce AsymmetricKey interface with a getParams method
  • 4a142c3: 8274122: java/io/File/createTempFile/SpecialTempFile.java fails in Windows 11
  • 77fe0fd: 8272215: Add InetAddress methods for parsing IP address literals
  • a9b31b5: 8318689: jtreg is confused when folder name is the same as the test name
  • e1a458e: 8318834: s390x: Debug builds are missing debug helpers
  • 40a3c35: 8318723: RISC-V: C2 UDivL
  • 3885dc5: 8318737: Fallback linker passes bad JNI handle
  • 9864951: 8318447: Move NMT source code to own subdirectory
  • 744e089: 8318700: MacOS Zero cannot run gtests due to wrong JVM path
  • ec1bf23: 8318801: Parallel: Remove unused verify_all_young_refs_precise
  • ... and 69 more: https://git.openjdk.org/jdk/compare/ff5c5b6541b43a1323ba08f7a086e64de197edda...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 Aug 15, 2023
tstuefe and others added 5 commits August 15, 2023 14:50
Co-authored-by: Stefan Johansson <54407259+kstefanj@users.noreply.github.com>
…-and-user-facing-error-messages' of github.com:tstuefe/jdk into JDK-8313781-Add-regression-tests-for-large-page-logging-and-user-facing-error-messages
@openjdk
Copy link

openjdk bot commented Aug 15, 2023

⚠️ @tstuefe This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@tstuefe
Copy link
Member Author

tstuefe commented Aug 15, 2023

Thanks @kstefanj!

Since we just changed the error warning texts (#15158), I needed to change the error text somewhat.

I then retested on x64 with the following configurations:

  • No Hugepages configured (but supported by kernel) and:

    • THP "never"
    • THP "always"
    • THP "advise"
  • THP "never" and 2M default hugepage size and:

    • nonzero Hugepages enabled (2M)
    • nonzero Hugepages enabled (1G)
    • nonzero Hugepages enabled (2M, 1G)
  • THP "never" and 1G default hugepage size (via kernel parameter) and nonzero 1G Hugepages
    ( this uncovered a small test bug where "buildSizeString()" had been wrong)

  • Hugepages completely absent on a kernel built without hugepages (aarch64 SBC)
    (this uncovered another test bug where HugePageConfiguration would fall back to THP mode "unknown" which then confused the test. I removed that enum value.)

All issues have been fixed.

Copy link
Contributor

@kstefanj kstefanj left a comment

Choose a reason for hiding this comment

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

Great amount of testing, thanks!

I also made 3 more suggestions as the other one for the else ifs. Forgot that one could integrate them directly so just did one last time.

tstuefe and others added 3 commits August 17, 2023 16:35
Co-authored-by: Stefan Johansson <54407259+kstefanj@users.noreply.github.com>
Co-authored-by: Stefan Johansson <54407259+kstefanj@users.noreply.github.com>
Co-authored-by: Stefan Johansson <54407259+kstefanj@users.noreply.github.com>
@tstuefe
Copy link
Member Author

tstuefe commented Aug 17, 2023

Thanks @kstefanj !

Took over your suggestions, they make the code look cleaner.

@tstuefe
Copy link
Member Author

tstuefe commented Aug 22, 2023

Friendly ping

@tstuefe
Copy link
Member Author

tstuefe commented Aug 31, 2023

Friendly ping.

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 28, 2023

@tstuefe This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

…or-large-page-logging-and-user-facing-error-messages
…or-large-page-logging-and-user-facing-error-messages
…or-large-page-logging-and-user-facing-error-messages
@tstuefe
Copy link
Member Author

tstuefe commented Oct 24, 2023

Friendly ping. Only need a second review.

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.

Seems okay. Thanks

@tstuefe
Copy link
Member Author

tstuefe commented Oct 27, 2023

Thank you, David!

/integrate

@openjdk
Copy link

openjdk bot commented Oct 27, 2023

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

  • 9123961: 8318096: Introduce AsymmetricKey interface with a getParams method
  • 4a142c3: 8274122: java/io/File/createTempFile/SpecialTempFile.java fails in Windows 11
  • 77fe0fd: 8272215: Add InetAddress methods for parsing IP address literals
  • a9b31b5: 8318689: jtreg is confused when folder name is the same as the test name
  • e1a458e: 8318834: s390x: Debug builds are missing debug helpers
  • 40a3c35: 8318723: RISC-V: C2 UDivL
  • 3885dc5: 8318737: Fallback linker passes bad JNI handle
  • 9864951: 8318447: Move NMT source code to own subdirectory
  • 744e089: 8318700: MacOS Zero cannot run gtests due to wrong JVM path
  • ec1bf23: 8318801: Parallel: Remove unused verify_all_young_refs_precise
  • ... and 69 more: https://git.openjdk.org/jdk/compare/ff5c5b6541b43a1323ba08f7a086e64de197edda...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 27, 2023
@openjdk openjdk bot closed this Oct 27, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 27, 2023
@openjdk
Copy link

openjdk bot commented Oct 27, 2023

@tstuefe Pushed as commit abad040.

💡 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
3 participants