[ 
https://issues.apache.org/jira/browse/SIS-349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Desruisseaux closed SIS-349.
-----------------------------------

> Dead-lock between ContextualParameters and WeakHashSet
> ------------------------------------------------------
>
>                 Key: SIS-349
>                 URL: https://issues.apache.org/jira/browse/SIS-349
>             Project: Spatial Information Systems
>          Issue Type: Bug
>          Components: Referencing
>    Affects Versions: 0.6, 0.7
>            Reporter: Johann Sorel
>            Assignee: Martin Desruisseaux
>             Fix For: 0.8
>
>
> 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:
> {noformat}
> "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)
> {noformat}
> The second part is in the thread that creates a new map projection, which 
> implies operations on {{ContextualParameters}}.
> {noformat}
> "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)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to