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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.9, 4.1.1
    • 4.1.2, 4.0.10
    • karaf
    • 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

            ggrzybek Grzegorz Grzybek
            ggrzybek Grzegorz Grzybek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: