我有一个Play Framework 2.4应用程序,它运行在Ubuntu 12.04.1 LTS,Java 8u40上。一段时间后,我的应用程序停止响应。当我使用top
检查CPU负载时,我看到java进程正在使用100%CPU。当我运行jstack -F -m <PID>
时,我看到循环线程在JVM本机帧之间。
这是循环线程的jstack输出:
----------------- 1062 -----------------
0x00007f01a8a531cc _ZNK5Klass12next_siblingEv + 0xc
0x00007f01a86b18ee _ZN15ciInstanceKlass24has_finalizable_subclassEv + 0xbe
0x00007f01a85f683e _ZN12GraphBuilder23call_register_finalizerEv + 0x9e
0x00007f01a85fd2a5 _ZN12GraphBuilder13method_returnEP11Instruction + 0x295
0x00007f01a860385f _ZN12GraphBuilder27iterate_bytecodes_for_blockEi + 0x6cf
0x00007f01a8600c4b _ZN12GraphBuilder18iterate_all_blocksEb + 0x14b
0x00007f01a86015e6 _ZN12GraphBuilder15try_inline_fullEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x996
0x00007f01a86017df _ZN12GraphBuilder10try_inlineEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x11f
0x00007f01a8602912 _ZN12GraphBuilder6invokeEN9Bytecodes4CodeE + 0xbb2
0x00007f01a860383d _ZN12GraphBuilder27iterate_bytecodes_for_blockEi + 0x6ad
0x00007f01a8600c4b _ZN12GraphBuilder18iterate_all_blocksEb + 0x14b
0x00007f01a86015e6 _ZN12GraphBuilder15try_inline_fullEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x996
0x00007f01a86017df _ZN12GraphBuilder10try_inlineEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x11f
0x00007f01a8602912 _ZN12GraphBuilder6invokeEN9Bytecodes4CodeE + 0xbb2
0x00007f01a860383d _ZN12GraphBuilder27iterate_bytecodes_for_blockEi + 0x6ad
0x00007f01a8600bf2 _ZN12GraphBuilder18iterate_all_blocksEb + 0xf2
0x00007f01a86057a7 _ZN12GraphBuilderC1EP11CompilationP7IRScope + 0x527
0x00007f01a860e127 _ZN7IRScopeC1EP11CompilationPS_iP8ciMethodib + 0x1e7
0x00007f01a860e23f _ZN2IRC1EP11CompilationP8ciMethodi + 0x9f
0x00007f01a85ed25b _ZN11Compilation9build_hirEv + 0xdb
0x00007f01a85ed61e _ZN11Compilation19compile_java_methodEv + 0x6e
0x00007f01a85ed74e _ZN11Compilation14compile_methodEv + 0x4e
0x00007f01a85edabe _ZN11CompilationC1EP16AbstractCompilerP5ciEnvP8ciMethodiP10BufferBlob + 0x25e
0x00007f01a85ee869 _ZN8Compiler14compile_methodEP5ciEnvP8ciMethodi + 0xa9
0x00007f01a874143a _ZN13CompileBroker25invoke_compiler_on_methodEP11CompileTask + 0xc9a
0x00007f01a87423e6 _ZN13CompileBroker20compiler_thread_loopEv + 0x5d6
0x00007f01a8cf596f _ZN10JavaThread17thread_main_innerEv + 0xdf
0x00007f01a8cf5a9c _ZN10JavaThread3runEv + 0x11c
0x00007f01a8ba9ee8 _ZL10java_startP6Thread + 0x108
此问题在我从Play 2.3升级到2.4和Java 7升级到Java 8后开始。我不认为Play升级与此有关。看起来它与JIT编译有关。
这个主题是什么,可能是无限循环的原因,当然我该如何修复/解决这个问题呢?
感谢。