alibaba / arthas

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

The watch method is called once but receives two results #2787

Open revolyw opened 10 months ago

revolyw commented 10 months ago

Environment

Steps to reproduce this issue

  1. Start a jdk11 application and set jvm options as follows and implements a spring mvc controller method
    -Dskywalking.agent.service_name=application-name
    -javaagent:/xxxx/skywalking-agent.jar
    -Dskywalking.agent.is_cache_enhanced_class=true
    -Dskywalking.agent.class_cache_mode=MEMORY
  2. Attach the application through tunnel server console and watch the controller method
  3. Call the controller method once
  4. The console can seen two result as follow image

Expected Result

What do you expected from the above steps?

The number of result is the same as the number of calls The number of results is the same as the number of calls

Actual Result

What actually happens?

Call once but receives two results

If there is an exception, please attach the exception trace:

No exception occurs
revolyw commented 10 months ago

I decompiled the class using the jad command with the following results image