[jira] [Updated] (FOP-2157) Deadlock in CompareUtil class
[ https://issues.apache.org/jira/browse/FOP-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacopo Cappellato updated FOP-2157: --- Attachment: FOP-2157-test.patch I am attaching a JUnit test that runs the CompareUtil.equal(...) method and should cause a deadlock with the current code and should work just fine with my patch. > Deadlock in CompareUtil class > - > > Key: FOP-2157 > URL: https://issues.apache.org/jira/browse/FOP-2157 > Project: Fop > Issue Type: Bug > Components: unqualified >Affects Versions: trunk > Environment: Operating System: All > Platform: PC >Reporter: Matthias Reischenbacher >Assignee: Alexios Giotis > Attachments: FOP DEADLOCK jakarta_service_20121107.log, > FOP-2157-test.patch, FOP-2157.patch, report-dump.txt, thread-dump.txt > > > I'm getting a dead lock in the CompareUtil class, see the attached thread > dump. > Here small fragment of the thread dump > [2012-11-07 14:06:25] [info] Found one Java-level deadlock: > [2012-11-07 14:06:25] [info] = > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] "http-80-exec-58": > [2012-11-07 14:06:25] [info] waiting to lock monitor 0x06ca9480 > [2012-11-07 14:06:25] [info] (object 0x00071fe9bd00, a java.util.Vector) > [2012-11-07 14:06:25] [info] , > which is held by "http-80-exec-5" > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] "http-80-exec-5": > [2012-11-07 14:06:25] [info] waiting to lock monitor 0x116ecfc8 > [2012-11-07 14:06:25] [info] (object 0x00071fe9a000, a java.util.Vector) > [2012-11-07 14:06:25] [info] , > which is held by "http-80-exec-18" > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] "http-80-exec-18": > [2012-11-07 14:06:25] [info] waiting to lock monitor 0x06ca9480 > [2012-11-07 14:06:25] [info] (object 0x00071fe9bd00, a java.util.Vector) > [2012-11-07 14:06:25] [info] , > which is held by "http-80-exec-5" > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] Java stack information for the threads listed > above: > [2012-11-07 14:06:25] [info] > === > [2012-11-07 14:06:25] [info] "http-80-exec-58": > [2012-11-07 14:06:25] [info] at java.util.Vector.equals(Vector.java:925) > [2012-11-07 14:06:25] [info] - waiting to lock <0x00071fe9bd00> > [2012-11-07 14:06:25] [info] (a java.util.Vector) > [2012-11-07 14:06:25] [info] at > org.apache.fop.util.CompareUtil.equal(CompareUtil.java:38) > [2012-11-07 14:06:25] [info] at > org.apache.fop.fo.properties.ListProperty.equals(ListProperty.java:123) > [2012-11-07 14:06:25] [info] at > org.apache.fop.fo.properties.PropertyCache.eq(PropertyCache.java:193) > [2012-11-07 14:06:25] [info] at > org.apache.fop.fo.properties.PropertyCache.fetch(PropertyCache.java:134) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.properties.FontFamilyProperty$Maker.make(FontFamilyProperty.java:94) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:413) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:321) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.FObj.processNode(FObj.java:122) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:280) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:175) > [2012-11-07 14:06:26] [info] at > org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) > [2012-11-07 14:06:26] [info] at > org.apache.xml.serializer.TreeWalker.startNode(TreeWalker.java:359) > [2012-11-07 14:06:26] [info] at > org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:145) > [2012-11-07 14:06:26] [info] at > org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:390) > [2012-11-07 14:06:26] [info] at > smc.fop.FopWrapper.transform(FopWrapper.java:150) > [2012-11-07 14:06:26] [info] at > smc.fop.FopWrapper.transform(FopWrapper.java:125) > [2012-11-07 14:06:26] [info] at smc.plugin.Dom2PDF.process(Dom2PDF.java:179) > [2012-11-07 14:06:26] [info] at > sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source) > [2012-11-07 14:06:26] [info] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [2012-11-07 14:06:26] [info] at > java.lang.reflect.Method.invoke(Method.java:597) > [2012-11-07 14:06:26] [info] at > smc.transform.core.dynacode.DynaCode$MyInvocationHandler.invoke(DynaCode.java:374) > [2012-11-07 14:06:26] [info] at $Proxy35.process(Unknown Source) > [2012-11-07 14:06:2
[jira] [Updated] (FOP-2157) Deadlock in CompareUtil class
[ https://issues.apache.org/jira/browse/FOP-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacopo Cappellato updated FOP-2157: --- Attachment: FOP-2157.patch This is a variant of the fix proposed by Morten Knudsen; this slightly more complex version covers the unlucky case of different objects with the same hash code. > Deadlock in CompareUtil class > - > > Key: FOP-2157 > URL: https://issues.apache.org/jira/browse/FOP-2157 > Project: Fop > Issue Type: Bug > Components: unqualified >Affects Versions: trunk > Environment: Operating System: All > Platform: PC >Reporter: Matthias Reischenbacher >Assignee: Alexios Giotis > Attachments: FOP DEADLOCK jakarta_service_20121107.log, > FOP-2157.patch, report-dump.txt, thread-dump.txt > > > I'm getting a dead lock in the CompareUtil class, see the attached thread > dump. > Here small fragment of the thread dump > [2012-11-07 14:06:25] [info] Found one Java-level deadlock: > [2012-11-07 14:06:25] [info] = > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] "http-80-exec-58": > [2012-11-07 14:06:25] [info] waiting to lock monitor 0x06ca9480 > [2012-11-07 14:06:25] [info] (object 0x00071fe9bd00, a java.util.Vector) > [2012-11-07 14:06:25] [info] , > which is held by "http-80-exec-5" > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] "http-80-exec-5": > [2012-11-07 14:06:25] [info] waiting to lock monitor 0x116ecfc8 > [2012-11-07 14:06:25] [info] (object 0x00071fe9a000, a java.util.Vector) > [2012-11-07 14:06:25] [info] , > which is held by "http-80-exec-18" > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] "http-80-exec-18": > [2012-11-07 14:06:25] [info] waiting to lock monitor 0x06ca9480 > [2012-11-07 14:06:25] [info] (object 0x00071fe9bd00, a java.util.Vector) > [2012-11-07 14:06:25] [info] , > which is held by "http-80-exec-5" > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] Java stack information for the threads listed > above: > [2012-11-07 14:06:25] [info] > === > [2012-11-07 14:06:25] [info] "http-80-exec-58": > [2012-11-07 14:06:25] [info] at java.util.Vector.equals(Vector.java:925) > [2012-11-07 14:06:25] [info] - waiting to lock <0x00071fe9bd00> > [2012-11-07 14:06:25] [info] (a java.util.Vector) > [2012-11-07 14:06:25] [info] at > org.apache.fop.util.CompareUtil.equal(CompareUtil.java:38) > [2012-11-07 14:06:25] [info] at > org.apache.fop.fo.properties.ListProperty.equals(ListProperty.java:123) > [2012-11-07 14:06:25] [info] at > org.apache.fop.fo.properties.PropertyCache.eq(PropertyCache.java:193) > [2012-11-07 14:06:25] [info] at > org.apache.fop.fo.properties.PropertyCache.fetch(PropertyCache.java:134) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.properties.FontFamilyProperty$Maker.make(FontFamilyProperty.java:94) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:413) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:321) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.FObj.processNode(FObj.java:122) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:280) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:175) > [2012-11-07 14:06:26] [info] at > org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) > [2012-11-07 14:06:26] [info] at > org.apache.xml.serializer.TreeWalker.startNode(TreeWalker.java:359) > [2012-11-07 14:06:26] [info] at > org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:145) > [2012-11-07 14:06:26] [info] at > org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:390) > [2012-11-07 14:06:26] [info] at > smc.fop.FopWrapper.transform(FopWrapper.java:150) > [2012-11-07 14:06:26] [info] at > smc.fop.FopWrapper.transform(FopWrapper.java:125) > [2012-11-07 14:06:26] [info] at smc.plugin.Dom2PDF.process(Dom2PDF.java:179) > [2012-11-07 14:06:26] [info] at > sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source) > [2012-11-07 14:06:26] [info] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [2012-11-07 14:06:26] [info] at > java.lang.reflect.Method.invoke(Method.java:597) > [2012-11-07 14:06:26] [info] at > smc.transform.core.dynacode.DynaCode$MyInvocationHandler.invoke(DynaCode.java:374) > [2012-11-07 14:06:26] [info] at $Proxy35.process(Unknown Source) > [2012-11-07 14:06:26] [info] at > smc.transfo
[jira] [Commented] (FOP-2157) Deadlock in CompareUtil class
[ https://issues.apache.org/jira/browse/FOP-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14155108#comment-14155108 ] Jacopo Cappellato commented on FOP-2157: I am able to recreate the same deadlock in FOP by running a JMeter test against Apache OFBiz (I am an OFBiz committer)... hey 3 Apache projects in one row :-) The patch proposed by Morten Knudsen should fix the issue (I was going to propose a similar approach) because this is a lock ordering deadlock. I will try to apply it if I figure out how to build the fop jars (in ofbiz we are using fop 1.1). I will keep you updated. Is there a chance to see this fix included in an upcoming bug fix release? Thanks > Deadlock in CompareUtil class > - > > Key: FOP-2157 > URL: https://issues.apache.org/jira/browse/FOP-2157 > Project: Fop > Issue Type: Bug > Components: unqualified >Affects Versions: trunk > Environment: Operating System: All > Platform: PC >Reporter: Matthias Reischenbacher >Assignee: Alexios Giotis > Attachments: FOP DEADLOCK jakarta_service_20121107.log, > report-dump.txt, thread-dump.txt > > > I'm getting a dead lock in the CompareUtil class, see the attached thread > dump. > Here small fragment of the thread dump > [2012-11-07 14:06:25] [info] Found one Java-level deadlock: > [2012-11-07 14:06:25] [info] = > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] "http-80-exec-58": > [2012-11-07 14:06:25] [info] waiting to lock monitor 0x06ca9480 > [2012-11-07 14:06:25] [info] (object 0x00071fe9bd00, a java.util.Vector) > [2012-11-07 14:06:25] [info] , > which is held by "http-80-exec-5" > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] "http-80-exec-5": > [2012-11-07 14:06:25] [info] waiting to lock monitor 0x116ecfc8 > [2012-11-07 14:06:25] [info] (object 0x00071fe9a000, a java.util.Vector) > [2012-11-07 14:06:25] [info] , > which is held by "http-80-exec-18" > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] "http-80-exec-18": > [2012-11-07 14:06:25] [info] waiting to lock monitor 0x06ca9480 > [2012-11-07 14:06:25] [info] (object 0x00071fe9bd00, a java.util.Vector) > [2012-11-07 14:06:25] [info] , > which is held by "http-80-exec-5" > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] > [2012-11-07 14:06:25] [info] Java stack information for the threads listed > above: > [2012-11-07 14:06:25] [info] > === > [2012-11-07 14:06:25] [info] "http-80-exec-58": > [2012-11-07 14:06:25] [info] at java.util.Vector.equals(Vector.java:925) > [2012-11-07 14:06:25] [info] - waiting to lock <0x00071fe9bd00> > [2012-11-07 14:06:25] [info] (a java.util.Vector) > [2012-11-07 14:06:25] [info] at > org.apache.fop.util.CompareUtil.equal(CompareUtil.java:38) > [2012-11-07 14:06:25] [info] at > org.apache.fop.fo.properties.ListProperty.equals(ListProperty.java:123) > [2012-11-07 14:06:25] [info] at > org.apache.fop.fo.properties.PropertyCache.eq(PropertyCache.java:193) > [2012-11-07 14:06:25] [info] at > org.apache.fop.fo.properties.PropertyCache.fetch(PropertyCache.java:134) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.properties.FontFamilyProperty$Maker.make(FontFamilyProperty.java:94) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:413) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:321) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.FObj.processNode(FObj.java:122) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:280) > [2012-11-07 14:06:26] [info] at > org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:175) > [2012-11-07 14:06:26] [info] at > org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) > [2012-11-07 14:06:26] [info] at > org.apache.xml.serializer.TreeWalker.startNode(TreeWalker.java:359) > [2012-11-07 14:06:26] [info] at > org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:145) > [2012-11-07 14:06:26] [info] at > org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:390) > [2012-11-07 14:06:26] [info] at > smc.fop.FopWrapper.transform(FopWrapper.java:150) > [2012-11-07 14:06:26] [info] at > smc.fop.FopWrapper.transform(FopWrapper.java:125) > [2012-11-07 14:06:26] [info] at smc.plugin.Dom2PDF.process(Dom2PDF.java:179) > [2012-11-07 14:06:26] [info] at > sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source) > [2012-11-07 14:06:26] [info] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(Dele