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
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