On Sat, 24 Jan 2026 08:37:21 GMT, Leonid Mesnik <[email protected]> wrote:
> The > > [JDK-8213834](https://bugs.openjdk.org/browse/JDK-8213834) JVMTI > ResourceExhausted should not be posted in CompilerThread > > disables posting ResourceExhausted events on CompilerThread because it can't > post event. > The ResourceExhausted is used by agents to identify VM issues (and usually > kill instance). I think it makes sense to generate this event on the > ServiceThread like other deferred events (methods loading/unloading). > So tool like https://github.com/Netflix-Skunkworks/jvmquake can properly kill > jvm if resource exhausting happens on any thread. > > Please note, that ResourceExhausted is NOT generated when CodeCache full. It > might be makes sense to add it since performance degradation going to be > critical and makes sense treat CodeCache as a resource. > > It is hard generate OOME in the CompilerThread to test this fix. > > The fix was tested by patch that generated event for codecache exchausting > and new test. > https://github.com/openjdk/jdk/compare/master...lmesnik:jdk:codecache-full?expand=1 In relation to the metaspace OOM the 2018 discussion (see JBS) indicates it is possible, but Thomas also notes: > If the JIT runs into metaspace OOM, it will cope by bailing out and leave > that particular method uncompiled. I argue that this is not observable to the > user and therefore ResourceExhausted can be suppressed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29397#issuecomment-3814839347
