You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2018/12/07 05:39:19 UTC

[GitHub] wu-sheng edited a comment on issue #2016: fix classloader dead lock in jdk7+

wu-sheng edited a comment on issue #2016: fix classloader dead lock in jdk7+
URL: https://github.com/apache/incubator-skywalking/pull/2016#issuecomment-445128525
 
 
   When I dive into the `ClassLoader`, from jvm7, if other class loaders run in parallel mode, and accidentally they ask AgentClassLoader to init a plugin interceptor concurrently. May trigger this lock. 
   
   The related codes are here
   ```
       // This method is invoked by the virtual machine to load a class.
       private Class<?> loadClassInternal(String name)
           throws ClassNotFoundException
       {
           // For backward compatibility, explicitly lock on 'this' when
           // the current class loader is not parallel capable.
           if (parallelLockMap == null) {
               synchronized (this) {
                    return loadClass(name);
               }
           } else {
               return loadClass(name);
           }
       }
   ```
   
   The deadlock info is here
   
   ![image](https://user-images.githubusercontent.com/5441976/49629641-75175f00-fa25-11e8-83f4-0266e85c0e59.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services