[jira] [Updated] (FOP-2157) Deadlock in CompareUtil class

2014-10-02 Thread Jacopo Cappellato (JIRA)

 [ 
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

Question on FOP release schedule

2014-10-02 Thread Jacopo Cappellato
Hi all,

I am a committer for Apache OFBiz, a project that uses FOP 1.1 (thanks for this 
amazing product).

I hope this is the right list to get some information about the release process 
and planning of Apache FOP. Apart from FOP 2.0, is there a plan to release a 
bug fix release for 1.1?
For example, we may be specifically interested in getting a new release with 
this issue resolved:
https://issues.apache.org/jira/browse/FOP-2157

(in the ticket I have attached a fix for the same).

Is there something we could do to support you in the process?

Thank you,

Jacopo

Re: Question on FOP release schedule

2014-10-02 Thread Luis Bernardo


I can apply your patch although I do not have the environment to test it.

Regarding the question about a bug fix for 1.1, the answer is that there 
is nothing planned but if there is interest from the FOP users I think 
that can be accommodated. Is there any other bug your would like to see 
fixed in a 1.1+ release?


On 10/2/14, 7:22 PM, Jacopo Cappellato wrote:

Hi all,

I am a committer for Apache OFBiz, a project that uses FOP 1.1 (thanks for this 
amazing product).

I hope this is the right list to get some information about the release process 
and planning of Apache FOP. Apart from FOP 2.0, is there a plan to release a 
bug fix release for 1.1?
For example, we may be specifically interested in getting a new release with 
this issue resolved:
https://issues.apache.org/jira/browse/FOP-2157

(in the ticket I have attached a fix for the same).

Is there something we could do to support you in the process?

Thank you,

Jacopo




[jira] [Updated] (FOP-2157) Deadlock in CompareUtil class

2014-10-02 Thread Jacopo Cappellato (JIRA)

 [ 
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

Re: Question on FOP release schedule

2014-10-02 Thread Jacopo Cappellato
Thank you Luis,

I have attached to Jira a Junit test for the CompareUtil.equal method that 
should prove the issue we are facing and should confirm that the fix I am 
proposing should work ok.
As regards the bug fix release, at the moment this is the only issue that I am 
aware of that is causing some pain to OFBiz and having a bug fix release for it 
would be great; however I know that the release workflow requires a good amount 
of work and I am wondering if I or other OFBiz committers may be of any help in 
the release process (e.g. we could help the FOP community to maintain a release 
branch for 1.1 by backporting fixes to it and testing it).
I am wide open to any suggestions. Of course OFBiz will upgrade to the new 
release 2.0 as soon as this will be available and we will help you to test that 
as well. All in all I am just trying to give something back to the FOP 
community, since the OFBiz community has been a rather silent and passive user 
of your amazing tool :-)

Regards,

Jacopo

On Oct 3, 2014, at 1:15 AM, Luis Bernardo  wrote:

> 
> I can apply your patch although I do not have the environment to test it.
> 
> Regarding the question about a bug fix for 1.1, the answer is that there is 
> nothing planned but if there is interest from the FOP users I think that can 
> be accommodated. Is there any other bug your would like to see fixed in a 
> 1.1+ release?
> 
> On 10/2/14, 7:22 PM, Jacopo Cappellato wrote:
>> Hi all,
>> 
>> I am a committer for Apache OFBiz, a project that uses FOP 1.1 (thanks for 
>> this amazing product).
>> 
>> I hope this is the right list to get some information about the release 
>> process and planning of Apache FOP. Apart from FOP 2.0, is there a plan to 
>> release a bug fix release for 1.1?
>> For example, we may be specifically interested in getting a new release with 
>> this issue resolved:
>> https://issues.apache.org/jira/browse/FOP-2157
>> 
>> (in the ticket I have attached a fix for the same).
>> 
>> Is there something we could do to support you in the process?
>> 
>> Thank you,
>> 
>> Jacopo
>