kylixs commented on a change in pull request #4858:
URL: https://github.com/apache/skywalking/pull/4858#discussion_r448081463



##########
File path: docs/en/FAQ/Compatible-with-other-javaagent-bytecode-processing.md
##########
@@ -0,0 +1,53 @@
+## Compatible with other javaagent bytecode processing
+
+### Problem
+1. when use skywalking agent, arthas can't work well 
+https://github.com/apache/skywalking/pull/4858
+
+2. Custom java agent retransform class fails with Skywalking agent  
+ https://github.com/hengyunabc/skywalking-error-demo
+ 
+### Reason
+Skywalking agent uses ByteBuddy to retransform classes when java application 
starts. 
+ByteBuddy generates auxiliary classes with different random names every time. 
+
+When other javaagent retransforms the same class, it will trigger the 
SkyWalking agent to enhance the class again. 
+The bytecode regenerated by ByteBuddy is changed, the fields and imports are 
modified, the jvm verifys class bytecode failed, and the retransform fails.

Review comment:
       The `imports ` will be converted to constant table items. ByteBuddy 
create random name auxiliary class, and add import item to origin class. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to