felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (FELIX-2602) Possible deadlock starting bundles
Date Sun, 19 Sep 2010 22:07:34 GMT

     [ https://issues.apache.org/jira/browse/FELIX-2602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Richard S. Hall resolved FELIX-2602.
------------------------------------

      Assignee: Richard S. Hall
    Resolution: Invalid

I agree with Karl, this doesn't look like a Felix framework issue.

What is looks like is the org.glassfish.osgiweb.WebExtender is getting two events on different
threads and gets tripped up. It appears to be getting a STARTING event, which is only sent
to synchronous bundle listeners, so the framework must hold the bundle lock while sending
it. It also receives a service event, which is also a synchronous event. Both of these threads
then get into a locking cycle for the same object lock and bundle lock.

You can reopen this bug if you still think it is a framework issue.

> Possible deadlock starting bundles
> ----------------------------------
>
>                 Key: FELIX-2602
>                 URL: https://issues.apache.org/jira/browse/FELIX-2602
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: framework-3.0.2, fileinstall-3.0.2, eventadmin-1.2.4
>         Environment: Mac OSX 10.6.4, Glassfish 3.0.1 (Felix updated to 3.0.2)
>            Reporter: Ángel Eduardo
>            Assignee: Richard S. Hall
>
> Sometimes some bundles get stuck in "Starting". I'm using Glassfish in Felix, and this
are the thread dumps of the possible suspects:
> "fileinstall-/Applications/NetBeans/glassfishv3/glassfish/modules/autostart/" daemon
prio=5 tid=13b568000 nid=0x13c50d000 in Object.wait() [13c50b000]
>    java.lang.Thread.State: WAITING (on object monitor)
> 	at java.lang.Object.wait(Native Method)
> 	- waiting on <1114bb680> (a [Ljava.lang.Object;)
> 	at java.lang.Object.wait(Object.java:485)
> 	at org.apache.felix.framework.Felix.acquireBundleLock(Felix.java:4681)
> 	- locked <1114bb680> (a [Ljava.lang.Object;)
> 	at org.apache.felix.framework.Felix.registerService(Felix.java:2813)
> 	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
> 	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229)
> 	at org.glassfish.osgiweb.OSGiWebContainer.registerService(OSGiWebContainer.java:266)
> 	at org.glassfish.osgiweb.OSGiWebContainer.deploy(OSGiWebContainer.java:117)
> 	- locked <11373b508> (a org.glassfish.osgiweb.OSGiWebContainer)
> 	at org.glassfish.osgiweb.WebExtender.deploy(WebExtender.java:166)
> 	at org.glassfish.osgiweb.WebExtender.start(WebExtender.java:95)
> 	at org.glassfish.osgiweb.ExtenderManager$ExtenderTracker.addingService(ExtenderManager.java:159)
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)
> 	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)
> 	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:233)
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:840)
> 	at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:864)
> 	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:732)
> 	at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
> 	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3726)
> 	at org.apache.felix.framework.Felix.access$000(Felix.java:80)
> 	at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:717)
> 	at org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:107)
> 	at org.apache.felix.framework.Felix.registerService(Felix.java:2847)
> 	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
> 	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:229)
> 	at org.glassfish.osgiweb.OSGiWebContainerActivator.start(OSGiWebContainerActivator.java:57)
> 	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:633)
> 	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1817)
> 	at org.apache.felix.framework.Felix.startBundle(Felix.java:1734)
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
> 	at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136)
> 	at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122)
> 	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115)
> 	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433)
> 	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241)
>    Locked ownable synchronizers:
> 	- None
> "fileinstall-/Applications/NetBeans/glassfishv3/glassfish/domains/domain1/autodeploy/bundles/"
daemon prio=5 tid=13876f800 nid=0x13c40a000 waiting for monitor entry [13c409000]
>    java.lang.Thread.State: BLOCKED (on object monitor)
> 	at org.glassfish.osgiweb.OSGiWebContainer.deploy(OSGiWebContainer.java:101)
> 	- waiting to lock <11373b508> (a org.glassfish.osgiweb.OSGiWebContainer)
> 	at org.glassfish.osgiweb.WebExtender.deploy(WebExtender.java:166)
> 	at org.glassfish.osgiweb.WebExtender.bundleChanged(WebExtender.java:118)
> 	at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:800)
> 	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:728)
> 	at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)
> 	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3715)
> 	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1807)
> 	at org.apache.felix.framework.Felix.startBundle(Felix.java:1734)
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
> 	at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136)
> 	at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122)
> 	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115)
> 	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433)
> 	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241)
>    Locked ownable synchronizers:
> 	- None
> "FelixPackageAdmin" daemon prio=5 tid=103577800 nid=0x137663000 in Object.wait() [137662000]
>    java.lang.Thread.State: WAITING (on object monitor)
> 	at java.lang.Object.wait(Native Method)
> 	- waiting on <112750c70> (a org.apache.felix.framework.PackageAdminImpl)
> 	at java.lang.Object.wait(Object.java:485)
> 	at org.apache.felix.framework.PackageAdminImpl.run(PackageAdminImpl.java:321)
> 	- locked <112750c70> (a org.apache.felix.framework.PackageAdminImpl)
> 	at java.lang.Thread.run(Thread.java:637)
>    Locked ownable synchronizers:
> 	- None
> "FelixStartLevel" daemon prio=5 tid=1382b3000 nid=0x137437000 in Object.wait() [137436000]
>    java.lang.Thread.State: WAITING (on object monitor)
> 	at java.lang.Object.wait(Native Method)
> 	- waiting on <1114bb680> (a [Ljava.lang.Object;)
> 	at java.lang.Object.wait(Object.java:485)
> 	at org.apache.felix.framework.Felix.acquireBundleLock(Felix.java:4681)
> 	- locked <1114bb680> (a [Ljava.lang.Object;)
> 	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1100)
> 	at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
> 	at java.lang.Thread.run(Thread.java:637)
>    Locked ownable synchronizers:
> 	- None
> "FelixDispatchQueue" prio=5 tid=1019aa800 nid=0x136c8c000 in Object.wait() [136c8b000]
>    java.lang.Thread.State: WAITING (on object monitor)
> 	at java.lang.Object.wait(Native Method)
> 	- waiting on <1114db440> (a java.util.ArrayList)
> 	at java.lang.Object.wait(Object.java:485)
> 	at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:917)
> 	- locked <1114db440> (a java.util.ArrayList)
> 	at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
> 	at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
> 	at java.lang.Thread.run(Thread.java:637)
>    Locked ownable synchronizers:
> 	- None
> "OSGi Framework Launcher" prio=5 tid=103109000 nid=0x136b05000 in Object.wait() [136b03000]
>    java.lang.Thread.State: WAITING (on object monitor)
> 	at java.lang.Object.wait(Native Method)
> 	- waiting on <112754aa0> (a java.lang.Integer)
> 	at java.lang.Object.wait(Object.java:485)
> 	at org.apache.felix.framework.StartLevelImpl.setStartLevelAndWait(StartLevelImpl.java:129)
> 	- locked <112754aa0> (a java.lang.Integer)
> 	at org.apache.felix.framework.Felix.start(Felix.java:812)
> 	at org.apache.felix.main.Main.main(Main.java:293)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.sun.enterprise.glassfish.bootstrap.ASMainFelix$1.run(ASMainFelix.java:116)
> 	at java.lang.Thread.run(Thread.java:637)
>    Locked ownable synchronizers:
> 	- None
> Hope this helps!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message