-
Notifications
You must be signed in to change notification settings - Fork 98
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
SapMachine #1901: Feature Request to allow service to crash if direct memory is OOM #1916
Conversation
…ect memory is OOM
Hello @ansteiner, this pull request fulfills all formal requirements. |
test/hotspot/jtreg/runtime/ErrorHandling/TestExitOnDirectOutOfMemoryError.java
Outdated
Show resolved
Hide resolved
test/hotspot/jtreg/runtime/ErrorHandling/TestExitOnDirectOutOfMemoryError.java
Outdated
Show resolved
Hide resolved
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.
Looks good overall. I made a few suggestions. Also, the new test is failing because the VM seems to exit with a different rc.
Hello @ansteiner, this pull request fulfills all formal requirements. |
Hello @ansteiner, this pull request fulfills all formal requirements. |
OK, we need to figure out what happens in the test. |
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.
The type of the entry is wrong.
Hello @ansteiner, this pull request fulfills all formal requirements. |
Hi Andreas, have you figured out the strange exit/return codes seen in some tests ? |
…t on macos-aarch64 due to different MaxHeapsize/MaxDirectMemorySize by ergonomics
Hello @ansteiner, this pull request fulfills all formal requirements. |
Yes, it was the wrong entry type(92a964d). Mentioned by Ralf. |
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.
modified already
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.
modified already
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.
Looks good to me now. I have a few last minor formatting suggestions for the test.
test/hotspot/jtreg/runtime/ErrorHandling/TestExitOnDirectOutOfMemoryError.java
Outdated
Show resolved
Hide resolved
test/hotspot/jtreg/runtime/ErrorHandling/TestExitOnDirectOutOfMemoryError.java
Show resolved
Hide resolved
test/hotspot/jtreg/runtime/ErrorHandling/TestExitOnDirectOutOfMemoryError.java
Outdated
Show resolved
Hide resolved
One question / remark - the system property 'jdk.nio.reportErrorOnDirectMemoryOom' is SapMachine specific but sounds like a standard property available in all JDK. Is this good? Should we make it clearer in the name that it is specific ? But I am okay with this name as well so just an idea/remark . |
Hello @ansteiner, this pull request fulfills all formal requirements. |
If the direct memory buffer run into OOM, DirectByteBuffer allocation code can notify the jvm if the system property "jdk.nio.reportErrorOnDirectMemoryOom" is set.
Benefits:
Crash/ExitOnOutOfMemoryError
allows a app/JVM that can no longer provide services and application code is handling the OOM of DirectByteBuffer to crash/exit and enabling the service to restart.HeapDumpOnOutOfMemoryError
option.Implementation with some minor adaptions from closed issue/PR from OpenJDK: openjdk/jdk#16176
fixes #1901