Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.5 和 3.0.6-SNAPSHOT trace,monitor,watch 在openjdk 11下不可用,但sc,sm,jad,jvm 可用 #459

Closed
1 task done
xindoo opened this issue Jan 17, 2019 · 7 comments
Closed
1 task done
Labels
bug Something isn't working
Milestone

Comments

@xindoo
Copy link

xindoo commented Jan 17, 2019

  • 我已经在 issues 里搜索,没有重复的issue。

环境信息

  • 版本: 3.0.5 和 3.0.6-SNAPSHOT
  • Arthas 版本: 3.0.5 和 3.0.6-SNAPSHOT均不行
  • 操作系统版本: Linux 2.6.32-279.23.1.mi5.el6.x86_64
  • 目标进程的JVM版本: openjdk version "11" 2018-09-25, OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
  • 执行arthas-boot的版本: 3.0.5 和 3.0.6-SNAPSHOT

重现问题的步骤

sc,sm,jad,jvm 运行正常,但trace monitor watch 提示 No class or method is affected

实际运行的结果

wechatimg22

@xindoo xindoo changed the title 3.0.5 和 3.0.6-SNAPSHOT trace monitor watch 在openjdk 11下提示No class or method is affected 3.0.5 和 3.0.6-SNAPSHOT trace,monitor,watch 在openjdk 11下不可用,但sc,sm,jad,jvm 可用 Jan 17, 2019
@hengyunabc
Copy link
Collaborator

提供一个可执行的demo?

@xindoo
Copy link
Author

xindoo commented Jan 17, 2019

提供一个可执行的demo?

不好意思,公司业务代码,不是很方便提供。

@hengyunabc
Copy link
Collaborator

提供一个可执行的demo?

不好意思,公司业务代码,不是很方便提供。

可以构造一个简单demo 。或者在工程里另外写一个简单的类测试下。

@xindoo
Copy link
Author

xindoo commented Jan 18, 2019

EnhancerCommand的命令都不能用,但AnnotatedCommand都能用,肯定是增强失败了

@hengyunabc
Copy link
Collaborator

@xindoo 之前的代码没有 catch asm exception,参考: #462

可以试下这个版本,如果有异常的话,会在 ~/logs/arthas/arthas.log 打印出来。

arthas-3.0.6-SNAPSHOT-bin.zip

@xindoo
Copy link
Author

xindoo commented Jan 18, 2019

@hengyunabc

01 2019-01-18 15:47:51.357 WARN [as-command-execute-daemon:arthas] [] [] [] transform loader[jdk.internal.loader.ClassLoaders$AppClassLoader@368239c8]:class[com/xiaomi/miui/ad/webpages/controllers/parser/AppStoreAction] failed.
java.lang.UnsupportedOperationException: This feature requires ASM7
	at org.objectweb.asm.ClassVisitor.visitNestMember(ClassVisitor.java:236) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:651) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:391) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at com.taobao.arthas.core.advisor.Enhancer.transform(Enhancer.java:160) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246) ~[na:na]
	at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188) ~[na:na]
	at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563) ~[na:na]
	at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses0(Native Method) ~[na:na]
	at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:167) ~[na:na]
	at com.taobao.arthas.core.advisor.Enhancer.enhance(Enhancer.java:302) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at com.taobao.arthas.core.command.monitor200.EnhancerCommand.enhance(EnhancerCommand.java:134) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at com.taobao.arthas.core.command.monitor200.EnhancerCommand.process(EnhancerCommand.java:74) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:82) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:18) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:111) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:108) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:370) ~[arthas-core.jar:3.0.6-SNAPSHOT]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

@xindoo
Copy link
Author

xindoo commented Jan 18, 2019

已解决,arthas中写死了使用ASM5,jdk11下需要ASM7。

@hengyunabc hengyunabc added the bug Something isn't working label Jan 18, 2019
@hengyunabc hengyunabc added this to the 3.0.6 milestone Jan 18, 2019
lzc-alioo pushed a commit to lzc-alioo/arthas that referenced this issue May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants