felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From metatech <metatec...@gmail.com>
Subject Re: Deadlock in ModuleClassLoader
Date Thu, 12 Jan 2012 10:57:26 GMT


Richard S. Hall wrote:
> 
> http://underlap.blogspot.com/2006/11/experimental-fix-for-sunbug-4670071.html
> 

For the record, here is another occurence of the problem on ServiceMix 4.3.

[ 129] [Active     ] [            ] [       ] [   60] OPS4J Pax Web -
Runtime (0.7.4)
[ 133] [Starting   ] [            ] [       ] [   60] OPS4J Pax Web -
Extender - Whiteboard (0.7.4)

Both bundles are trying to load class "org.osgi.service.http.HttpService".

Found one Java-level deadlock:
=============================
"Thread-12":
  waiting to lock monitor 0x080eea70 (object 0x95506608, a
org.apache.felix.framework.ModuleImpl$ModuleClassLoaderJava5),
  which is held by "FelixStartLevel"
"FelixStartLevel":
  waiting to lock monitor 0x081b9768 (object 0x9552b2d8, a
org.apache.felix.framework.ModuleImpl$ModuleClassLoaderJava5),
  which is held by "Thread-12"

Java stack information for the threads listed above:
===================================================
"Thread-12":
	at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1830)
	- waiting to lock <0x95506608> (a
org.apache.felix.framework.ModuleImpl$ModuleClassLoaderJava5)
	at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:727)
	at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
	at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at
org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:645)
	at org.apache.felix.framework.resolver.WireImpl.getClass(WireImpl.java:99)
	at
org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1390)
	at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:722)
	at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
	at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at
org.ops4j.pax.web.service.internal.Activator.createHttpServiceFactory(Activator.java:98)
	at
org.ops4j.pax.web.service.internal.Activator.access$200(Activator.java:47)
	at org.ops4j.pax.web.service.internal.Activator$1.run(Activator.java:76)
	at java.lang.Thread.run(Thread.java:662)
"FelixStartLevel":
	at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1759)
	- waiting to lock <0x9552b2d8> (a
org.apache.felix.framework.ModuleImpl$ModuleClassLoaderJava5)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at
org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:645)
	at org.apache.felix.framework.resolver.WireImpl.getClass(WireImpl.java:99)
	at
org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1390)
	at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:722)
	at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
	at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
	at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1907)
	- locked <0x95506608> (a
org.apache.felix.framework.ModuleImpl$ModuleClassLoaderJava5)
	at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:727)
	at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
	at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at
org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:645)
	at org.apache.felix.framework.resolver.WireImpl.getClass(WireImpl.java:99)
	at
org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1390)
	at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:722)
	at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
	at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at
org.ops4j.pax.web.extender.whiteboard.internal.util.WebContainerUtils.webContainerAvailable(WebContainerUtils.java:46)
	at
org.ops4j.pax.web.extender.whiteboard.internal.util.WebContainerUtils.<clinit>(WebContainerUtils.java:35)
	at
org.ops4j.pax.web.extender.whiteboard.internal.Activator.start(Activator.java:78)
	at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1842)
	at org.apache.felix.framework.Felix.startBundle(Felix.java:1759)
	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1163)
	at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
	at java.lang.Thread.run(Thread.java:662)

Found 1 deadlock.

The problem sometimes happens on very slow machines and with full DEBUG log
enabled, so I cannot really test that the JVM flags
"XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass" work reliably as a
workaround.

metatech


-- 
View this message in context: http://old.nabble.com/Deadlock-in-ModuleClassLoader-tp31266713p33127027.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message