RFR: 8181093 arm64 crash when relocating address
Bob Vandette
bob.vandette at oracle.com
Thu Jun 1 19:12:00 UTC 2017
> On Jun 1, 2017, at 2:14 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>
> I agree that it should be fixed in JDK 9.
> Problem evaluation and fix seems reasonable to me.
> What performance regression you see? Fix is more critical than a small regression I think.
No regression since the generated code doesn’t even change.
A specJVM98 run shows no significant difference.
Bob.
>
> Thanks,
> Vladimir
>
> On 6/1/17 8:12 AM, Bob Vandette wrote:
>> Please review this fix which avoids a crash when attempting to update the address
>> of a metadata_Relocation in the arm64 port.
>> http://cr.openjdk.java.net/~bobv/8181093/webrev
>> The problem is that the nativeInst NativeMovContReg logic does not handle the case
>> where NativeMovContReg::set_data is processing an optimized “or” instruction that
>> was generated by MacroAssembler::mov_metadata -> MacroAssembler::mov_slow_helper.
>> The crash trace shows that this occurred during metadata processing.
>> The fix avoids the updating of the address since the metadata pointers do not move and
>> the references are not PC relative. Note that metadata_Relocation::pd_fix_value is
>> a noop on all other implementations.
>> Current CompileTask:
>> C1: 2052 303 ! 3 java.lang.invoke.MemberName::getMethodType (202 bytes)
>> Stack: [0x0000007f7efa9000,0x0000007f7f0a9000], sp=0x0000007f7f0a64e0, free space=1013k
>> Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
>> V [libjvm.so+0xff8838] VMError::report_and_die(int, char const*, char const*, std::__va_list, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x140;; VMError::report_and_die(int, char const*, char const*, std::__va_list, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x140
>> V [libjvm.so+0xff9448] VMError::report_and_die(Thread*, char const*, int, char const*, char const*, std::__va_list)+0x54;; VMError::report_and_die(Thread*, char const*, int, char const*, char const*, std::__va_list)+0x54
>> V [libjvm.so+0x6a62b0] report_vm_error(char const*, int, char const*, char const*, ...)+0xe0;; report_vm_error(char const*, int, char const*, char const*, ...)+0xe0
>> V [libjvm.so+0xcdaa34] NativeMovConstReg::set_data(long)+0x158;; NativeMovConstReg::set_data(long)+0x158
>> V [libjvm.so+0xe470ec] Relocation::pd_set_data_value(unsigned char*, long, bool)+0x188;; Relocation::pd_set_data_value(unsigned char*, long, bool)+0x188
>> V [libjvm.so+0xe48768] metadata_Relocation::pd_fix_value(unsigned char*)+0xe4;; metadata_Relocation::pd_fix_value(unsigned char*)+0xe4
>> V [libjvm.so+0xce337c] nmethod::fix_oop_relocations(unsigned char*, unsigned char*, bool)+0xe0;; nmethod::fix_oop_relocations(unsigned char*, unsigned char*, bool)+0xe0
>> V [libjvm.so+0xceb014] nmethod::copy_values(GrowableArray<_jobject*>*)+0x154;; nmethod::copy_values(GrowableArray<_jobject*>*)+0x154
>> V [libjvm.so+0xce1b44] nmethod::nmethod(Method*, CompilerType, int, int, int, CodeOffsets*, int, DebugInformationRecorder*, Dependencies*, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, int)+0x3a0;; nmethod::nmethod(Method*, CompilerType, int, int, int, CodeOffsets*, int, DebugInformationRecorder*, Dependencies*, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, int)+0x3a0
>> V [libjvm.so+0xce245c] nmethod::new_nmethod(methodHandle const&, int, int, CodeOffsets*, int, DebugInformationRecorder*, Dependencies*, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, int)+0x208;; nmethod::new_nmethod(methodHandle const&, int, int, CodeOffsets*, int, DebugInformationRecorder*, Dependencies*, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, int)+0x208
>> V [libjvm.so+0x4efae0] ciEnv::register_method(ciMethod*, int, CodeOffsets*, int, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, bool, bool, RTMState)+0x330;; ciEnv::register_method(ciMethod*, int, CodeOffsets*, int, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, bool, bool, RTMState)+0x330
>> V [libjvm.so+0x3b319c] Compilation::install_code(int)+0x128;; Compilation::install_code(int)+0x128
>> V [libjvm.so+0x3b5e50] Compilation::compile_method()+0x280;; Compilation::compile_method()+0x280
>> V [libjvm.so+0x3b6054] Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*, DirectiveSet*)+0x1b8;; Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*, DirectiveSet*)+0x1b8
>> V [libjvm.so+0x3b7814] Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x118;; Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x118
>> V [libjvm.so+0x6324e4] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x354;; CompileBroker::invoke_compiler_on_method(CompileTask*)+0x354
>> V [libjvm.so+0x632ea4] CompileBroker::compiler_thread_loop()+0x2b8;; CompileBroker::compiler_thread_loop()+0x2b8
>> V [libjvm.so+0xf72964] JavaThread::thread_main_inner()+0x1fc;; JavaThread::thread_main_inner()+0x1fc
>> V [libjvm.so+0xf72bb0] JavaThread::run()+0x1c0;; JavaThread::run()+0x1c0
>> V [libjvm.so+0xd3ba64] thread_native_entry(Thread*)+0x118;; thread_native_entry(Thread*)+0x118
>> C [libpthread.so.0+0x7e2c] start_thread+0xb0
>> C [libc.so.6+0xc8430] clone+0x70
>> Bob.
More information about the hotspot-dev
mailing list