Skip to content

JDK-8293313: NMT: Add "Fake OOM" mode to MallocLimit #10144

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

Closed

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Sep 2, 2022

  • still work in progress *

This RFE adds the optional ability for -XX:MallocLimit to, instead of exiting the VM with a fatal error, fake a native OOM on this and all future malloc calls.

The user controls this by appending the option "oom" to the malloc limit argument:

-XX:MallocLimit=2g # will cause fatal error upon reaching limit
-XX:MallocLimit=2g,oom # will cause malloc to return NULL, mimicking a real malloc OOM

That makes it possible to test hotspot robustness in the face of real malloc OOMs, and is the prerequisite for removing the old MallocMaxTestWords machinery.


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

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10144

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 2, 2022

👋 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 Sep 2, 2022

@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 Sep 2, 2022
@tstuefe tstuefe marked this pull request as ready for review September 9, 2022 15:16
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 9, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 9, 2022

Webrevs

@tstuefe tstuefe marked this pull request as draft September 13, 2022 06:44
@openjdk openjdk bot removed the rfr Pull request is ready for review label Sep 13, 2022
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 4, 2022

@tstuefe This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 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!

@tstuefe
Copy link
Member Author

tstuefe commented Nov 4, 2022

Not yet bot

@tstuefe tstuefe closed this Nov 25, 2022
@tstuefe tstuefe deleted the JDK-8293292-remove-MallocMaxTestWords branch April 5, 2023 05:41
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
Development

Successfully merging this pull request may close these issues.

1 participant