-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8369442: ExitOnOutOfMemoryError should exit more gracefully #27718
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
base: master
Are you sure you want to change the base?
Conversation
|
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One concern I just realized with this, is that we will now grab the Heap_lock before doing the VM_Exit safepoint op. But we are calling this in the context of a failed allocation, so are we sure this will always be safe and not e.g. cause a deadlock?
I don't know who might use ExitOnOutOfMemoryError, nor in what way, so it is hard to say whether this change might break something
Co-authored-by: David Holmes <[email protected]>
|
Are we sure that I know we have internally questioned the validity of the development flag |
Good point! More generally if we can trigger OOM during VM init, then some of the tear-down actions in
I would also question its validity, but as a develop flag I'd be prepared to accept that unexpected things may happen. |
See RFE for more discussion. It seems we have a leeway in defining what "exit" means for
-XX:+ExitOnOutOfMemoryError, and this PR does it more akin toJVM_Halt, rather than abruptos::_exit. This gives VM a chance to shutdown some of its subsystems gracefully.Comments welcome!
Additional testing:
tier1allProgress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27718/head:pull/27718$ git checkout pull/27718Update a local copy of the PR:
$ git checkout pull/27718$ git pull https://git.openjdk.org/jdk.git pull/27718/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27718View PR using the GUI difftool:
$ git pr show -t 27718Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27718.diff
Using Webrev
Link to Webrev Comment