You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "John Ross (JIRA)" <ji...@apache.org> on 2016/02/23 13:47:18 UTC

[jira] [Commented] (ARIES-1441) Subsystem core tries to shutdown the framework when it has a framework dependency like org.osgi.util.tracker

    [ https://issues.apache.org/jira/browse/ARIES-1441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15158811#comment-15158811 ] 

John Ross commented on ARIES-1441:
----------------------------------

This issue can be reproduced simply by the following.

(1) Install an application, composite, or feature containing a single bundle with a single package import as a child of the root subsystem.
(2) Start the subsystem.
(3) Stop the subsystems implementation bundle.

The value of the package import does not appear to matter as long as it's provided by a root subsystem bundle that should not be managed (e.g., a bundle that pre-existed the initialization of the root subsystem).

> Subsystem core tries to shutdown the framework when it has a framework dependency like org.osgi.util.tracker
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: ARIES-1441
>                 URL: https://issues.apache.org/jira/browse/ARIES-1441
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>    Affects Versions: subsystem-2.0.6, subsystem-2.0.8
>         Environment: karaf 
> pax exam
>            Reporter: Bas
>              Labels: patch, test
>         Attachments: AriesStopSubsystem.java.test.patch, patch-stop-subsystem.patch
>
>
> When performing a shutdown of the subsystem core bundle it tries to stop the framework because there is a org.osgi.util.tracker import package.
> Also in the same situation described above when trying to shutdown the framework by calling stop on bundle 0 it can fail with:
> [org.apache.aries.subsystem.core.internal.StopAction] : An error occurred while stopping resource osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.0.v20140606-1445"; singleton:="true" of subsystem org.apache.aries.subsystem.core.internal.BasicSubsystem@25760667
> org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.0.v20140606-1445"; singleton:="true" [id=0] STOPPED [STOPPED] invalid
> 	at org.eclipse.osgi.container.Module.lockStateChange(Module.java:329)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.asyncStop(EquinoxBundle.java:151)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.stop(EquinoxBundle.java:272)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.stop(EquinoxBundle.java:277)
> 	at org.apache.aries.subsystem.core.internal.StopAction.stopBundleResource(StopAction.java:97)
> 	at org.apache.aries.subsystem.core.internal.StopAction.stopResource(StopAction.java:109)
> 	at org.apache.aries.subsystem.core.internal.StopAction.run(StopAction.java:67)
> 	at org.apache.aries.subsystem.core.internal.StopAction.stopSubsystemResource(StopAction.java:135)
> 	at org.apache.aries.subsystem.core.internal.StopAction.stopResource(StopAction.java:107)
> 	at org.apache.aries.subsystem.core.internal.StopAction.run(StopAction.java:67)
> 	at org.apache.aries.subsystem.core.internal.Activator.deactivate(Activator.java:162)
> 	at org.apache.aries.subsystem.core.internal.Activator.removedService(Activator.java:291)
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:967)
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:870)
> 	at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341)
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:909)
> 	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)
> 	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
> 	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
> 	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
> 	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
> 	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:222)
> 	at org.eclipse.equinox.internal.region.RegionManager.stop(RegionManager.java:67)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:827)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:820)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:950)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:324)
> 	at org.eclipse.osgi.container.Module.doStop(Module.java:626)
> 	at org.eclipse.osgi.container.Module.stop(Module.java:488)
> 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1623)
> 	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1542)
> 	at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:248)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:145)
> 	at org.eclipse.osgi.container.Module.doStop(Module.java:626)
> 	at org.eclipse.osgi.container.Module.stop(Module.java:488)
> 	at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:186)
> 	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:160)
> 	at java.lang.Thread.run(Thread.java:662)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)