7
环境信息
arthas-boot.jar
或者as.sh
的版本:3.6.6- Arthas 版本: 3.6.6
- 操作系统版本: macos m1
- 目标进程的JVM版本: openj9-jdk8
- 执行
arthas-boot
的版本: openj9-jdk8
- 使用openj9启动应用
- 使用openj9启动arthas-boot并attach对应进程
- 执行classloader -t找到对应classloader
- 执行classloader -c d837015e --load org.springframework.boot.SpringApplication
- 执行trace org.springframework '#cost > 1000'
- 报错
正常输出trace
实际运行的结果[arthas@22508]$ trace org.springframework* * '#cost > 1000'
Affect(class count: 4180 , method count: 33388) cost in 28438 ms, listenerId: 1
Enhance error! exception: java.lang.VerifyError
error happens when enhancing class: null, check arthas log: /Users/logs/arthas/arthas.log
java.lang.RuntimeException: java.lang.ClassNotFoundException: javax.mail.internet.MimeMessage
at com.alibaba.bytekit.asm.ClassLoaderAwareClassWriter.getCommonSuperClass(ClassLoaderAwareClassWriter.java:42)
at com.alibaba.deps.org.objectweb.asm.SymbolTable.addMergedType(SymbolTable.java:1202)
at com.alibaba.deps.org.objectweb.asm.Frame.merge(Frame.java:1299)
at com.alibaba.deps.org.objectweb.asm.Frame.merge(Frame.java:1244)
at com.alibaba.deps.org.objectweb.asm.MethodWriter.computeAllFrames(MethodWriter.java:1611)
at com.alibaba.deps.org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1547)
at com.alibaba.deps.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:767)
at com.alibaba.deps.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:647)
at com.alibaba.deps.org.objectweb.asm.tree.ClassNode.accept(ClassNode.java:451)
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:443)
at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:156)
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:826)
Caused by: java.lang.ClassNotFoundException: javax.mail.internet.MimeMessage
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:411)
at com.alibaba.bytekit.asm.ClassLoaderAwareClassWriter.getCommonSuperClass(ClassLoaderAwareClassWriter.java:40)
... 30 common frames omitted
2023-03-28 14:52:21 [arthas-command-execute] WARN c.t.arthas.core.advisor.Enhancer -transform loader[org.springframework.boot.loader.LaunchedURLClassLoader@d837015e]:class[org/springframework/cloud/openfeign/ribbon/RetryableFeignLoadBalancer] failed.
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.springframework.retry.policy.NeverRetryPolicy
at com.alibaba.bytekit.asm.ClassLoaderAwareClassWriter.getCommonSuperClass(ClassLoaderAwareClassWriter.java:42)
java.lang.VerifyError: null
at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:156)
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:826)
怀疑arthas对于openj9的支持存在问题