Deadlock in classloader [message #480864] |
Tue, 18 August 2009 17:25 |
Russ Tennant Messages: 12 Registered: July 2009 |
Junior Member |
|
|
This is a multi-part message in MIME format.
--------------020005070109080006020609
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
I'm running BIRT 2.3.2 and getting frequent deadlocks of which
org.eclipse.birt.core.framework.osgi.OSGILauncher$ChildFirst URLClassLoader
always plays a part. Is this a configuration issue on my end, or
should I submit a bug report for this issue? I'll attach a couple of
thread dumps. The first one is the webapp running under Tomcat and the
second is the webapp running under Jetty. If anyone knows of any
workarounds, please let me know. Thanks.
--
Russ
--------------020005070109080006020609
Content-Type: text/plain;
name="classloader-deadlock.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="classloader-deadlock.txt"
Classloader Deadlock Issue
==========================
Found one Java-level deadlock:
=============================
"TP-Processor10":
waiting to lock monitor 0x00000000554448d8 (object 0x00002aaace530aa8, a [Ljava.util.jar.JarFile;),
which is held by "TP-Processor7"
"TP-Processor7":
waiting to lock monitor 0x00002aab602e2fa0 (object 0x00002aaae5da0388, a org.eclipse.birt.core.framework.osgi.OSGILauncher$ChildFirst URLClassLoader),
which is held by "TP-Processor10"
Java stack information for the threads listed above:
===================================================
"TP-Processor10" daemon prio=10 tid=0x0000000054280800 nid=0x6aaf waiting for monitor entry [0x00000000466ac000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.catalina.loader.WebappClassLoader.findResourceInt ernal(WebappClassLoader.java:2024)
- waiting to lock <0x00002aaace530aa8> (a [Ljava.util.jar.JarFile;)
at org.apache.catalina.loader.WebappClassLoader.findClassIntern al(WebappClassLoader.java:1819)
at org.apache.catalina.loader.WebappClassLoader.findClass(Webap pClassLoader.java:889)
at org.apache.catalina.loader.WebappClassLoader.loadClass(Webap pClassLoader.java:1353)
at org.apache.catalina.loader.WebappClassLoader.loadClass(Webap pClassLoader.java:1232)
at org.eclipse.birt.core.framework.osgi.OSGILauncher$ChildFirst URLClassLoader.loadClass(OSGILauncher.java:680)
- locked <0x00002aaae5da0388> (a org.eclipse.birt.core.framework.osgi.OSGILauncher$ChildFirst URLClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
- locked <0x00002aaae5da0388> (a org.eclipse.birt.core.framework.osgi.OSGILauncher$ChildFirst URLClassLoader)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.eclipse.osgi.framework.util.SecureAction.forName(SecureA ction.java:335)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.getBuiltIn(StreamHandlerFactory.java:80)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.createInternalURLStreamHandler(StreamHandlerFactory.ja va:123)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.createURLStreamHandler(StreamHandlerFactory.java:110)
at java.net.URL.getURLStreamHandler(URL.java:1106)
at java.net.URL.<init>(URL.java:572)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
[snip]
"TP-Processor7" daemon prio=10 tid=0x00000000548d6800 nid=0x6a52 waiting for monitor entry [0x00000000462a8000]
java.lang.Thread.State: BLOCKED (on object monitor)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.eclipse.osgi.framework.util.SecureAction.forName(SecureA ction.java:335)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.getBuiltIn(StreamHandlerFactory.java:80)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.createInternalURLStreamHandler(StreamHandlerFactory.ja va:123)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.createURLStreamHandler(StreamHandlerFactory.java:110)
at java.net.URL.getURLStreamHandler(URL.java:1106)
at java.net.URL.<init>(URL.java:572)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at org.apache.catalina.loader.WebappClassLoader.findResourceInt ernal(WebappClassLoader.java:2040)
- locked <0x00002aaace530aa8> (a [Ljava.util.jar.JarFile;)
at org.apache.catalina.loader.WebappClassLoader.findResource(We bappClassLoader.java:960)
at org.apache.catalina.loader.WebappClassLoader.getResource(Web appClassLoader.java:1095)
[snip]
Another Example
---------------
Found one Java-level deadlock:
=============================
"btpool0-8":
waiting to lock monitor 0x820f45ac (object 0x93ef7710, a sun.misc.Launcher$AppClassLoader),
which is held by "StaticKeyDataConfig"
"StaticKeyDataConfig":
waiting to lock monitor 0x820f2ea0 (object 0xaa61b960, a org.eclipse.birt.core.framework.osgi.OSGILauncher$ChildFirst URLClassLoader),
which is held by "btpool0-8"
Java stack information for the threads listed above:
===================================================
"btpool0-8":
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:293 )
- waiting to lock <0x93ef7710> (a sun.misc.Launcher$AppClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.eclipse.birt.core.framework.osgi.OSGILauncher$ChildFirst URLClassLoader.loadClass(OSGILauncher.java:680)
- locked <0xaa61b960> (a org.eclipse.birt.core.framework.osgi.OSGILauncher$ChildFirst URLClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
- locked <0xaa61b960> (a org.eclipse.birt.core.framework.osgi.OSGILauncher$ChildFirst URLClassLoader)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.g etInstalledBundles(StartLevelManager.java:524)
- locked <0xabd43e20> (a org.eclipse.osgi.framework.internal.core.BundleRepository)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:276)
- locked <0xab9d7720> (a java.lang.Object)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.l aunch(StartLevelManager.java:247)
at org.eclipse.osgi.framework.internal.core.SystemBundle.resume (SystemBundle.java:201)
at org.eclipse.osgi.framework.internal.core.Framework.launch(Fr amework.java:644)
- locked <0xab6a04e8> (a org.eclipse.osgi.framework.internal.core.Framework)
at org.eclipse.osgi.framework.internal.core.OSGi.launch(OSGi.ja va:51)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(Ecli pseStarter.java:313)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.birt.core.framework.osgi.OSGILauncher.doStartup( OSGILauncher.java:191)
at org.eclipse.birt.core.framework.osgi.OSGILauncher.access$0(O SGILauncher.java:94)
at org.eclipse.birt.core.framework.osgi.OSGILauncher$1.run(OSGI Launcher.java:79)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.core.framework.osgi.OSGILauncher.startup(OS GILauncher.java:75)
at org.eclipse.birt.core.framework.Platform.startup(Platform.ja va:79)
- locked <0x873e0468> (a java.lang.Class for org.eclipse.birt.core.framework.Platform)
at com.i2rd.report.birt.BirtEngineHelper.<init>(BirtEngineHelper.java:117)
at com.i2rd.report.birt.BirtEngineHelper.<init>(BirtEngineHelper.java:80)
at com.i2rd.report.birt.BirtEngineHelper$Holder.<clinit>(BirtEngineHelper.java:65)
at com.i2rd.report.birt.BirtEngineHelper.getInstance(BirtEngine Helper.java:201)
at com.i2rd.report.birt.BirtReportGenerator.<init>(BirtReportGenerator.java:189)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:5 13)
at com.i2rd.report.ReportGenerator$ConfigHolder.getGenerator(Re portGenerator.java:109)
[snip]
"StaticKeyDataConfig":
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
- locked <0x93ef7710> (a sun.misc.Launcher$AppClassLoader)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
- locked <0x93ef7710> (a sun.misc.Launcher$AppClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.eclipse.osgi.framework.util.SecureAction.loadSystemClass (SecureAction.java:359)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.getBuiltIn(StreamHandlerFactory.java:82)
at org.eclipse.osgi.framework.internal.protocol.StreamHandlerFa ctory.createURLStreamHandler(StreamHandlerFactory.java:102)
at java.net.URL.getURLStreamHandler(URL.java:1106)
at java.net.URL.<init>(URL.java:572)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at java.net.JarURLConnection.parseSpecs(JarURLConnection.java:1 61)
at java.net.JarURLConnection.<init>(JarURLConnection.java:144)
at sun.net.www.protocol.jar.JarURLConnection.<init>(JarURLConnection.java:63)
at sun.net.www.protocol.jar.Handler.openConnection(Handler.java :24)
at java.net.URL.openConnection(URL.java:945)
at java.net.URL.openStream(URL.java:1009)
at javax.xml.validation.SecuritySupport$4.run(SecuritySupport.j ava:93)
at java.security.AccessController.doPrivileged(Native Method)
at javax.xml.validation.SecuritySupport.getURLInputStream(Secur itySupport.java:90)
at javax.xml.validation.SchemaFactoryFinder._newFactory(SchemaF actoryFinder.java:246)
at javax.xml.validation.SchemaFactoryFinder.newFactory(SchemaFa ctoryFinder.java:145)
at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory .java:205)
at com.i2rd.java.miwt.locale.xml.LocalizationParser.parse(Local izationParser.java:383)
at com.i2rd.java.miwt.locale.xml.LocalizationParser.parse(Local izationParser.java:367)
at com.i2rd.java.miwt.locale.JdbcLocaleSource$3.run(JdbcLocaleS ource.java:1227)
--------------020005070109080006020609--
|
|
|
|
Re: Deadlock in classloader [message #481108 is a reply to message #480870] |
Wed, 19 August 2009 16:07 |
|
Russ,
Can you open a bugzilla entry to track this issue. I have not seen
this. The APPCONTEXT_CLASSLOADER_KEY sets the parent classloader for
the report engine, which enables it to find additional classes outside
of the report engine plugin.
Jason
Russ Tennant wrote:
> Russ Tennant wrote:
>> I'm running BIRT 2.3.2 and getting frequent deadlocks of which
>> org.eclipse.birt.core.framework.osgi.OSGILauncher$ChildFirst URLClassLoader
>> always plays a part. Is this a configuration issue on my end, or
>> should I submit a bug report for this issue? I'll attach a couple of
>> thread dumps. The first one is the webapp running under Tomcat and the
>> second is the webapp running under Jetty. If anyone knows of any
>> workarounds, please let me know. Thanks.
>>
>> --
>> Russ
>>
>>
>
> If I add the following to the ApplicationContext, the easily
> reproducible deadlocks do not occur.
>
> context.put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
> Object.class.getClassLoader()); // Object or some other JRE class.
>
>
> Is this the correct configuration for webapp integration? What are the
> implications of this change? Thanks.
>
>
> --
> Russ
|
|
|
|
Powered by
FUDForum. Page generated in 0.05311 seconds