Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-349

Dead-lock between ContextualParameters and WeakHashSet

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.6, 0.7
    • 0.8
    • Referencing
    • None

    Description

      Below are thread-dump of relevant parts. The first parts is in the thread that verifies if an existing map projection exists in the WeakHashSet. This verification implies NormalizedProjection comparisons, which themselves imply ContextualParameters comparisons:

      "Thread-3407" #3588 daemon prio=5 os_prio=0 tid=0x00007f7951adf000 nid=0x5836 waiting for monitor entry [0x00007f78744ef000]
         java.lang.Thread.State: BLOCKED (on object monitor)
          at org.apache.sis.referencing.operation.transform.ContextualParameters.equals(ContextualParameters.java:720)
          - waiting to lock <0x00000007818ef028> (a org.apache.sis.referencing.operation.transform.ContextualParameters)
          at java.util.Arrays.deepEquals0(Arrays.java:4299)
          at java.util.Objects.deepEquals(Objects.java:85)
          at org.apache.sis.util.Utilities.deepEquals(Utilities.java:200)
          at org.apache.sis.referencing.operation.transform.AbstractMathTransform.equals(AbstractMathTransform.java:921)
          at org.apache.sis.referencing.operation.projection.NormalizedProjection.equals(NormalizedProjection.java:797)
          at org.apache.sis.util.Utilities.deepEquals(Utilities.java:143)
          at org.apache.sis.util.Utilities.equals(Utilities.java:238)
          at org.apache.sis.util.Utilities.deepEquals(Utilities.java:168)
          at org.apache.sis.referencing.operation.transform.ConcatenatedTransform.equals(ConcatenatedTransform.java:934)
          at org.apache.sis.referencing.operation.transform.AbstractMathTransform.equals(AbstractMathTransform.java:867)
          at org.apache.sis.util.collection.WeakHashSet.intern(WeakHashSet.java:315)
          at org.apache.sis.util.collection.WeakHashSet.unique(WeakHashSet.java:290)
          - locked <0x0000000704b65b40> (a org.apache.sis.util.collection.WeakHashSet)
          at org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory.unique(DefaultMathTransformFactory.java:1372)
      

      The second part is in the thread that creates a new map projection, which implies operations on ContextualParameters.

      "Thread-3409" #3590 daemon prio=5 os_prio=0 tid=0x00007f7824cfd000 nid=0x5838 waiting for monitor entry [0x00007f7819e6e000]
         java.lang.Thread.State: BLOCKED (on object monitor)
          at org.apache.sis.util.collection.WeakHashSet.unique(WeakHashSet.java:290)
          - waiting to lock <0x0000000704b65b40> (a org.apache.sis.util.collection.WeakHashSet)
          at org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory.unique(DefaultMathTransformFactory.java:1372)
          at org.apache.sis.referencing.operation.transform.DefaultMathTransformFactory.createConcatenatedTransform(DefaultMathTransformFactory.java:1256)
          at org.apache.sis.referencing.operation.transform.ContextualParameters.completeTransform(ContextualParameters.java:522)
          - locked <0x00000007818ef028> (a org.apache.sis.referencing.operation.transform.ContextualParameters)
          at org.apache.sis.referencing.operation.projection.TransverseMercator.createMapProjection(TransverseMercator.java:301)
          at org.apache.sis.internal.referencing.provider.MapProjection.createMathTransform(MapProjection.java:199)
      

      Attachments

        Activity

          People

            desruisseaux Martin Desruisseaux
            jsorel Johann Sorel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: