Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
framework-4.2.0
-
None
-
None
Description
This may be a sub or related case of a few others which I've linked below.
In the latest trunk we are now seeing a startup scenario where our HTTP bundle acquires a lock in the process of registering a service, but the later wait for this lock (Felix.java:4862) never seems to get notified.
It doesn't seem a traditional deadlock per se - no other thread is holding this lock. It just seems that the lock never gets notified, hence the HTTP bundle never completes it's startup and service registration, causing all our other bundles that depend on the HTTP service never to start up.
Stack trace of locked thread below:
====
"Jetty HTTP Service" daemon prio=6 tid=0x0586ac00 nid=0x19dc in Object.wait() [0x05a8f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x1f84df50> (a [Ljava.lang.Object
at java.lang.Object.wait(Object.java:485)
at org.apache.felix.framework.Felix.acquireBundleLock(Felix.java:4862) - locked <0x1f84df50> (a [Ljava.lang.Object
at org.apache.felix.framework.Felix.registerService(Felix.java:3205)
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346)
at org.apache.felix.servicebinder.InstanceManager.requestRegistration(InstanceManager.java:508)
at org.apache.felix.servicebinder.InstanceManager.validate(InstanceManager.java:294) - locked <0x1fa2ef78> (a org.apache.felix.servicebinder.InstanceManager)
at org.apache.felix.servicebinder.InstanceManager$DependencyManager.serviceChanged(InstanceManager.java:948) - locked <0x1fa2ef78> (a org.apache.felix.servicebinder.InstanceManager)
at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932)
at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793)
at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543)
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4252)
at org.apache.felix.framework.Felix.registerService(Felix.java:3275)
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346)
at org.apache.felix.http.base.internal.HttpServiceController.register(HttpServiceController.java:135)
at org.apache.felix.http.base.internal.DispatcherServlet.init(DispatcherServlet.java:48)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) - locked <0x1fa2f0b0> (a java.lang.Object)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:736)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) - locked <0x1fa2f1c0> (a java.lang.Object)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) - locked <0x1fa03e50> (a java.lang.Object)
at org.apache.felix.http.jetty.internal.JettyService.initializeJetty(JettyService.java:181)
at org.apache.felix.http.jetty.internal.JettyService.startJetty(JettyService.java:116)
at org.apache.felix.http.jetty.internal.JettyService.run(JettyService.java:307)
at java.lang.Thread.run(Thread.java:619)
====
Attachments
Issue Links
- is related to
-
FELIX-2400 High contention (or deadlock) in PackageAdmin and StartLevel
- Open
-
FELIX-3067 Prevent Deadlock Situation in Felix.acquireGlobalLock
- Open
-
FELIX-3000 Move sending service registered event out of bundle lock
- Closed