Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-3027

Gradle may hang due to synchronization issue inside ivy's code related to WeakHashMap cache

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.10-rc-1

      Description

      Gradle may hang due to synchronization issue inside ivy's code related to WeakHashMap cache. The effect visible to the user is that the build hangs and jstack output will show that one thread is busy doing this:

      at java.util.WeakHashMap.get(WeakHashMap.java:355)
      	at org.apache.ivy.core.module.id.ModuleId.intern(ModuleId.java:63)
      	at org.apache.ivy.core.module.id.ModuleId.newInstance(ModuleId.java:48)
      	at org.apache.ivy.core.module.id.ModuleRevisionId.newInstance(ModuleRevisionId.java:106)
      	at org.gradle.api.internal.artifacts.ivyservice.IvyUtil.createModuleRevisionId(IvyUtil.java:45)
      

      This can happen only in --parallel builds. Ivy's code internally uses static WeakHashMap cache that is buggy: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6425537

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            szczepiq Szczepan Faber
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: