[alibaba/arthas]trace后过了段时间进程异常挂掉

2025-11-12 899 views
5
环境信息 arthas-boot.jar 或者 as.sh 的版本: xxx Arthas 版本: 3.6.6 操作系统版本: Linux ubuntu 4.9.0-141-custom 目标进程的JVM版本: 1.8.0_171-b11 执行arthas-boot的版本: xxx 重现问题的步骤 执行 trace 命令并报错
trace org.apache.shardingsphere.proxy.frontend.netty.FrontendChannelInboundHandler authenticate
Affect(class count: 1 , method count: 1) cost in 212 ms, listenerId: 1
Enhance error! exception: java.lang.UnsupportedOperationException: class redefinition failed: attempted to change superclass 
or interfaces
error happens when enhancing class: class redefinition failed: attempted to change superclass or interfaces, check arthas log: 
/root/logs/arthas/arthas.log
使用 stop 命令退出arthas; 过了段时间执行了上述操作的三个实例进程均异常崩溃,未执行的实例全都正常; 期望的结果

即使 trace 不成功也别导致进程崩溃;

实际运行的结果

使用 gdb -c /data/core_files/core-java-49445-1666700564 命令查看崩溃后生成的linux core文件,发现如下内容

warning: Unexpected size of section `.reg-xstate/49468' in core file.
Core was generated by `java -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -DLOGS_DIR=/data/'.
Program terminated with signal SIGABRT, Aborted.

warning: Unexpected size of section `.reg-xstate/49468' in core file.
#0  0x00007fbbd4c32428 in ?? ()
[Current thread is 1 (LWP 49468)]
(gdb) bt
#0  0x00007fbbd4c32428 in ?? ()
#1  0x00007fbbd4c3402a in ?? ()
#2  0x0000000000000020 in ?? ()
#3  0x0000000000000000 in ?? ()

出现错误但是显示为 ?? 乱码,原本应该是是错误的代码位置,从这点怀疑可能是arthas增强出现了问题。

回答

7

这种事情说不准,最好换最新版本的 jdk8测试下。

2

好的,这个问题比较偶现且不敢在生产环境随便试验,能说下这里jdk版本造成此类问题的原理不,我这边从原理入手进行复现感觉更靠谱一些。

8

arthas调用的都是jvm公开的api,应该没办法直接破坏jvm的内存。更可能是jvm自身实现有问题。

还是建议升最新jdk8 试下。