- 我已经在 issues 里搜索,没有重复的issue。
环境信息
arthas-boot.jar
或者as.sh
的版本: 3.3.4-SNAPSHOT
重现问题的步骤
watch java.io.FileInputStream readBytes 'params'
期望的结果
What do you expected from the above steps?
实际运行的结果
实际运行结果,最好有详细的日志,异常栈。尽量贴文本。
Affect(class count: 0 , method count: 0) cost in 16 ms, listenerId: 3
Enhance error! exception: java.lang.NullPointerException, check arthas log: /Users/gongdewei/logs/arthas/arthas.log
2020-06-23 10:29:19 [as-command-execute-daemon] WARN c.t.arthas.core.advisor.Enhancer -transform loader[null]:class[java/io/FileInputStream] failed.
java.lang.NullPointerException: null
at com.alibaba.arthas.deps.org.objectweb.asm.tree.InsnList.insertBefore(InsnList.java:365)
at com.taobao.arthas.bytekit.asm.MethodProcessor.<init>(MethodProcessor.java:151)
at com.taobao.arthas.bytekit.asm.MethodProcessor.<init>(MethodProcessor.java:128)
at com.taobao.arthas.bytekit.asm.MethodProcessor.<init>(MethodProcessor.java:123)
at com.taobao.arthas.core.advisor.Enhancer.transform(Enhancer.java:200)
at com.taobao.arthas.core.advisor.TransformerManager$1.transform(TransformerManager.java:33)
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:366)
at com.taobao.arthas.core.command.monitor200.EnhancerCommand.enhance(EnhancerCommand.java:135)
at com.taobao.arthas.core.command.monitor200.EnhancerCommand.process(EnhancerCommand.java:87)
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)
readBytes 方法为native方法,ByteKit增强字节码没有判断这种情况,出现空指针错误。
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:255)
暂无答案!
目前还没有任何答案,快来回答吧!