Replies: 8 comments 5 replies
-
Beta Was this translation helpful? Give feedback.
-
This seems to be an unsupported version error. Have nothing related that. This class maybe should not be changed by the agent, but it was due to version and code changes. Anyway, the plugin is from global contributors. I moved this here, and wait for others to take a look. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
ERROR 2025-09-04 10:45:59.337 Thread-13 InstMethodsInter : class[class okhttp3.RealCall] before method[enqueue] intercept failure ERROR 2025-09-04 10:45:59.340 Thread-13 InstMethodsInter : class[class okhttp3.RealCall] after method[enqueue] intercept failure |
Beta Was this translation helpful? Give feedback.
-
[arthas@22170]$ jad okhttp3/RealCall$auxiliary$92g3EUdP ClassLoader: Location: /*
import java.util.concurrent.Callable; class RealCall$auxiliary$92g3EUdP
} |
Beta Was this translation helpful? Give feedback.
-
After adding CacheableTransformerDecorator back, there is a problem with the enhanced code properties of okhttp3/RealCall$auxiliary$92g3EUdP, and an additional private Callback argument1; parameter |
Beta Was this translation helpful? Give feedback.
-
I don't understand why this phenomenon occurs. I understand that after I add the CacheableTransformerDecorator back, the subsequent transforms all use the first cache. Is there any difference in the logic of each transform of SkyWalking? |
Beta Was this translation helpful? Give feedback.
-
Could u pls try the latest release, i.e. https://github.com/apache/skywalking-java/releases/tag/v9.5.0 apache/skywalking-java#757 may help. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Search before asking
Apache SkyWalking Component
OAP server (apache/skywalking)
What happened
After using SkyWalking version 9.2, I get a java.lang.UnsupportedOperationException: class redefinition failed: attempted to change superclass or interfaces exception when trying to trace a method of a class using Arthas. I've searched for similar issues and found a similar problem when using version 8.X. I solved it by adding the parameters -Dskywalking.agent.is_cache_enhanced_class=true and -Dskywalking.agent.class_cache_mode=MEMORY. Because SkyWalking enhances bytecode information dynamically when used with other probes, the names of newly added fields or methods are dynamic. I noticed that the CacheableTransformerDecorator class was removed after version 9.X. I saw in the commit notes that upgrading the byte-buddy version resolved the dynamic enhancement issue, but this doesn't seem to be the case.
First, taking the okhttp3.RealCall enhancement as an example, I used the jad command on arthas to discover that the source code doesn't contain the SkyWalking enhancement logic. Its implementation logic is simply a wrapper around RealCall, with an additional class named okhttp3/RealCall$auxiliary$7KNXUqCR. However, executing the trace okhttp3.RealCall enqueue command on arthas resulted in a java.lang.UnsupportedOperationException: class redefinition failed: attempted to change superclass or interfaces exception. Even my probe retransformed it, resulting in the same exception. I suspect this is a problem.
Secondly, while upgrading byte-buddy resolved the dynamic enhancement issue, I'm also concerned because the generated enhancement class name, such as okhttp3/RealCall$auxiliary$7KNXUqCR, changes with each generation. Does this indicate instability? I've found that retransformation fails for any class with this name, and okhttp3.RealCall is just one example.
What you expected to happen
Classes enhanced with SkyWalking should not be unable to retransform
How to reproduce
Other probes do not work in many classes enhanced by retransform skywalking
Anything else
Are you willing to submit a pull request to fix on your own?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions