本站消息

站长简介/公众号


站长简介:逗比程序员,理工宅男,前每日优鲜python全栈开发工程师,利用周末时间开发出本站,欢迎关注我的微信公众号:幽默盒子,一个专注于搞笑,分享快乐的公众号

  价值13000svip视频教程,java大神匠心打造,零基础java开发工程师视频教程全套,基础+进阶+项目实战,包含课件和源码

  出租广告位,需要合作请联系站长


+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

Java 100% CPU 使用率

发布于2021-06-12 09:25     阅读(808)     评论(0)     点赞(24)     收藏(1)


我正面临一个随机发生并导致 100% CPU 使用率的问题。我找到了实际使用 CPU 的线程的 PID。

Main PID: 22777
Thread PID: 22793

top -H -u user

PID   USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
22793 user      25   0 2640m  16m  14m R 98.8  0.4   5134:31 java
22480 user      25   0  7920  364  360 S  0.0  0.0   0:00.00 cat
22777 user      18   0 2640m  16m  14m S  0.0  0.4   0:00.00 java
22779 user      18   0 2640m  16m  14m S  0.0  0.4   0:03.34 java
22780 user      15   0 2640m  16m  14m S  0.0  0.4   0:46.76 java
22781 user      15   0 2640m  16m  14m S  0.0  0.4   0:00.49 java
{...}

jstack -J-d64 -m 22777

{...}
----------------- 22793 -----------------
0x00002b9edcd4c5a0      _ZN12Dependencies25find_finalizable_subclassEP5Klass + 0x150
0x00002b9edcc5a8ee      _ZN15ciInstanceKlass24has_finalizable_subclassEv + 0xbe
0x00002b9edcb9f83e      _ZN12GraphBuilder23call_register_finalizerEv + 0x9e
0x00002b9edcba62a5      _ZN12GraphBuilder13method_returnEP11Instruction + 0x295
0x00002b9edcbac85f      _ZN12GraphBuilder27iterate_bytecodes_for_blockEi + 0x6cf
0x00002b9edcba9c4b      _ZN12GraphBuilder18iterate_all_blocksEb + 0x14b
0x00002b9edcbaa5e6      _ZN12GraphBuilder15try_inline_fullEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x996
0x00002b9edcbaa7df      _ZN12GraphBuilder10try_inlineEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x11f
0x00002b9edcbab912      _ZN12GraphBuilder6invokeEN9Bytecodes4CodeE + 0xbb2
0x00002b9edcbac83d      _ZN12GraphBuilder27iterate_bytecodes_for_blockEi + 0x6ad
0x00002b9edcba9c4b      _ZN12GraphBuilder18iterate_all_blocksEb + 0x14b
0x00002b9edcbaa5e6      _ZN12GraphBuilder15try_inline_fullEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x996
0x00002b9edcbaa7df      _ZN12GraphBuilder10try_inlineEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x11f
0x00002b9edcbab912      _ZN12GraphBuilder6invokeEN9Bytecodes4CodeE + 0xbb2
0x00002b9edcbac83d      _ZN12GraphBuilder27iterate_bytecodes_for_blockEi + 0x6ad
0x00002b9edcba9bf2      _ZN12GraphBuilder18iterate_all_blocksEb + 0xf2
0x00002b9edcbae7a7      _ZN12GraphBuilderC1EP11CompilationP7IRScope + 0x527
0x00002b9edcbb7127      _ZN7IRScopeC1EP11CompilationPS_iP8ciMethodib + 0x1e7
0x00002b9edcbb723f      _ZN2IRC1EP11CompilationP8ciMethodi + 0x9f
0x00002b9edcb9625b      _ZN11Compilation9build_hirEv + 0xdb
0x00002b9edcb9661e      _ZN11Compilation19compile_java_methodEv + 0x6e
0x00002b9edcb9674e      _ZN11Compilation14compile_methodEv + 0x4e
0x00002b9edcb96abe      _ZN11CompilationC1EP16AbstractCompilerP5ciEnvP8ciMethodiP10BufferBlob + 0x25e
0x00002b9edcb97869      _ZN8Compiler14compile_methodEP5ciEnvP8ciMethodi + 0xa9
0x00002b9edccea43a      _ZN13CompileBroker25invoke_compiler_on_methodEP11CompileTask + 0xc9a
0x00002b9edcceb3e6      _ZN13CompileBroker20compiler_thread_loopEv + 0x5d6
0x00002b9edd29ebcf      _ZN10JavaThread17thread_main_innerEv + 0xdf
0x00002b9edd29ecfc      _ZN10JavaThread3runEv + 0x11c
0x00002b9edd153048      _ZL10java_startP6Thread + 0x108
{...}

编译时看起来像是JVM错误。

java version "1.8.0_51" Java(TM) SE Runtime Environment (build 1.8.0_51-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03,混合模式)

CentOS 5.5
Kernel: 2.6.18-194.el5

其他进程没有受到影响,但 Java 进程完全没有响应。它也发生在其他 CentOS 服务器上,但不会发生在 Oracle Linux 服务器上。


解决方案


暂无回答



所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接:http://www.javaheidong.com/blog/article/221772/40ca87ea78821f36569e/

来源:java黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

24 0
收藏该文
已收藏

评论内容:(最多支持255个字符)