felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre De Rop (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4385) NPE in Configuration Admin Service when deleting configuration
Date Fri, 31 Jan 2014 15:14:09 GMT

    [ https://issues.apache.org/jira/browse/FELIX-4385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13887825#comment-13887825

Pierre De Rop commented on FELIX-4385:

Thanks for reviewing Jan-Willem; 

Regarding the parallelism, I think it is ok because the intent is to use at least 10 parallel
threads if the available processors is lower than 10, or all available processors if the number
of processors is greater than 10:

         int parallelism = Math.max(10, Runtime.getRuntime().availableProcessors());

So, on my cluster, this allows to execute the test with 32 threads (I have 32 cpus), and on
my laptop I'm using 10 threads even if I'm only having 4 cpus.


> 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-integrationtest.tgz, 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.<init>(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

View raw message