alibaba / arthas

Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas
https://arthas.aliyun.com/
Apache License 2.0
35.7k stars 7.51k forks source link

profiler命令报错:libasyncProfiler-mac-x64.so no suitable image found #1766

Open Freyiz opened 3 years ago

Freyiz commented 3 years ago

环境信息

重现问题的步骤

  1. curl -O https://arthas.aliyun.com/arthas-boot.jar
  2. 运行java程序
  3. java -jar arthas-boot.jar
  4. 选择目标程序,进入arthas控制台
  5. profiler list

期望的结果

打印如下信息: Basic events: cpu alloc lock wall itimer

实际运行的结果

打印了如下信息: AsyncProfiler error: /Users//.arthas/lib/3.5.0/arthas/async-profiler/libasyncProfiler-mac-x64.so: dlopen(/Users//.arthas/lib/3.5.0/arthas/async-profiler/libasyncProfiler-mac-x64.so, 1): no suitable image found. Did find: /Users//.arthas/lib/3.5.0/arthas/async-profiler/libasyncProfiler-mac-x64.so: mach-o, but wrong architecture /Users//.arthas/lib/3.5.0/arthas/async-profiler/libasyncProfiler-mac-x64.so: mach-o, but wrong architecture

备注

1.profiler -h 可正常工作。 2.其他命令可正常工作。 3./Users//.arthas/lib/3.5.0/arthas/async-profiler/libasyncProfiler-mac-x64.so文件存在。

hengyunabc commented 3 years ago

要看具体电脑是什么cpu的,可能某些cpu架构不支持。

Freyiz commented 3 years ago

m1的

hengyunabc commented 3 years ago

目前手上没有m1的机器,不过应该要编译出arm架构的so。

https://github.com/jvm-profiling-tools/async-profiler/releases ,本身还没提供mac arm的版本。 可能要试下自己本地编译。