[jira] [Commented] (GROOVY-8230) Deadlock in GroovyClassLoader

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] [Commented] (GROOVY-8230) Deadlock in GroovyClassLoader

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/GROOVY-8230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16053378#comment-16053378 ]

ASF GitHub Bot commented on GROOVY-8230:
----------------------------------------

GitHub user jwagenleitner opened a pull request:

    https://github.com/apache/groovy/pull/561

    GROOVY-8230: Deadlock in GroovyClassLoader

   

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jwagenleitner/groovy 8230-gcl-deadlock

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/561.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #561
   
----
commit cc2ab1a5fe09d56de905d0b0a3b3a87fcf0d6a60
Author: John Wagenleitner <[hidden email]>
Date:   2017-06-19T00:16:07Z

    GROOVY-8230: Deadlock in GroovyClassLoader

----


> Deadlock in GroovyClassLoader
> -----------------------------
>
>                 Key: GROOVY-8230
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8230
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.5.0-beta-1
>            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 (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



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