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-8325862: set -XX:+ErrorFileToStderr when executing java in containers for some container related jtreg tests #17874

Closed
wants to merge 1 commit into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Feb 15, 2024

To get easier access to the hserr file content, -XX:+ErrorFileToStderr should be set when executing test parts in a container.
Examples are the docker/container tests starting (docker) containers with java processes inside the container and not on the host.


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-8325862: set -XX:+ErrorFileToStderr when executing java in containers for some container related jtreg tests (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17874

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 15, 2024

👋 Welcome back mbaesken! 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 openjdk bot added the rfr Pull request is ready for review label Feb 15, 2024
@openjdk
Copy link

openjdk bot commented Feb 15, 2024

@MBaesken 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 Feb 15, 2024
@mlbridge
Copy link

mlbridge bot commented Feb 15, 2024

Webrevs

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

This seems OK.

Note that container tests are pretty verbose when it comes to test output. Usually stderr/stdout get capped by jtreg and sent to a file instead. IIUC the use case would be to get hs_err.log files to stderr in case of crashes. However, if the stderr value gets truncated, then you'd be back at square one.

@tstuefe
Copy link
Member

tstuefe commented Feb 16, 2024

This seems OK.

Note that container tests are pretty verbose when it comes to test output. Usually stderr/stdout get capped by jtreg and sent to a file instead. IIUC the use case would be to get hs_err.log files to stderr in case of crashes. However, if the stderr value gets truncated, then you'd be back at square one.

Still quite useful, since the most interesting information are at the top.

That said, the verbatim /proc/pid/maps dumping into hs-err has been bugging me for years. This can cause hs-err files in the GB range if address space is very fragmented. But the Oracle folks really like this feature, so...

Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

I think this is very useful. I remember proposing this for all jtreg tests once, but @coleenp (?) didn't like this because of the output bloat this could cause.

@jerboaa securitywise we are fine, here, right? eg crash dumps from these tests don't contain anything exciting?

@openjdk
Copy link

openjdk bot commented Feb 16, 2024

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

8325862: set -XX:+ErrorFileToStderr when executing java in containers for some container related jtreg tests

Reviewed-by: sgehwolf, stuefe, mdoerr

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

  • 0aaec97: 8325763: Revert properties: vm.opt.x.*
  • 4018b2b: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin
  • 2705ed0: 8325074: ZGC fails assert(index == 0 || is_power_of_2(index)) failed: Incorrect load shift: 11
  • 3d85103: 8316813: NMT: Using WhiteBox API, virtual memory tracking should also be stressed in JMH tests
  • ba8db1f: 8325876: crashes in docker container tests on Linuxppc64le Power8 machines
  • 18cea82: 8319801: Recursive lightweight locking: aarch64 implementation
  • 9029bf6: 8316451: 6 java/lang/instrument/PremainClass tests ignore VM flags
  • 99c9ae1: 8323664: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java still fails with JNI warning on some Windows configurations
  • 0fdfdf7: 8325983: Build failure after JDK-8324580
  • 3b1062d: 8322239: [macos] a11y : java.lang.NullPointerException is thrown when focus is moved on the JTabbedPane
  • ... and 10 more: https://git.openjdk.org/jdk/compare/1aae980c549741cf5fc5ca51f3c299285bafa49d...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 Feb 16, 2024
@jerboaa
Copy link
Contributor

jerboaa commented Feb 16, 2024

crash dumps from these tests don't contain anything exciting?

I wouldn't think so.

@MBaesken
Copy link
Member Author

However, if the stderr value gets truncated, then you'd be back at square one.

I saw this when testing the change, however 1) the most part of the stack/backtrace was still visible in stderr so this was good 2) test rest of the truncated hserr was in a separate file but on the host, which was good for me.

@jerboaa
Copy link
Contributor

jerboaa commented Feb 16, 2024

However, if the stderr value gets truncated, then you'd be back at square one.

I saw this when testing the change, however 1) the most part of the stack/backtrace was still visible in stderr so this was good 2) test rest of the truncated hserr was in a separate file but on the host, which was good for me.

Good, thanks.

@MBaesken
Copy link
Member Author

Hi Thomas and Severin, thanks for the reviews !

/integrate

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr 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 Feb 16, 2024

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

  • 0aaec97: 8325763: Revert properties: vm.opt.x.*
  • 4018b2b: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin
  • 2705ed0: 8325074: ZGC fails assert(index == 0 || is_power_of_2(index)) failed: Incorrect load shift: 11
  • 3d85103: 8316813: NMT: Using WhiteBox API, virtual memory tracking should also be stressed in JMH tests
  • ba8db1f: 8325876: crashes in docker container tests on Linuxppc64le Power8 machines
  • 18cea82: 8319801: Recursive lightweight locking: aarch64 implementation
  • 9029bf6: 8316451: 6 java/lang/instrument/PremainClass tests ignore VM flags
  • 99c9ae1: 8323664: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java still fails with JNI warning on some Windows configurations
  • 0fdfdf7: 8325983: Build failure after JDK-8324580
  • 3b1062d: 8322239: [macos] a11y : java.lang.NullPointerException is thrown when focus is moved on the JTabbedPane
  • ... and 10 more: https://git.openjdk.org/jdk/compare/1aae980c549741cf5fc5ca51f3c299285bafa49d...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Feb 16, 2024

@MBaesken Pushed as commit 9f4ec21.

💡 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
Development

Successfully merging this pull request may close these issues.

4 participants