https://arthas.aliyun.com/doc/thread.html
记录一下,否则下次又忘记了。
问题现象
一个spring boot的服务出现死锁,所有请求都pending
问题追溯
#执行命令,启动arthas服务
java -jar arthas-boot.jar
#执行命令,查看找出当前阻塞其他线程的线程
thread -b
发现没有阻塞的线程
#执行命令,查看处于等待状态的线程
thread thread --state WAITING
#从下图可以看到,有一些线程阻塞了很久

#执行命令 thread id, 显示指定线程的运行堆栈
thread 88
#从下图可以看到,RedisUtils中的方法出现死锁,所以定位到了导致pending的问题。
