Topic
1 reply Latest Post - ‏2012-05-25T12:44:02Z by SystemAdmin
marzocchi
marzocchi
1 Post
ACCEPTED ANSWER

Pinned topic Multiple threads locks on a single object

‏2012-05-22T16:00:58Z |
Hi,
We have an issue, which we don't have with other JDK implementation (JDK 1.6_30 on Solaris/Windows), with IBM SDK (6.0 Service Refresh 10 Fix Pack 1) on AIX 6.1 running Weblogic 10.3.3
When we run a load test (single transaction works) and do a thread dump we'll see that there are a lot of threads locking on the same object.


"ExecuteThread: '20' for queue: 'automation'" - Thread t@88 java.lang.Thread.State: BLOCKED at java.lang.ClassLoader.loadClass(ClassLoader.java:626) - waiting to lock <40bf40bf> (a org.apache.commons.vfs.impl.VFSClassLoader) owned by 
"ExecuteThread: '21' for queue: 'automation'" t@89 at org.apache.xerces.impl.dv.ObjectFactory.findProviderClass(Unknown Source) at org.apache.xerces.impl.dv.ObjectFactory.newInstance(Unknown Source) at org.apache.xerces.impl.dv.DTDDVFactory.getInstance(Unknown Source) at org.apache.xerces.impl.dv.DTDDVFactory.getInstance(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.<init>(Unknown Source) at org.apache.xerces.parsers.XIncludeAwareParserConfiguration.<init>(Unknown Source) at org.apache.xerces.parsers.XIncludeAwareParserConfiguration.<init>(Unknown Source) at java.lang.J9VMInternals.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1345) at org.apache.xerces.parsers.ObjectFactory.newInstance(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source) at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source) at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source) at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParserImpl(Unknown Source) at org.apache.xerces.jaxp.SAXParserFactoryImpl.setFeature(Unknown Source) at weblogic.xml.jaxp.WebLogicSAXParserFactory.<init>(WebLogicSAXParserFactory.java:65) at weblogic.xml.jaxp.RegistrySAXParserFactory.<init>(RegistrySAXParserFactory.java:72) at java.lang.Class.newInstancePrototype(Class.java:1356) at java.lang.Class.newInstance(Class.java:1345) at javax.xml.parsers.FactoryFinder.newInstance(Unknown Source) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown Source) at javax.xml.parsers.FactoryFinder.find(Unknown Source) at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.getXMLReader(AbstractUnmarshallerImpl.java:80) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:194) at XMLParserUtil.toXMLObject(XMLParserUtil.java:594)

  • if I count a lock on object "40bf40bf" there will be 35 locks out of 40 threads in total. **

and so I check that ExecuteThread 21


"ExecuteThread: '21' for queue: 'automation'" - Thread t@89 java.lang.Thread.State: BLOCKED at java.lang.ClassLoader.loadClass(ClassLoader.java:652) - waiting to lock <4c254c25> (a sun.misc.Launcher$AppClassLoader) owned by 
"ExecuteThread: '39' for queue: 'automation'" t@107 - locked <7c747c74> (a java.net.URLClassLoader) at java.lang.ClassLoader.loadClass(ClassLoader.java:652) - locked <55665566> (a weblogic.utils.classloaders.GenericClassLoader) at java.lang.ClassLoader.loadClass(ClassLoader.java:626) at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177) at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:101) at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:86) at java.lang.ClassLoader.loadClass(ClassLoader.java:652) - locked <af80af8> (a weblogic.utils.classloaders.GenericClassLoader) at java.lang.ClassLoader.loadClass(ClassLoader.java:652) - locked <40bf40bf> (a org.apache.commons.vfs.impl.VFSClassLoader) at java.lang.ClassLoader.loadClass(ClassLoader.java:626) at javax.xml.stream.FactoryFinder.newInstance(Unknown Source) at javax.xml.stream.FactoryFinder.findJarServiceProvider(Unknown Source) at javax.xml.stream.FactoryFinder.find(Unknown Source) at javax.xml.stream.FactoryFinder.find(Unknown Source) at javax.xml.stream.XMLInputFactory.newInstance(Unknown Source) at StaxParserUtil.replaceXmlns(StaxParserUtil.java:584)


This is the code that given those stack traces.

w = XMLOutputFactory.newInstance().createXMLEventWriter(...);
ef = XMLEventFactory.newInstance();
r = XMLInputFactory.newInstance().createXMLEventReader(...);
Do you guys have any idea how could we fix this or Are there any other way to go around this problem?
Should we try WoodStox?
Updated on 2012-05-25T12:44:02Z at 2012-05-25T12:44:02Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    2736 Posts
    ACCEPTED ANSWER

    Re: Multiple threads locks on a single object

    ‏2012-05-25T12:44:02Z  in response to marzocchi
    Did you check "ExecuteThread: '39' for queue: 'automation" on what lock it is waiting on? It might be waiting for "<40bf40bf>". It could be a circular lock condition/deadlock condition. We can get the complete lock/monitor details & its state from the java core dump. Refer IBM SDK Infocenter:

    http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/topic/com.ibm.java.doc.diagnostics.60/diag/tools/javadump_trigger.html?resultof=%22%73%69%67%71%75%69%74%22%20

    http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/topic/com.ibm.java.doc.diagnostics.60/diag/tools/javadump_tags_locks.html

    Thanks

    Param