You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Grzegorz Grzybek (JIRA)" <ji...@apache.org> on 2017/04/11 07:28:41 UTC

[jira] [Created] (KARAF-5089) GuardingEventHook may stop filtering listeners if one of the bundles is not valid

Grzegorz Grzybek created KARAF-5089:
---------------------------------------

             Summary: GuardingEventHook may stop filtering listeners if one of the bundles is not valid
                 Key: KARAF-5089
                 URL: https://issues.apache.org/jira/browse/KARAF-5089
             Project: Karaf
          Issue Type: Bug
          Components: karaf-security
    Affects Versions: 4.1.1, 4.0.9
            Reporter: Grzegorz Grzybek
            Assignee: Grzegorz Grzybek
             Fix For: 4.1.2, 4.0.10


I found a leak, where SCR component publishes service related to osgi.command and registration event is:
* both handled in {{org.apache.karaf.service.guard.impl.GuardProxyCatalog#handleProxificationForHook()}}
* passed to {{org.apache.karaf.shell.security.impl.SecuredCommandProcessorImpl#commandTracker}}

The reason for this is that one of the bundles iterated over in {{org.apache.karaf.service.guard.impl.GuardingEventHook#event}} may throw IllegalStateException when invoking bundleContext.getBundle().getBundleId().

When the service for command is then unregistered, the unregistration event may be this time filtered out and we have duplicate command in {{org.apache.felix.gogo.runtime.CommandProcessorImpl#commands}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)