Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-5089

GuardingEventHook may stop filtering listeners if one of the bundles is not valid

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.9, 4.1.1
    • Fix Version/s: 4.1.2, 4.0.10
    • Component/s: karaf
    • Labels:
      None

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              gzres Grzegorz Grzybek
              Reporter:
              gzres Grzegorz Grzybek
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: