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

8328066: WhiteBoxResizeTest failure on linux-x86: Could not reserve enough space for 2097152KB object heap #18290

Closed
wants to merge 3 commits into from

Conversation

jaikiran
Copy link
Member

@jaikiran jaikiran commented Mar 14, 2024

Can I please get a review of this test-only change which proposes to address https://bugs.openjdk.org/browse/JDK-8328066?

The test launches a JVM with 2G heap (-Xmx2G) and as noted in that issue, the failure was observed on linux-86 instance on a GitHub jobs run.

The commit in this PR proposes to add relevant @requires so that the test is only run on 64 bit VM and expects the os.maxMemory to be > 2G.

The change has been tested on a linux-x86 run in GitHub actions job, plus even on local and CI 64 bit VM environments. No failures have been noticed.


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-8328066: WhiteBoxResizeTest failure on linux-x86: Could not reserve enough space for 2097152KB object heap (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18290

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 14, 2024

👋 Welcome back jpai! 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 Mar 14, 2024

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

8328066: WhiteBoxResizeTest failure on linux-x86: Could not reserve enough space for 2097152KB object heap

Reviewed-by: dfuchs, aph, msheppar

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

  • 80ccc98: 8328075: Shenandoah: Avoid forwarding when objects don't move in full-GC
  • 5249cc0: 8328087: Automate javax/swing/JTable/TAB/TAB.java applet test
  • c05f8c7: 8316388: Opensource five Swing component related regression tests
  • b8dfeaf: 8328158: Convert java/awt/Choice/NonFocusablePopupMenuTest to automatic main test
  • d57bdd8: 8328165: improve assert(idx < _maxlrg) failed: oob
  • 128e60a: 8328037: Test java/util/Formatter/Padding.java has unnecessary high heap requirement after JDK-8326718
  • 06f4b7f: 8327756: Convert javax/swing/JSlider/4987336/bug4987336.java applet to main
  • 605800e: 8203867: Delete test java/awt/TrayIcon/DblClickActionEventTest/DblClickActionEventTest.html
  • 0943937: 8328218: Delete test java/awt/Window/FindOwner/FindOwner.html
  • f6390e5: 8328089: Automate javax/swing/JTable/4222153/bug4222153.java applet test
  • ... and 58 more: https://git.openjdk.org/jdk/compare/107cb536e75509ad63b245d20772eb2c3f73d595...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 rfr Pull request is ready for review label Mar 14, 2024
@openjdk
Copy link

openjdk bot commented Mar 14, 2024

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

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Mar 14, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 14, 2024

Webrevs

Copy link
Member

@dfuch dfuch left a comment

Choose a reason for hiding this comment

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

LGTM.

I see that some other tests have things like:

* @requires vm.bits == "64" & os.maxMemory > 4G

Not sure what is the preferred form in such cases: two @requires or a single one?

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 14, 2024
@jaikiran
Copy link
Member Author

Hello Daniel,

LGTM.

I see that some other tests have things like:

* @requires vm.bits == "64" & os.maxMemory > 4G

Not sure what is the preferred form in such cases: two @requires or a single one?

As per jtreg doc, semantically they would be the same:

The @requires tag may be used multiple times in a given test. If it is used more than once, the expressions in the individual instances will be enclosed in parentheses and combined with '&'.

However, your suggestion I think is a good one, since it makes it quicker to notice the requirements instead of having it spread across on multiple lines. I'll update the PR to implement your suggestion.

@msheppar
Copy link

I think the os.maxMemory is an artificial constraint.
a requirement to run on 64 bit machine should be sufficient
@requires vm.bits == "64"

as the issue relates to the max user virtual address space available on 32 bit architecture

@msheppar
Copy link

maybe ask the question: why does the test need 2GB ? Would 1Gb suffice and that would be within the allocation limits for 32 bit architectures virtual address space.

@jaikiran
Copy link
Member Author

Hello Mark,

maybe ask the question: why does the test need 2GB ? Would 1Gb suffice and that would be within the allocation limits for 32 bit architectures virtual address space.

The reason why 2GB is needed in this test is explained in https://bugs.openjdk.org/browse/JDK-8285386.

I see that Andrew (and previously Daniel) have approved this change and the updated version checks only for vm.bits == 64 as suggested by you. If you think the current form of the PR looks good, then I'll go ahead and integrate this - since I don't plan to investigate an ideal heap size for running this on 32 bit VMs.

@msheppar
Copy link

msheppar commented Mar 15, 2024

The reason why 2GB is needed in this test is explained in https://bugs.openjdk.org/browse/JDK-8285386.

ok thanks ... i'll re-read

c.f. comment in JDK-8285386.

"Some internal discussion reveals that the default heap size for running tests is 768 MB. (Tests are run with -Xmx768m.) The test allocates a HashMap with capacity (array length) of 134217728. This consumes about 536MB with compressed OOPS (4 bytes per array element), but 1072MB without compressed OOPS (8 bytes per array element). That explains the failures in the configurations where compressed OOPS is disabled.

I'll change the test to require 2GB of heap (-Xmx2g) which should accommodate the array allocation, and which should run easily on all our test machine configurations."

@jaikiran
Copy link
Member Author

Thank you Mark, Daniel and Andrew for the reviews. I'll go ahead and integrate this now.

@jaikiran
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 15, 2024

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

  • 80ccc98: 8328075: Shenandoah: Avoid forwarding when objects don't move in full-GC
  • 5249cc0: 8328087: Automate javax/swing/JTable/TAB/TAB.java applet test
  • c05f8c7: 8316388: Opensource five Swing component related regression tests
  • b8dfeaf: 8328158: Convert java/awt/Choice/NonFocusablePopupMenuTest to automatic main test
  • d57bdd8: 8328165: improve assert(idx < _maxlrg) failed: oob
  • 128e60a: 8328037: Test java/util/Formatter/Padding.java has unnecessary high heap requirement after JDK-8326718
  • 06f4b7f: 8327756: Convert javax/swing/JSlider/4987336/bug4987336.java applet to main
  • 605800e: 8203867: Delete test java/awt/TrayIcon/DblClickActionEventTest/DblClickActionEventTest.html
  • 0943937: 8328218: Delete test java/awt/Window/FindOwner/FindOwner.html
  • f6390e5: 8328089: Automate javax/swing/JTable/4222153/bug4222153.java applet test
  • ... and 58 more: https://git.openjdk.org/jdk/compare/107cb536e75509ad63b245d20772eb2c3f73d595...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 15, 2024

@jaikiran Pushed as commit dde519d.

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

@jaikiran jaikiran deleted the 8328066 branch March 15, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants