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

8318058: Notify the jvm when the direct memory is oom #16176

Closed
wants to merge 1 commit into from

Conversation

xpbob
Copy link
Contributor

@xpbob xpbob commented Oct 13, 2023

Big data processes often experience situations where the direct memory oom process is alive but not serving properly. If the direct memory is oom, code can notify the jvm. Can bring the following benefits:

  1. Analysis of direct memory Java. Nio. DirectByteBuffer need heapdumps reference relations. Can be used directly HeapDumpOnOutOfMemoryError.
  2. In container environment, ExitOnOutOfMemoryError can be used to let the process that cannot provide services exit, so that the container can quickly pull up a new pod

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-8318058: Notify the jvm when the direct memory is oom (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16176

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 13, 2023

👋 Welcome back xpbob! 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 Oct 13, 2023
@openjdk
Copy link

openjdk bot commented Oct 13, 2023

@xpbob The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot
  • nio

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added nio nio-dev@openjdk.org hotspot hotspot-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Oct 13, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 13, 2023

Webrevs

@tstuefe
Copy link
Member

tstuefe commented Oct 13, 2023

Undoubtedly useful, but there have been many discussions in the past about what does and does not constitute an OOM error, and IIRC, the stance of Oracle devs was "only if it is in java heap". Hence the missing OOM error when we cannot create threads, for instance.

@AlanBateman
Copy link
Contributor

JDK-8294052 has some of the previous discussion on this issue.

See also this thread where Man, Thomas, David and I discussed the topic:
https://mail.openjdk.org/pipermail/nio-dev/2022-September/012119.html

There were previous threads on the same topic, I can't find the links right now.

@xpbob xpbob closed this Oct 16, 2023
@xpbob
Copy link
Contributor Author

xpbob commented Oct 16, 2023

@tstuefe @AlanBateman
Thanks for for sharing this information,
We look forward to other solutions to this problem in the future

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 hotspot hotspot-dev@openjdk.org nio nio-dev@openjdk.org rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

3 participants