Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-3743

Potential endless loop setting the active framework startlevel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • framework-4.0.2
    • framework-4.2.0
    • Framework
    • None

    Description

      We experience an issue with setting the framework startlevel in the Felix.setActiveStartLevel(int, FrameworkListener[]) method.

      On line 1216 the bundle lock is acquired. If this fails with an IllegalStateException the loop just continues. But the bundle remains in the m_startLevelBundles set and is retried later. In the case of an uninstalled bundle, this situation will not change and the method is probabl going into an endless loop.

      Would it make sense to remove the bundle from the m_startLevelBundles set in the catch block starting line 1223 if the bundle has been uninstalled ?

      Proposed patch:

      Index: Felix.java
      ===================================================================
      — Felix.java (revision 1404016)
      +++ Felix.java (working copy)
      @@ -1227,6 +1227,14 @@
      Logger.LOG_ERROR,
      "Error locking " + tuple.m_bundle._getLocation(), ex);
      }
      + else
      + {
      + synchronized (m_startLevelBundles)
      +

      { + m_startLevelBundles.remove(tuple); + bundlesRemaining = !m_startLevelBundles.isEmpty(); + }

      + }
      continue;
      }

      Attachments

        Issue Links

          Activity

            People

              fmeschbe Felix Meschberger
              fmeschbe Felix Meschberger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: