-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[GR-38994] Add support for -XX:+HeapDumpOnOutOfMemoryError
#4641
Comments
I assume this is about GraalVM Native Image, not the JVM mode, right? |
-XX:+HeapDumpOnOutOfMemoryError
-XX:+HeapDumpOnOutOfMemoryError
This is a great suggestion. One prerequisite for making this work is to modify the heap dumping code to avoid allocations - or at least stay within some predefined allocation bounds reserved for this feature. |
I believe @thomaswue is referring to #4637. |
Indeed for this to work the heap dump generation has to be virtually allocation free, otherwise you might get an OOME again when trying to dump it. I'll give this a go once #4637 has been resolved. |
Apparently @christianhaeubl is working on heap dump refactoring. So this needs a bit of coordination @galderz |
@christianhaeubl any update on supporting this feature? |
@galderz any update regarding your plans on supporting this feature? |
@christianhaeubl I'll have a look now that allocation-free heap dump is in place. |
Feature request
Following on the addition of heap dumps, support for
-XX:+HeapDumpOnOutOfMemoryError
should be added. This flag enables the heap dump to be dumped in the event of an out of memory error.Describe who do you think will benefit the most.
-XX:+HeapDumpOnOutOfMemoryError
is a flag that is commonly used in Java programs. Now that heap dumps can be retrieved on demand, Java developers would expect this flag to be available. Heap dumps are needed the most when the JVM is running out of memory.Describe alternatives you've considered.
The alternative would be for a user to somehow be alerted when an OOME is reported and for the user to request a heap dump manually or via some automation.
I'd like to contribute this feature.
The text was updated successfully, but these errors were encountered: