Return-Path: X-Original-To: apmail-aries-dev-archive@www.apache.org Delivered-To: apmail-aries-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 896E818EDE for ; Wed, 16 Dec 2015 08:25:47 +0000 (UTC) Received: (qmail 5159 invoked by uid 500); 16 Dec 2015 08:25:47 -0000 Delivered-To: apmail-aries-dev-archive@aries.apache.org Received: (qmail 5053 invoked by uid 500); 16 Dec 2015 08:25:47 -0000 Mailing-List: contact dev-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aries.apache.org Delivered-To: mailing list dev@aries.apache.org Received: (qmail 4983 invoked by uid 99); 16 Dec 2015 08:25:47 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2015 08:25:47 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EF7492C1F76 for ; Wed, 16 Dec 2015 08:25:46 +0000 (UTC) Date: Wed, 16 Dec 2015 08:25:46 +0000 (UTC) From: "Bas (JIRA)" To: dev@aries.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (ARIES-1441) Subsystem core tries to shutdown the framework when it has a framework dependency like org.osgi.util.tracker MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ARIES-1441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bas updated ARIES-1441: ----------------------- Attachment: patch-stop-subsystem.patch Previous patch had issues after a restart, this one doesn't have those issues. It uses the location of the bundle to find out if it was added by the subsystems component or something else. If it was not added by the subsystems component then it will not stop the bundle. [patch-stop-subsystem.patch] > 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)