Should OutOfMemoryError from NIO direct memory honor JVM flags for handling OOME?
Thomas Stüfe
thomas.stuefe at gmail.com
Fri Sep 23 04:05:31 UTC 2022
My opinion? Yes, these flags should work for all kind of OOMEs that
indicate a real resource exhaustion, regardless of its point of origin. Our
users don't care, they just want their heap dumps to work reliably.
But its an unsolved point of contention. We have tried to get this into the
OpenJDK repeatedly, but failed to convince Oracle. Therefore we gave up and
changed behavior in our downstream JVMs:
https://github.com/SAP/SapMachine/wiki/Handling-of-OnOutOfMemoryError-switches-in-the-SapMachine
which is always regrettable - tiny steps toward fragmentation of the JVM
landscape. But we needed to make our users happy.
Cheers, Thomas
On Fri, Sep 23, 2022 at 1:27 AM Man Cao <manc at google.com> wrote:
> Hi all,
>
> I recently opened an RFE (https://bugs.openjdk.org/browse/JDK-8294052) to
> make JVM flags such as -XX:+HeapDumpOnOutOfMemoryError and
> -XX:+ExitOnOutOfMemoryError work for OutOfMemoryErrors from filling up the
> NIO direct memory.
> Supporting HeapDumpOnOutOfMemoryError would greatly help users debug OOMEs
> from NIO direct memory. In our case, the OOMEs from direct memory are
> infrequent and unpredictable, and it is quite infeasible to
> manually trigger a heap dump just before those OOMEs happen.
>
> However, [~dholmes] seems a bit wary of supporting those JVM flags for NIO
> direct memory, as those JVM flags are currently for OOMEs thrown from the
> JVM, and for OOMEs about Java heap and metaspace, which are both managed by
> the JVM.
>
> Do you think it is a good idea to support those JVM flags for OOMEs from
> NIO direct memory? Are there any concerns that we shouldn't support them?
>
> -Man
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/nio-dev/attachments/20220923/1c6476a0/attachment.htm>
More information about the nio-dev
mailing list