Joel Bredeson created GROOVY-8230:
-------------------------------------

             Summary: Deadlock in GroovyClassLoader
                 Key: GROOVY-8230
                 URL: https://issues.apache.org/jira/browse/GROOVY-8230
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 2.4.10
            Reporter: Joel Bredeson
         Attachments: GroovyClassLoaderDeadlock.txt

The GroovyClassLoader.clearCache() method can deadlock when another thread is 
creating a new instance of a class. The clearCache() method locks the 
classCache, then when removing the class through the InvokerHelper locks the 
ClassInfo object. When a new instance is created that instance can lock the 
ClassInfo object first, then later request the lock for the classCache when 
requesting the entry (getClassCacheEntry). If the timing is between the two 
threads is unlucky a deadlock can occur. 

Relevant stack trace attached.

Groovy: 2.4.10 groovy-all-2.4.10-indy.jar
Java: JRE 8u73_64




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to