Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.0-beta-1
-
None
-
None
Description
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 (This happens when requesting the entry getClassCacheEntry). If the timing 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
Attachments
Attachments
Issue Links
- links to