- 我已经在 issues 里搜索,没有重复的issue。
环境信息
arthas-boot.jar
或者as.sh
的版本: 3.6.3- Arthas 版本: 3.6.2
- 操作系统版本: Linux 3.10.0-693.2.2.el7.x86_64
- 目标进程的JVM版本: (build 1.8.0_191-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
- 执行
arthas-boot
的版本: 同上
重现问题的步骤
- trace xxxx.XxxxSave doCallBack
期望的结果
正常的结果。
实际运行的结果
目标进程中存在一个线程,CPU飚满,大约持续一两分钟,内存溢出。
2022-08-17 10:11:49 [arthas-command-execute] INFO c.t.arthas.core.advisor.Enhancer -enhance matched classes: [class xxxx.XxxxSave]
2022-08-17 10:13:36 [arthas-command-execute] WARN c.t.arthas.core.advisor.Enhancer -transform loader[groovy.lang.GroovyClassLoader$InnerLoader@33376758]:class[xxxx/XxxxSave] failed.
java.lang.OutOfMemoryError: Java heap space
at com.alibaba.deps.org.objectweb.asm.Frame.merge(Frame.java:1172)
at com.alibaba.deps.org.objectweb.asm.MethodWriter.computeAllFrames(MethodWriter.java:1610)
at com.alibaba.deps.org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1546)
at com.alibaba.deps.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:769)
at com.alibaba.deps.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:649)
at com.alibaba.deps.org.objectweb.asm.tree.ClassNode.accept(ClassNode.java:452)
at com.alibaba.bytekit.utils.AsmUtils.toBytes(AsmUtils.java:78)
at com.taobao.arthas.core.advisor.Enhancer.transform(Enhancer.java:256)
at com.taobao.arthas.core.advisor.TransformerManager$1.transform(TransformerManager.java:59)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144)
at com.taobao.arthas.core.advisor.Enhancer.enhance(Enhancer.java:446)
at com.taobao.arthas.core.command.monitor200.EnhancerCommand.enhance(EnhancerCommand.java:162)
at com.taobao.arthas.core.command.monitor200.EnhancerCommand.process(EnhancerCommand.java:109)
at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:82)
at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:18)
at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:111)
at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:108)
at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:385)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2022-08-17 10:13:36 [arthas-command-execute] INFO c.t.arthas.core.advisor.Enhancer -Success to batch transform classes: [class xxxx.XxxxSave]
1条答案
按热度按时间huus2vyu1#
这个可能和groovy的classloader有关系,可以试下升groovy的版本,它很多版本都有内存泄露问题。