2
环境信息
arthas-boot.jar
或者as.sh
的版本: 3.4.4- Arthas 版本: 3.4.4
- 操作系统版本: CentOS 7
- 目标进程的JVM版本: 1.8.0_202
- 执行
arthas-boot
的版本: 1.8.0_202
- jad --source-only 某个含有匿名内部类的class
- mc 内存编译第 1 步的结果
- 异常
在未人为改变jad生成的java文件的情况下,希望mc 成功
实际运行的结果Memory compiler error, exception message: Compilation Error
line: 969 , message:
jad生成的java文件,969行代码如下:
PlatformResponse platformResponse = (PlatformResponse)new Gson().fromJson(platformDetailsCache, new /* Unavailable Anonymous Inner Class!! */.getType());
对应的原始代码如下:
PlatformResponse platformResponse = new Gson().fromJson(platformDetailsCache, new TypeToken<PlatformResponse>() {}.getType());
对应$HOME/logs/arthas/arthas.log日志如下:
2021-09-07 09:03:07 [arthas-command-execute] WARN c.t.a.c.c.k.MemoryCompilerCommand -Memory compiler error
com.taobao.arthas.compiler.DynamicCompilerException: Compilation Error
line: 969 , message: <identifier> expected ,
at com.taobao.arthas.compiler.DynamicCompiler.buildByteCodes(DynamicCompiler.java:132)
at com.taobao.arthas.core.command.klass100.MemoryCompilerCommand.process(MemoryCompilerCommand.java:137)
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)