You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Christophe DUVAL (JIRA)" <xa...@xml.apache.org> on 2011/02/04 15:12:28 UTC

[jira] Created: (XALANJ-2533) DTMManager.newInstance issue in a java multithreaded application: excessive ClassLoader, threads lock wait, no cache

DTMManager.newInstance issue in a java multithreaded application: excessive ClassLoader, threads lock wait, no cache
--------------------------------------------------------------------------------------------------------------------

                 Key: XALANJ-2533
                 URL: https://issues.apache.org/jira/browse/XALANJ-2533
             Project: XalanJ2
          Issue Type: Bug
      Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects.  Anybody can view the issue.)
          Components: DTM
         Environment: AIX 5.3, JDK 1.5 (last fix), XALAN 2.7.0
            Reporter: Christophe DUVAL




-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2533) DTMManager.newInstance issue in a java multithreaded application: excessive ClassLoader, threads lock wait, no cache

Posted by "Tom Hutchinson (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANJ-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992010#comment-12992010 ] 

Tom Hutchinson commented on XALANJ-2533:
----------------------------------------

We have been having this exact same issue where we had 16 threads trying to use XPath on different XML at the same time and found it blocking down in the Xalan code.  Following the thread stack trace I found DTMManager.newInstance() being called and looked at the Javadoc for it on what it's trying to do.  Since we had no system property set it searches for the factoryId in every jar file on every call to this method.

http://xml.apache.org/xalan-j/apidocs/org/apache/xml/dtm/DTMManager.html#newInstance%28org.apache.xml.utils.XMLStringFactory%29

Just by setting the system property to the default it will not do this lookup every single time and substantially improve performance.

org.apache.xml.dtm.DTMManager=org.apache.xml.dtm.ref.DTMManagerDefault

> DTMManager.newInstance issue in a java multithreaded application: excessive ClassLoader, threads lock wait, no cache
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: XALANJ-2533
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2533
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects.  Anybody can view the issue.) 
>          Components: DTM
>         Environment: AIX 5.3, JDK 1.5 (last fix), XALAN 2.7.0
>            Reporter: Christophe DUVAL
>


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] [Commented] (XALANJ-2533) DTMManager.newInstance issue in a java multithreaded application: excessive ClassLoader, threads lock wait, no cache

Posted by "Guillaume Bilodeau (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANJ-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13264379#comment-13264379 ] 

Guillaume Bilodeau commented on XALANJ-2533:
--------------------------------------------

We've been facing the same issue.  While setting the org.apache.xml.dtm.DTMManager system property has greatly improved performance, we're still seeing a bottleneck in the DTMManager instance creation process.  The performance hit comes a little later in com.sun.org.apache.xml.internal.dtm.ObjectFactory in the findProviderClass method - in our environment (WebLogic 10.3.5) the ClassLoader is not null at that point and so it is asked to load the class definition repeatedly, even though it has been loaded previously.  Is there a way to deal with this?
                
> DTMManager.newInstance issue in a java multithreaded application: excessive ClassLoader, threads lock wait, no cache
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: XALANJ-2533
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2533
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects.  Anybody can view the issue.) 
>          Components: DTM
>         Environment: AIX 5.3, JDK 1.5 (last fix), XALAN 2.7.0
>            Reporter: Christophe DUVAL
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2533) DTMManager.newInstance issue in a java multithreaded application: excessive ClassLoader, threads lock wait, no cache

Posted by "Christophe DUVAL (JIRA)" <xa...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XALANJ-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990563#comment-12990563 ] 

Christophe DUVAL commented on XALANJ-2533:
------------------------------------------

Hi,

I am currently tuning a Java multithreated application which uses intensively XALAN/Xpath. I have a performance issue. I analyzed many java core dump during a test, and I saw a problem related to DTMManager.newInstance. All new thread executing DTMManager.newInstance try to load again the associated class, and causes many thread lock wait.

Class loader issue:

at java/lang/ClassLoader.loadClass(ClassLoader.java:573(Compiled Code))
at org/apache/xml/dtm/ObjectFactory.findProviderClass(ObjectFactory.java:506(Compiled Code))
at org/apache/xml/dtm/ObjectFactory.lookUpFactoryClass(ObjectFactory.java:217(Compiled Code))
at org/apache/xml/dtm/ObjectFactory.createObject(ObjectFactory.java:131(Compiled Code))
at org/apache/xml/dtm/ObjectFactory.createObject(ObjectFactory.java:101(Compiled Code))
at org/apache/xml/dtm/DTMManager.newInstance(DTMManager.java:135(Compiled Code))
at org/apache/xpath/XPathContext.(XPathContext.java:100(Compiled Code))
at com/aaa/bbb/util/xml/XMLUtil.getXObject(XMLUtil.java:1039(Compiled Code))
at com/aaa/bbb/xpathutil/XPathHelper.executeXPath(XPathHelper.java:454(Compiled Code))
at com/aaa/bbb/xpathutil/XPathHelper.executeXPath(XPathHelper.java:150(Compiled Code))
at com/aaa/bbb/xpathutil/XPathHelper.getNodeListFromXPath(XPathHelper.java:889(Compiled Code))
at com/aaa/bbb/xpathutil/XPathHelper.getNodeListFromXPath(XPathHelper.java:883(Compiled Code))
at com/aaa/bbb/workflow/WFCUtil.getDataFromTree(WFCUtil.java:1119(Compiled Code))
at com/aaa/bbb/workflow/WorkFlowContext.getDataFromTree(WorkFlowContext.java:2692(Compiled Code))
at com/aaa/bbb/workflow/WorkFlowContext.getWFContent(WorkFlowContext.java:2573(Compiled Code))
at com/aaa/bbb/workflow/WorkFlowContext.getWFContent(WorkFlowContext.java:2565(Compiled Code))
at com/aaa/bbb/workflow/WorkFlowContext.getWFContent(WorkFlowContext.java:2476(Compiled Code))
at com/swg/services/SWG_CREMSG_ServiceImpl.processData(SWG_CREMSG_ServiceImpl.java:348(Compiled Code))
at com/aaa/bbb/workflow/activity/engine/ActivityEngineHelper.invokeService(ActivityEngineHelper.java:1774(Compiled Code))
at com/aaa/bbb/workflow/activity/engine/ActivityEngineHelper.nextMainLogic(ActivityEngineHelper.java:644(Compiled Code))
at com/aaa/bbb/workflow/activity/engine/ActivityEngineHelper.next(ActivityEngineHelper.java:371(Compiled Code))
at com/aaa/bbb/workflow/queue/WorkFlowQueueListener.doWork(WorkFlowQueueListener.java:328(Compiled Code))
at com/aaa/bbb/workflow/queue/WorkFlowQueueListener.run(WorkFlowQueueListener.java:202(Compiled Code))
at com/aaa/bbb/workflow/queue/WorkFlowQueueListener.onMessage(WorkFlowQueueListener.java:163(Compiled Code))
at com/aaa/bbb/workflow/queue/WorkFlowQueueListener.onMessage(WorkFlowQueueListener.java:149(Compiled Code))
at com/aaa/bbb/workflow/queue/wfTransporter.run(wfTransporter.java:354(Compiled Code))
at com/aaa/bbb/workflow/queue/BasicExecutor$Worker.run(BasicExecutor.java:517(Compiled Code))
at java/lang/Thread.run(Thread.java:801(Compiled Code))

Waiting for Monitor Lock on com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C issue (one example):

HAR.2035844.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
HAR.2035834.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
HAR.2036928.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
WFE.2036925.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
HAR.2036915.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
WFE.2036475.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
HAR.2036473.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
WFE.2036466.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
HAR.2035843.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
HAR.2036471.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
WFE.2036474.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
WFE.2036467.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
WFE.2036431.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
WFE.2035835.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
HAR.2035837.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
WFE.2035831.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
HAR.2035839.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
HAR.2036929.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
WFE.2035854.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
HAR.2035838.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)
WFE.2036408.Thread (com/aaa/bbb/ldr/DynamicClassLoader@700F5470/700F547C)

Could you please help me? Why DTMManager class is not cached for all threads? Have you got a solution regarding XALAN setting or code?

> DTMManager.newInstance issue in a java multithreaded application: excessive ClassLoader, threads lock wait, no cache
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: XALANJ-2533
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2533
>             Project: XalanJ2
>          Issue Type: Bug
>      Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects.  Anybody can view the issue.) 
>          Components: DTM
>         Environment: AIX 5.3, JDK 1.5 (last fix), XALAN 2.7.0
>            Reporter: Christophe DUVAL
>


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org