Java Cpu 无响应解决方案
作者:Rings 发布时间:[ 2016/10/14 13:57:46 ] 推荐标签:测试开发技术 Java
占用cpu高的线程的堆栈如下:
Thread 1 (process 17775):
#0 0x00007fa870981179 in Klass::subklass() const () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#1 0x00007fa8706d15c5 in Dependencies::find_finalizable_subclass(Klass*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#2 0x00007fa8705df8ee in ciInstanceKlass::has_finalizable_subclass() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#3 0x00007fa87052483e in GraphBuilder::call_register_finalizer() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#4 0x00007fa87052b2a5 in GraphBuilder::method_return(Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#5 0x00007fa87053185f in GraphBuilder::iterate_bytecodes_for_block(int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#6 0x00007fa87052ec4b in GraphBuilder::iterate_all_blocks(bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#7 0x00007fa87052f5e6 in GraphBuilder::try_inline_full(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#8 0x00007fa87052f7df in GraphBuilder::try_inline(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#9 0x00007fa870530912 in GraphBuilder::invoke(Bytecodes::Code) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#10 0x00007fa87053183d in GraphBuilder::iterate_bytecodes_for_block(int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#11 0x00007fa87052ec4b in GraphBuilder::iterate_all_blocks(bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#12 0x00007fa87052f5e6 in GraphBuilder::try_inline_full(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#13 0x00007fa87052f7df in GraphBuilder::try_inline(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#14 0x00007fa870530912 in GraphBuilder::invoke(Bytecodes::Code) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#15 0x00007fa87053183d in GraphBuilder::iterate_bytecodes_for_block(int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#16 0x00007fa87052ebf2 in GraphBuilder::iterate_all_blocks(bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#17 0x00007fa8705337a7 in GraphBuilder::GraphBuilder(Compilation*, IRScope*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#18 0x00007fa87053c127 in IRScope::IRScope(Compilation*, IRScope*, int, ciMethod*, int, bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#19 0x00007fa87053c23f in IR::IR(Compilation*, ciMethod*, int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#20 0x00007fa87051b25b in Compilation::build_hir() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#21 0x00007fa87051b61e in Compilation::compile_java_method() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#22 0x00007fa87051b74e in Compilation::compile_method() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#23 0x00007fa87051babe in Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#24 0x00007fa87051c869 in Compiler::compile_method(ciEnv*, ciMethod*, int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#25 0x00007fa87066f43a in CompileBroker::invoke_compiler_on_method(CompileTask*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#26 0x00007fa8706703e6 in CompileBroker::compiler_thread_loop() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#27 0x00007fa870c2386f in JavaThread::thread_main_inner() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#28 0x00007fa870c2399c in JavaThread::run() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#29 0x00007fa870ad7de8 in java_start(Thread*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so
#30 0x0000003202c079d1 in start_thread () from /lib64/libpthread.so.0
#31 0x00000032028e88fd in clone () from /lib64/libc.so.6
gdb 跟进发现:线程在函数Dependencies::find_finalizable_subclass(Klass*) 中,应该有一个循环,不断地调用函数Klass::subklass()
解决办法:
The fix was simple – disable CMS class unloading options when -Xnoclassgc or -XX:-ClassUnloading are specified.
相关推荐
更新发布
功能测试和接口测试的区别
2023/3/23 14:23:39如何写好测试用例文档
2023/3/22 16:17:39常用的选择回归测试的方式有哪些?
2022/6/14 16:14:27测试流程中需要重点把关几个过程?
2021/10/18 15:37:44性能测试的七种方法
2021/9/17 15:19:29全链路压测优化思路
2021/9/14 15:42:25性能测试流程浅谈
2021/5/28 17:25:47常见的APP性能测试指标
2021/5/8 17:01:11