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

8265349: vmTestbase/../stress/compiler/deoptimize/Test.java fails with OOME due to CodeCache exhaustion. #3762

Closed
wants to merge 4 commits into from

Conversation

@lepestock
Copy link
Contributor

@lepestock lepestock commented Apr 28, 2021

The bug: https://bugs.openjdk.java.net/browse/JDK-8265349

A repetition of the JDK-8058176 (mlvm tests cause code cache exhaustion), this time with -Xcomp. My measurements show up max code cache consumption of 400-500 kb per test thread and tree (depends on random tree and other factors, of course, but still). For the whole test which usually doesn't exceed 10 threads, I've got max. value of 6.1M for one sequence/tree build (between checks for remaining free space).

So I suggest to raise the allowances to 10M, just to be safe. Compared to the 103 Mb of required code cache space that test requests via the 'run' parameter, it doesn't look that much.

Thanks in advance,
// Evgeny Nikitin.


Progress

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

Issue

  • JDK-8265349: vmTestbase/../stress/compiler/deoptimize/Test.java fails with OOME due to CodeCache exhaustion.

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3762

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 28, 2021

👋 Welcome back enikitin! 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.

Loading

@openjdk openjdk bot added the rfr label Apr 28, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 28, 2021

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

  • hotspot-compiler

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.

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 28, 2021

Loading

@iignatev
Copy link
Member

@iignatev iignatev commented Apr 28, 2021

Will it make sense to make NON_SEGMENTED_CACHE_ALLOWANCE / SEGMENTED_CACHE_ALLOWANCE value dependent on Platform::isComp?

Loading

@lepestock
Copy link
Contributor Author

@lepestock lepestock commented Apr 28, 2021

Will it make sense to make NON_SEGMENTED_CACHE_ALLOWANCE / SEGMENTED_CACHE_ALLOWANCE value dependent on Platform::isComp?

Please take a look at the new version. I measured code cache usage without the Xcomp, and it falls within 1-2MB per cycle/tree with 10 threads setup (I've did several runs). I suggest 5M in this case, just to be sure we'll not hit some high-amplitude resonance.

Loading

Copy link
Member

@iignatev iignatev left a comment

I don't like that we kinda guessing here, but on the other hand, I don't think we have much of the choice.

could you please add the comment which roughly explains why it's 10kk and 5kk? so the next person who reads/modifies this piece of code will have an idea of how/why we get the current numbers.

Loading

@lepestock
Copy link
Contributor Author

@lepestock lepestock commented Apr 29, 2021

I don't like that we kinda guessing here, but on the other hand, I don't think we have much of the choice.

could you please add the comment which roughly explains why it's 10kk and 5kk? so the next person who reads/modifies this piece of code will have an idea of how/why we get the current numbers.

I've added an explanation and extracted the code cache monitoring in a sub-class (because it had lots of members and explanations dedicated only to this functionality).

Loading

Copy link
Member

@iignatev iignatev left a comment

other than a typo, LGTM.

Loading

// | 1 | 100-200 K | 400-500 K |
// | 10 | 1 - 2 M | 5-6 M |
//
// Those numbers are approximate (since threes are generated randomly and the total consumption
Copy link
Member

@iignatev iignatev Apr 30, 2021

Choose a reason for hiding this comment

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

s/threes/trees/ ?

Loading

Copy link
Contributor Author

@lepestock lepestock Apr 30, 2021

Choose a reason for hiding this comment

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

s/threes/trees/ ?

How did you know that these were not actual threes / troikas? :))

Fixed, thanks.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 30, 2021

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

8265349: vmTestbase/../stress/compiler/deoptimize/Test.java fails with OOME due to CodeCache exhaustion.

Reviewed-by: iignatyev

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

  • 001c514: 8265322: C2: Simplify control inputs for BarrierSetC2::obj_allocate
  • 194bcec: 8265984: Concurrent GC: Some tests fail "assert(is_frame_safe(f)) failed: Frame must be safe"
  • 1d9ea3a: 8266083: Shenandoah: Consolidate dedup/no dedup oop closures
  • 80941f4: 8234446: Post-CMS workgroup hierarchy cleanup
  • ac760c7: 8266295: Remove unused _concurrent_iteration_safe_limit
  • b42d496: 8266388: C2: Improve constant ShiftCntV on x86
  • 05cfac9: 8266412: Remove redundant TemplateInterpreter entries
  • c5dc657: 8266056: runtime/stringtable/StringTableCleaningTest.java failed with "RuntimeException: Missing Callback in [10, 11]"
  • 8fa50eb: 8263363: Minor cleanup of Lanai code - unused code removal and comments correction
  • 7e30130: 8266401: mark hotspot compiler/intrinsics/sha/cli tests which ignore VM flags
  • ... and 71 more: https://git.openjdk.java.net/jdk/compare/343a4a76f273078f78897e8fb7e695bc2c111536...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@iignatev) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

Loading

@openjdk openjdk bot added the ready label Apr 30, 2021
@lepestock
Copy link
Contributor Author

@lepestock lepestock commented May 3, 2021

/integrate

Loading

@openjdk openjdk bot added the sponsor label May 3, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 3, 2021

@lepestock
Your change (at version a5beaa0) is now ready to be sponsored by a Committer.

Loading

@iignatev
Copy link
Member

@iignatev iignatev commented May 3, 2021

/sponsor

Loading

@openjdk openjdk bot closed this May 3, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 3, 2021

@iignatev @lepestock Since your change was applied there have been 81 commits pushed to the master branch:

  • 001c514: 8265322: C2: Simplify control inputs for BarrierSetC2::obj_allocate
  • 194bcec: 8265984: Concurrent GC: Some tests fail "assert(is_frame_safe(f)) failed: Frame must be safe"
  • 1d9ea3a: 8266083: Shenandoah: Consolidate dedup/no dedup oop closures
  • 80941f4: 8234446: Post-CMS workgroup hierarchy cleanup
  • ac760c7: 8266295: Remove unused _concurrent_iteration_safe_limit
  • b42d496: 8266388: C2: Improve constant ShiftCntV on x86
  • 05cfac9: 8266412: Remove redundant TemplateInterpreter entries
  • c5dc657: 8266056: runtime/stringtable/StringTableCleaningTest.java failed with "RuntimeException: Missing Callback in [10, 11]"
  • 8fa50eb: 8263363: Minor cleanup of Lanai code - unused code removal and comments correction
  • 7e30130: 8266401: mark hotspot compiler/intrinsics/sha/cli tests which ignore VM flags
  • ... and 71 more: https://git.openjdk.java.net/jdk/compare/343a4a76f273078f78897e8fb7e695bc2c111536...master

Your commit was automatically rebased without conflicts.

Pushed as commit 880c138.

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

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants