Arthas: profiler在shutdown后,再次使用会报错

Created on 2 Dec 2019  ·  5Comments  ·  Source: alibaba/arthas

如果执行profiler start后,调用了shutdown,之后如果再次使用profiler start,会报错
2019-12-02 17-53-36 的屏幕截图
原因应该是:so被重新load了两次,是不是可以处理一下。

bug

Most helpful comment

改为用SystemClassLoader来加载 one/profiler的类,这样子arthas多次attatch都是加载的SystemClassLoader里的async profiler.

修复测试版:

arthas-3.1.6-SNAPSHOT-bin.zip

All 5 comments

的确有这个问题,我看怎么处理下

$ profiler start
Native Library /Users/hengyunabc/.arthas/lib/3.1.5/arthas/async-profiler/libasyncProfiler-mac-x64.so already loaded in another classloader

改为用SystemClassLoader来加载 one/profiler的类,这样子arthas多次attatch都是加载的SystemClassLoader里的async profiler.

修复测试版:

arthas-3.1.6-SNAPSHOT-bin.zip

再问个问题,这个是BootstrapClassLoader,不是SystemClassLoader吧

再问个问题,这个是BootstrapClassLoader,不是SystemClassLoader吧

放到了 arthas-spy.jar 里,的确是 BootstrapClassLoader 。

感谢。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hengyunabc picture hengyunabc  ·  3Comments

EternalHao picture EternalHao  ·  4Comments

paulqi picture paulqi  ·  4Comments

x334085347 picture x334085347  ·  5Comments

lanshiqin picture lanshiqin  ·  7Comments