Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-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 54F1C10C89 for ; Wed, 15 Jan 2014 12:51:27 +0000 (UTC) Received: (qmail 63481 invoked by uid 500); 15 Jan 2014 12:51:25 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 63286 invoked by uid 500); 15 Jan 2014 12:51:22 -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 63172 invoked by uid 99); 15 Jan 2014 12:51:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jan 2014 12:51:20 +0000 Date: Wed, 15 Jan 2014 12:51:20 +0000 (UTC) From: "Pierre De Rop (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FELIX-4385) NPE in Configuration Admin Service when deleting configuration 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/FELIX-4385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pierre De Rop updated FELIX-4385: --------------------------------- Attachment: FELIX-4385.patch Attached the proposed patch. > NPE in Configuration Admin Service when deleting configuration > -------------------------------------------------------------- > > Key: FELIX-4385 > URL: https://issues.apache.org/jira/browse/FELIX-4385 > Project: Felix > Issue Type: Bug > Components: Configuration Admin > Affects Versions: configadmin-1.8.2 > Reporter: Pierre De Rop > Attachments: FELIX-4385.patch > > > While writing a test for Apache Felix DependencyManager, I came across the following exception from ConfigAdmin 1.8.0 (under high load): > {code} > ERROR - CM Configuration Updater (Delete: pid=Aspect2.pid23) : Unexpected problem providing configuration Aspect2.pid23 to service [org.osgi.service.cm.ManagedService, id=117, bundle=26/local] - java.lang.NullPointerException > at java.lang.StringBuffer.(StringBuffer.java:120) > at org.apache.felix.cm.impl.ConfigurationManager.getTargetedConfiguration(ConfigurationManager.java:523) > at org.apache.felix.cm.impl.ConfigurationManager$ConfigurationProvider.provideReplacement(ConfigurationManager.java:1666) > at org.apache.felix.cm.impl.ConfigurationManager$DeleteConfiguration.run(ConfigurationManager.java:1816) > at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103) > at java.lang.Thread.run(Thread.java:722) > {code} > I suspect that this NPE occurs in the following scenario: > 1- one ManagedService listening to a given configuration pid is being unregistered (from one thread) > 2- concurrently, another thread is deleting the Configuration for the same PID the ManagedService was registered for. > I never wrote some test cases for configuration admin sub-project but I will try to write one in order to reproduce the issue. > For now, I'm using the attached patch, which seems to fix the problem. -- This message was sent by Atlassian JIRA (v6.1.5#6160)