RFR: JDK-8155004: CrashOnOutOfMemoryError doesn't work for OOM caused by inability to create threads

Yasumasa Suenaga ysuenaga at openjdk.java.net
Wed Apr 21 06:13:03 UTC 2021


On Wed, 21 Apr 2021 04:16:19 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Its simply not implemented. The ...OnOutOfMemoryError handling needs to be added to places where OOM is thrown, and is missing from a couple of places.

Strictly speaking, we need to think about OOME from Java  layer as well. For example, OOME would be thrown when direct buffer cannot allocate native memory (-XX:MaxDirectMemorySize). It is not caught by JVMTI ResourceExhausted event, however it might be important information to know system memory usage.

I've found out similar issue on JFR, and I've posted #1403 , however it might not be accepted because C2 might eliminate throwing exceptions. IMHO *OnOutOfMemoryError, unified logging (-Xlog:exceptions), JVMTI event, JFR events should be hook all of OOMEs, they should be able to hook same source at least.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3586


More information about the hotspot-dev mailing list