[12] RFR(xs): 8215947: JVM crash with -XX:+DumpSharedSpaces
Calvin Cheung
calvin.cheung at oracle.com
Thu Jan 3 18:13:09 UTC 2019
bug: https://bugs.openjdk.java.net/browse/JDK-8215947
webrev: http://cr.openjdk.java.net/~ccheung/8215947/webrev.00/
The bug was filed as confidential, the crash is as follows:
$ java -XX:+DumpSharedSpaces
narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3
Allocated temporary class space: 1073741824 bytes at 0x00000008c0000000
Allocated shared space: 3221225472 bytes at 0x0000000800000000
Loading classes to share ...
Loading classes to share: done.
Rewriting and linking classes ...
Rewriting and linking classes: done
Number of classes 1229
instance classes = 1168
obj array classes = 53
type array classes = 8
Updating ConstMethods ... done.
Removing unshareable information ... #
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (instanceKlass.cpp:2288), pid=28024, tid=28031
# guarantee(_dep_context == DependencyContext::EMPTY) failed: must be
#
# JRE version: Java(TM) SE Runtime Environment (11.0.2+7) (build
11.0.2+7-LTS)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0.2+7-LTS, mixed mode,
tiered, compressed oops, g1 gc, linux-amd64)
We currently disable JIT compilation in arguments.cpp if the user
specifies -Xshare:dump.
} else if (match_option(option, "-Xshare:dump")) {
if (FLAG_SET_CMDLINE(bool, DumpSharedSpaces, true) !=
JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
set_mode_flags(_int); // Prevent compilation, which creates objects
The proper way to create a shared archive is by specifying -Xshare:dump
instead of -XX:+DumpSharedSpaces.
This fix is to disable compilation if DumpSharedSpaces is specified in
Arguments::finalize_vm_init_args().
Testing: ran mach5 hs-tier{1,2,3} tests.
thanks,
Calvin
More information about the hotspot-runtime-dev
mailing list