[12] RFR(xs): 8215947: JVM crash with -XX:+DumpSharedSpaces
Jiangli Zhou
jiangli.zhou at oracle.com
Thu Jan 3 21:41:57 UTC 2019
On 1/3/19 12:34 PM, Calvin Cheung wrote:
> Hi Jiangli,
>
> Thanks for your review and investigation.
>
> There already exists an RFE which was filed by you:
> https://bugs.openjdk.java.net/browse/JDK-8200451
> I've linked this bug to the RFE.
Great! :)
Thanks!
Jiangli
>
> thanks,
> Calvin
>
> On 1/3/19, 11:40 AM, Jiangli Zhou wrote:
>> Hi Calvin,
>>
>> This looks ok as a short-term fix. We should also investigate the
>> issue at dump time when -XX:-UseCompiler is not specified. The
>> 'assert(_dep_context == DependencyContext::EMPTY...' was done before
>> we changed to allow java code execution at dump time. I just did a
>> quick test to remove the assert and also set _dep_context to
>> DependencyContext::EMPTY in InstanceKlass::remove_unshareable_info().
>> That allowed dumping to finish without any failure (with
>> -XX:+DumpSharedSpaces and no -XX:-UseCompiler). Could you please file
>> a follow up RFE?
>>
>> Thanks,
>>
>> Jiangli
>>
>>
>> On 1/3/19 10:13 AM, Calvin Cheung wrote:
>>> 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