Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 592C0200B7E for ; Tue, 2 Aug 2016 07:12:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 57EF5160A6C; Tue, 2 Aug 2016 05:12:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9FE65160AA7 for ; Tue, 2 Aug 2016 07:12:21 +0200 (CEST) Received: (qmail 20303 invoked by uid 500); 2 Aug 2016 05:12:20 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 20260 invoked by uid 99); 2 Aug 2016 05:12:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2016 05:12:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 90AAA2C0059 for ; Tue, 2 Aug 2016 05:12:20 +0000 (UTC) Date: Tue, 2 Aug 2016 05:12:20 +0000 (UTC) From: "David Jencks (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FELIX-5315) Unexpected release of ConfigurationAdmin service in RegionConfigurationSupport MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 02 Aug 2016 05:12:22 -0000 [ https://issues.apache.org/jira/browse/FELIX-5315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15403363#comment-15403363 ] David Jencks commented on FELIX-5315: ------------------------------------- I committed a fix in r1754817. I'd like to verify with some experts that the fix is OK since it involves calling bundleContext.getService(serviceRef) with a serviceReference obtained from a different bundleContext. This seems to work and I don't see anything in the spec saying it shouldn't but it certainly isn't a common usage. This is a pretty egregious and serious problem, I wonder after it really is fixed if we should immediately release 2.0.6? > Unexpected release of ConfigurationAdmin service in RegionConfigurationSupport > ------------------------------------------------------------------------------- > > Key: FELIX-5315 > URL: https://issues.apache.org/jira/browse/FELIX-5315 > Project: Felix > Issue Type: Bug > Components: Configuration Admin, Declarative Services (SCR) > Affects Versions: scr-2.0.4 > Reporter: James Watkins-Harvey > Assignee: David Jencks > Fix For: scr-2.0.6 > > > In commit 978a710, RegionConfigurationSupport has been modified to obtain the ConfigurationAdmin service through the ConfigurationAdmin's bundle context (in getConfigAdmin(), around line 633). However, services acquired through that method are then released using the impersonated bundle's context (for example in the finally block of configureComponentHolder(ComponentHolder), around line 186, and the finally block of getConfigurationInfo(TargetedPID, TargetedPID, ComponentHolder, BundleContext), around line 465). > This cause leak of service on the ConfigurationAdmin's bundle context, as well as unexpected early release of services on impersonated bundle contexts, causing an IllegalStateException("Configuration Admin service has been unregistered") being thrown in ConfigurationAdminImpl#getConfigurationManager(). -- This message was sent by Atlassian JIRA (v6.3.4#6332)