jvm crash CompilerThread1

# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.45-b01 mixed mode linux-amd64 compressed oops)
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
 
--------------- T H R E A D ---------------
 
Current thread (0x00007f3eb00e7800): JavaThread "C1 CompilerThread1" daemon [_thread_in_native, id=4031, stack(0x00007f3ea410b000,0x00007f3ea420c000)]
 
Stack: [0x00007f3ea410b000,0x00007f3ea420c000], sp=0x00007f3ea4209e90, free space=1019k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x861e05] VMError::report_and_die()+0x265
V [libjvm.so+0x3e5d26] report_vm_error(char const*, int, char const*, char const*)+0x56
V [libjvm.so+0x30cd91] CE_Eliminator::make_ifop(Instruction*, Instruction::Condition, Instruction*, Instruction*, Instruction*)+0x411
V [libjvm.so+0x30c2bc] CE_Eliminator::block_do(BlockBegin*)+0x55c
V [libjvm.so+0x2af314] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0x44
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af376] BlockBegin::iterate_preorder(boolArray&, BlockClosure*)+0xa6
V [libjvm.so+0x2af4d2] BlockBegin::iterate_preorder(BlockClosure*)+0x72
V [libjvm.so+0x2acec1] IR::iterate_preorder(BlockClosure*)+0x11
V [libjvm.so+0x30ce1c] Optimizer::eliminate_conditional_expressions()+0x3c
V [libjvm.so+0x2ab94a] IR::optimize()+0x4a
V [libjvm.so+0x28d3d7] Compilation::build_hir()+0xe7
V [libjvm.so+0x28d9b4] Compilation::compile_java_method()+0xc4
V [libjvm.so+0x28dc5c] Compilation::compile_method()+0x7c
V [libjvm.so+0x28e456] Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*)+0x1a6
V [libjvm.so+0x28eee9] Compiler::compile_method(ciEnv*, ciMethod*, int)+0x99
V [libjvm.so+0x3aa23a] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x2ca
V [libjvm.so+0x3a9b25] CompileBroker::compiler_thread_loop()+0x355
V [libjvm.so+0x822f89] compiler_thread_entry(JavaThread*, Thread*)+0x9
V [libjvm.so+0x81c491] JavaThread::run()+0x121
V [libjvm.so+0x712eef] java_start(Thread*)+0x13f
 
 
Current CompileTask:
C1: 16548 2946 2 org.hibernate.cfg.annotations.SimpleValueBinder.setType(Lorg/hibernate/annotations/common/reflection/XProperty;Lorg/hibernate/annotations/common/reflection/XClass;)V (921 bytes)
大概原因:

HotSpot是较新的Java虚拟机技术,用来代替JIT技术,可以大大提高Java运行的性能。

Java原先是把源代码编译为字节码在虚拟机执行,这样执行速度较慢。而该技术将常用的部分代码编译为本地(原生,native)代码,这样显著提高了性能。(来自于维基百科)

可能编译后的SimpleValueBinder与操作系统中的代码有冲突导致中断,只要让SimpleValueBinder采用JIT技术编译即可。

解决办法:JAVA_OPTS="$JAVA_OPTS -XX:CompileCommand=exclude,org/hibernate/cfg/annotations/SimpleValueBinder,setType"
 

相关推荐