同时trace同个class内不同method数据异常问题
- Dominant language
- Java
- Stars
- 37.5k
- Forks
- 7.6k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 4
Description
### 环境信息
* `arthas-boot.jar` 或者 `as.sh` 的版本: 3.7.2
* Arthas 版本: 3.7.2
* 操作系统版本: win11
* 目标进程的JVM版本: 1.8
* 执行`arthas-boot`的版本: 3.7.2
### 重现问题的步骤
1. 这里增强时用了监控类+调用类+调用方法名+调用方法描述作为Key,当监控类内不同方法调用了调用类的同个方法,会导致数据混乱。

2. 测试用例
```
public class Test {
public static void main(String[] args) throws Exception {
A a = new A();
while (true) {
a.methodA();
a.methodB();
Thread.sleep(1000);
}
}
public static class A {
private B b = new B();
public void methodA() {
b.methodA();
b.methodB();
}
public void methodB() {
b.methodB();
b.methodA();
}
}
public static class B {
public void methodA() {
System.out.println("a");
}
public void methodB() {
System.out.println("b");
}
}
}
```
3. 启动Arthas客户端1,使用命令`trace Test$A methodA`
4. 启动Arthas客户端2,使用命令`trace Test$A methodB`
### 期望的结果
Arthas客户端1

Arthas客户端2

### 实际运行的结果
Arthas客户端1

Arthas客户端2

Contributor guide
Research direction
Reproduce the issue with the supplied Java Test class and two concurrent `trace Test$A methodA` and `trace Test$A methodB` commands. Start by following the trace implementation where the monitoring class, called class, method name, and descriptor form the key; done means each client reports only its selected method's data without mixing results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools, observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100