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

Race condition between FeatureService and Fileinstall

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.3, 4.2.0.M1
    • Component/s: karaf
    • Labels:
      None

      Description

      If a bundle is installed when the FeatureService is started, then it is possible that this bundle is not associated to the default region. as a consequence, every services exported by this bundle are not visible from the osgi container, until karaf is restarted.

      A real usecase :

      • A new karaf distribution, with a blueprint file in a folder managed by fileinstall ;
      • When the distribution is started, as fileinstall is started before the feature bundle, and the folder are watched asynchronously, the blueprint file is installed before or in the same time the featureservice is started
        => the services exported by the blueprint file are not visible

      This race condition is located in the FeatureService activator : the digraph is loaded, and every bundle not known are added to the default region. then, it subscribes a bundle-listener : If a bundle X is installed between the digraph loading and the subscription of the bundle listener, then this bundle X is not attached to the default region.

      On my machine, this issue happens 70% of the time on a cold start.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gnt Guillaume Nodet
                Reporter:
                j3rem1e J. Brébec
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: