Felix/Startlevel/Shell deadlock when shutiing down during startup
-----------------------------------------------------------------
Key: AMDATU-280
URL: http://jira.amdatu.org/jira/browse/AMDATU-280
Project: Amdatu
Issue Type: Bug
Components: Amdatu Core
Affects Versions: 0.1.0
Reporter: Bram de Kruijff
As shown below there is a deadlock between Felix, Startlevel and Shell service
1.4.2 when shutdown is invoked while traversing upwards through the
startlevels. It is easy to reproduce locally by typing stop asap after starting
amdatu. I traced it to https://issues.apache.org/jira/browse/FELIX-2378 bu
there is no release yet. Using the 1.5.0-SNAPSHOT sheel service from the felix
trunk however seems to resolve the issue. Note that this might be related to
haging builds when pax exam shuts down a container to fast (?)
Name: main
State: WAITING on java.lang.Integer at 1af78ce
Total blocked: 3 Total waited: 1
Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.felix.framework.StartLevelImpl.setStartLevelAndWait(StartLevelImpl.java:129)
org.apache.felix.framework.Felix.start(Felix.java:762)
org.apache.felix.main.Main.main(Main.java:297)
Name: Felix Shell TUI
State: WAITING on [Ljava.lang.Object;@11a59ce
Total blocked: 1 Total waited: 2
Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
org.apache.felix.framework.Felix.acquireBundleLock(Felix.java:4462)
org.apache.felix.framework.Felix.stopBundle(Felix.java:2047)
org.apache.felix.framework.Felix.stop(Felix.java:806)
org.apache.felix.framework.Felix.stop(Felix.java:813)
org.apache.felix.shell.impl.StopCommandImpl.execute(StopCommandImpl.java:93)
org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:286)
- locked org.apache.felix.shell.impl.Activator$ShellServiceImpl at
13abee1
org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:184)
- locked org.apache.felix.shell.tui.Activator at 1f336eb
java.lang.Thread.run(Thread.java:619)
Name: FelixStartLevel
State: BLOCKED on
org.apache.felix.shell.impl.Activator$ShellServiceImpl at 13abee1 owned by:
Felix Shell TUI
Total blocked: 46 Total waited: 19
Stack trace:
org.apache.felix.shell.impl.Activator$ShellServiceImpl.addCommand(Activator.java:309)
org.apache.felix.shell.impl.Activator$1.serviceChanged(Activator.java:52)
org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:864)
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:732)
org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662)
org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3623)
org.apache.felix.framework.Felix.access$000(Felix.java:39)
org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:667)
org.apache.felix.framework.ServiceRegistry.registerService(ServiceRegistry.java:97)
org.apache.felix.framework.Felix.registerService(Felix.java:2764)
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:252)
org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:230)
org.apache.felix.scr.impl.Activator.start(Activator.java:129)
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:661)
org.apache.felix.framework.Felix.activateBundle(Felix.java:1760)
org.apache.felix.framework.Felix.startBundle(Felix.java:1682)
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1128)
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira