RFR: 8310829: guarantee(!HAS_PENDING_EXCEPTION) failed in ExceptionTranslation::doit [v3]
Doug Simon
dnsimon at openjdk.org
Mon Jun 26 22:13:22 UTC 2023
On Mon, 26 Jun 2023 21:56:21 GMT, David Holmes <dholmes at openjdk.org> wrote:
> I would think it is likely to fail with OOME under the same GC stress test conditions.
>
> But if this is just a stress test issue then bailing out when the loading fails would be far simpler than pre-loading the class. You've added to the VM startup cost just to avoid a stress test failure.
Any app running near the GC limit can cause this and we've seen this with libgraal in practice. When the VM is near the GC limit, any compilation can cause an OOME and then when that OOME wants to be translated back to libgraal, it can be the first time VMSupport is used.
The time for loading `VMSupport` eagerly is in the noise.
For example, `-verbose:class` shows that about 30 classes (including `VMSupport`) are loaded in 1ms:
[0.011s][info][class,load] java.lang.reflect.Executable source: shared objects file
[0.012s][info][class,load] java.lang.reflect.Method source: shared objects file
[0.012s][info][class,load] java.lang.reflect.Constructor source: shared objects file
[0.012s][info][class,load] jdk.internal.vm.ContinuationScope source: shared objects file
[0.012s][info][class,load] jdk.internal.vm.Continuation source: shared objects file
[0.012s][info][class,load] jdk.internal.vm.StackChunk source: shared objects file
[0.012s][info][class,load] jdk.internal.vm.VMSupport source: shared objects file
[0.012s][info][class,load] jdk.internal.reflect.MagicAccessorImpl source: shared objects file
[0.012s][info][class,load] jdk.internal.reflect.MethodAccessor source: shared objects file
[0.012s][info][class,load] jdk.internal.reflect.MethodAccessorImpl source: shared objects file
[0.012s][info][class,load] jdk.internal.reflect.DelegatingClassLoader source: shared objects file
[0.012s][info][class,load] jdk.internal.reflect.ConstantPool source: shared objects file
[0.012s][info][class,load] java.lang.annotation.Annotation source: shared objects file
[0.012s][info][class,load] jdk.internal.reflect.CallerSensitive source: shared objects file
[0.012s][info][class,load] jdk.internal.reflect.ConstructorAccessor source: shared objects file
[0.012s][info][class,load] jdk.internal.reflect.ConstructorAccessorImpl source: shared objects file
[0.012s][info][class,load] jdk.internal.reflect.DirectConstructorHandleAccessor$NativeAccessor source: shared objects file
[0.012s][info][class,load] jdk.internal.reflect.SerializationConstructorAccessorImpl source: shared objects file
[0.012s][info][class,load] java.lang.invoke.MethodHandle source: shared objects file
[0.012s][info][class,load] java.lang.invoke.DirectMethodHandle source: shared objects file
[0.012s][info][class,load] java.lang.invoke.VarHandle source: shared objects file
[0.012s][info][class,load] java.lang.invoke.MemberName source: shared objects file
[0.012s][info][class,load] java.lang.invoke.ResolvedMethodName source: shared objects file
[0.012s][info][class,load] java.lang.invoke.MethodHandleNatives source: shared objects file
[0.012s][info][class,load] java.lang.invoke.LambdaForm source: shared objects file
[0.012s][info][class,load] java.lang.invoke.TypeDescriptor$OfMethod source: shared objects file
[0.012s][info][class,load] java.lang.invoke.MethodType source: shared objects file
[0.012s][info][class,load] java.lang.BootstrapMethodError source: shared objects file
[0.012s][info][class,load] java.lang.invoke.CallSite source: shared objects file
[0.012s][info][class,load] jdk.internal.foreign.abi.NativeEntryPoint source: shared objects file
[0.012s][info][class,load] jdk.internal.foreign.abi.ABIDescriptor source: shared objects file
[0.012s][info][class,load] jdk.internal.foreign.abi.VMStorage source: shared objects file
[0.013s][info][class,load] jdk.internal.foreign.abi.UpcallLinker$CallRegs source: shared objects file
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14641#issuecomment-1608388679
More information about the hotspot-dev
mailing list