RFR: 8286066: FillerObject_klass should be loaded as early as possible [v2]
Jie Fu
jiefu at openjdk.java.net
Wed May 4 01:09:24 UTC 2022
On Tue, 3 May 2022 21:19:11 GMT, David Holmes <dholmes at openjdk.org> wrote:
> That seems just a touch too early for my liking, Even though it is an empty class it is in a different package and that might perturb a few things in an unexpected way.
>
> IIUC the class is going to be needed when the initial TLAB is expanded. Did you determine exactly which class was causing that? I'd like to see this loading delayed until after the core system classes, as much as possible.
>
> Thanks.
Thanks @dholmes-ora for the review.
I added a jtreg to this bug.
It can also be reproduced with `java -XX:-UseCompressedClassPointers -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xshare:dump` on Linux/x64.
I saw the crash after `java.lang.ThreadDeath` was loaded on x86_32.
Maybe, we can load `FillerObject` after `java.lang.Error`.
STDERR:
stdout: [[0.004s][info][class,path] bootstrap loader class path=/home/jdk/build/linux-x86-server-fastdebug/images/jdk/lib/modules
[0.006s][warning][gc,init ] Consider enabling -XX:+AlwaysPreTouch to avoid memory commit hiccups
[0.006s][info ][cds ] Core region alignment: 4096
[0.006s][info ][class,path] app loader class path=/home/jdk/build/linux-x86-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_TestEpsilonGCWithCDS_java/scratch/0/hello.jar
[0.006s][info ][class,path] opened: /home/jdk/build/linux-x86-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_TestEpsilonGCWithCDS_java/scratch/0/hello.jar
[0.006s][info ][class,load] opened: /home/jdk/build/linux-x86-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_TestEpsilonGCWithCDS_java/scratch/0/hello.jar
[0.010s][info ][class,load] java.lang.Object source: jrt:/java.base
[0.010s][info ][class,load] java.io.Serializable source: jrt:/java.base
[0.010s][info ][class,load] java.lang.Comparable source: jrt:/java.base
[0.010s][info ][class,load] java.lang.CharSequence source: jrt:/java.base
[0.010s][info ][class,load] java.lang.constant.Constable source: jrt:/java.base
[0.010s][info ][class,load] java.lang.constant.ConstantDesc source: jrt:/java.base
[0.011s][info ][class,load] java.lang.String source: jrt:/java.base
[0.011s][info ][class,load] java.lang.reflect.AnnotatedElement source: jrt:/java.base
[0.012s][info ][class,load] java.lang.reflect.GenericDeclaration source: jrt:/java.base
[0.012s][info ][class,load] java.lang.reflect.Type source: jrt:/java.base
[0.012s][info ][class,load] java.lang.invoke.TypeDescriptor source: jrt:/java.base
[0.012s][info ][class,load] java.lang.invoke.TypeDescriptor$OfField source: jrt:/java.base
[0.012s][info ][class,load] java.lang.Class source: jrt:/java.base
[0.012s][info ][class,load] java.lang.Cloneable source: jrt:/java.base
[0.013s][info ][class,load] java.lang.ClassLoader source: jrt:/java.base
[0.013s][info ][class,load] java.lang.System source: jrt:/java.base
[0.013s][info ][class,load] java.lang.Throwable source: jrt:/java.base
[0.013s][info ][class,load] java.lang.Error source: jrt:/java.base
[0.013s][info ][class,load] java.lang.ThreadDeath source: jrt:/java.base
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/vmClasses.hpp:55
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/jdk/src/hotspot/share/classfile/vmClasses.hpp:55), pid=78368, tid=78371
# assert(k != __null) failed: klass not loaded
#
# JRE version: (19.0) (fastdebug build )
# Java VM: OpenJDK Server VM (fastdebug 19-internal-adhoc..jdk, interpreted mode, tiered, epsilon gc, linux-x86)
# Problematic frame:
# V [libjvm.so+0x85f54d] CollectedHeap::fill_with_dummy_object(HeapWordImpl**, HeapWordImpl**, bool)+0x42d
#
What do you think?
Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8519
More information about the hotspot-gc-dev
mailing list