RFR: 8282170: JVMTI SetBreakpoint metaspace allocation test

Aleksey Shipilev shade at openjdk.java.net
Wed Feb 23 07:18:50 UTC 2022


On Tue, 22 Feb 2022 19:54:59 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> So you load a class 50 times in separate ClassLoaders, and each load triggers the ClassPrepare event, and each time that happens you set a breakpoint on each of the 1000 methods, meaning a total of 5000 breakpoints. Doing this will eventually trigger calling CollectorPolicy::satisfy_failed_metadata_allocation(). Previous to the [8264149](https://bugs.openjdk.java.net/browse/JDK-8264149) fix, this used to trigger an assert. Am I understanding this properly?

Yes. That assert is actually the part of the larger issue: metaspace is full, GC is requested, and VM would probably hang if we allow it to happen, since we cannot easily schedule Full GCs when already at safepoint.

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

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


More information about the serviceability-dev mailing list