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

8276252: java/nio/channels/Channels/TransferTo.java failed with OOM java heap space error #6219

Closed
wants to merge 1 commit into from

Conversation

bplb
Copy link
Member

@bplb bplb commented Nov 2, 2021

This request proposes to change the test to run in othervm mode.


Progress

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

Issue

  • JDK-8276252: java/nio/channels/Channels/TransferTo.java failed with OOM java heap space error

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6219

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

Using diff file

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

@bplb
Copy link
Member Author

bplb commented Nov 2, 2021

The working assumption is that it failed in an agent VM running multiple tests which in the aggregate use up heap memory.

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 2, 2021

👋 Welcome back bpb! 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 Nov 2, 2021
@openjdk
Copy link

openjdk bot commented Nov 2, 2021

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

  • nio

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 nio nio-dev@openjdk.org label Nov 2, 2021
@mlbridge
Copy link

mlbridge bot commented Nov 2, 2021

Webrevs

@@ -52,7 +52,7 @@
* @test
* @library /test/lib
* @build jdk.test.lib.RandomFactory
* @run testng TransferTo
* @run testng/othervm TransferTo
Copy link
Member

Choose a reason for hiding this comment

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

Hello Brian, should this also perhaps set the -Xmx value to a higher value or is the current VM defaults for max heap size on all VMs expected to be big enough for this test?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hello Brian, should this also perhaps set the -Xmx value to a higher value or is the current VM defaults for max heap size on all VMs expected to be big enough for this test?

This may be helpful as this test needs to do some big transfer. For the specific OOME sighting then I suspect it may be more to do with how the tests are run. From what I can tell, it's running a very large group of tests and it's likely that the agent VM has been running for a long time. It could be that other tests that ran previously in this VM have left things behind.

Copy link
Member Author

Choose a reason for hiding this comment

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

The version of the test proposed here passes with the command line option -Xmx512M, so if the default maximum heap size is really half the physical memory then I don't think it is necessary to set -Xmx.

Copy link

Choose a reason for hiding this comment

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

on the machine env where the failure has occurred we see that JVM has default heap size at 30GB and the machine has physical memory at 762GB

Copy link
Member Author

Choose a reason for hiding this comment

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

So we would not expect an OOME for the test unless something else were gobbling up the heap memory.

Copy link

Choose a reason for hiding this comment

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

I've just checked the jtreg parameters for vm options and the -Xmx512M is set for the test
also sets a I've just checked and the test is not run with default option, but with explicit setting of 512MB
a MAX_RAM_PERCENTAGE option

-vmoption:-XX:MaxRAMPercentage=$MAX_RAM_PERCENTAGE

MAX_RAM_PERCENTAGE == 25/18 which rounds up to 1

@openjdk
Copy link

openjdk bot commented Nov 5, 2021

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

8276252: java/nio/channels/Channels/TransferTo.java  failed with OOM java heap space error

Reviewed-by: lancea

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

  • 92d2176: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12
  • a74a839: 8276571: C2: pass compilation options as structure
  • c393ee8: 8276632: Use blessed modifier order in security-libs code
  • 7023b3f: 8276628: Use blessed modifier order in serviceability code
  • b933136: 8276641: Use blessed modifier order in jshell
  • 0616d86: 8276635: Use blessed modifier order in compiler code
  • d95299a: 8276634: Remove usePlainDatagramSocketImpl option from the test DatagramChannel/SendReceiveMaxSize.java
  • 3c0faa7: 8276173: Clean up and remove unneeded casts in HeapDumper
  • 323d201: 8275506: Rename allocated_on_stack to allocated_on_stack_or_embedded
  • 96c396b: 8276151: AArch64: Incorrect result for double to int vector conversion
  • ... and 48 more: https://git.openjdk.java.net/jdk/compare/bb92fb02ca8c5795989065a9037748dc39ed77db...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 Nov 5, 2021
@bplb
Copy link
Member Author

bplb commented Nov 5, 2021

/integrate

@openjdk
Copy link

openjdk bot commented Nov 5, 2021

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

  • 92d2176: 8273967: gtest os.dll_address_to_function_and_library_name_vm fails on macOS12
  • a74a839: 8276571: C2: pass compilation options as structure
  • c393ee8: 8276632: Use blessed modifier order in security-libs code
  • 7023b3f: 8276628: Use blessed modifier order in serviceability code
  • b933136: 8276641: Use blessed modifier order in jshell
  • 0616d86: 8276635: Use blessed modifier order in compiler code
  • d95299a: 8276634: Remove usePlainDatagramSocketImpl option from the test DatagramChannel/SendReceiveMaxSize.java
  • 3c0faa7: 8276173: Clean up and remove unneeded casts in HeapDumper
  • 323d201: 8275506: Rename allocated_on_stack to allocated_on_stack_or_embedded
  • 96c396b: 8276151: AArch64: Incorrect result for double to int vector conversion
  • ... and 48 more: https://git.openjdk.java.net/jdk/compare/bb92fb02ca8c5795989065a9037748dc39ed77db...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 5, 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 Nov 5, 2021
@openjdk
Copy link

openjdk bot commented Nov 5, 2021

@bplb Pushed as commit b01f107.

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

@bplb bplb deleted the Channels-TransferTo-8276252 branch November 5, 2021 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated nio nio-dev@openjdk.org
5 participants