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

ConcurrentModificationException when stopping

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • gogo.runtime-0.16.2
    • Gogo Runtime
    • None

    Description

      The exception below happens in the karaf itests but originates in felix.
      The problem is in org.apache.felix.gogo.runtime.CommandProcessorImpl.stop .
      It iterates over the sessions in a foreach loop and removes the session during the iteration.

      I propose to do the remove at the end in one clear call.
      This should go into gogo runtime 0.14.1. Unfortunately there is no version for it in jira.

      14:31:55,602 | ERROR | Felix | Error stopping bundle.
      java.util.ConcurrentModificationException
      at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:882)[:1.7.0_60]
      at java.util.WeakHashMap$KeyIterator.next(WeakHashMap.java:915)[:1.7.0_60]
      at org.apache.felix.gogo.runtime.CommandProcessorImpl.stop(CommandProcessorImpl.java:87)[42:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
      at org.apache.karaf.shell.impl.console.SessionFactoryImpl.stop(SessionFactoryImpl.java:139)[42:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
      at org.apache.karaf.shell.impl.console.osgi.secured.SecuredSessionFactoryImpl.stop(SecuredSessionFactoryImpl.java:76)[42:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
      at org.apache.karaf.shell.impl.console.osgi.Activator.stop(Activator.java:88)[42:org.apache.karaf.shell.core:4.0.0.SNAPSHOT]
      at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:667)[org.apache.felix.framework-4.4.1.jar:]
      at org.apache.felix.framework.Felix.stopBundle(Felix.java:2538)[org.apache.felix.framework-4.4.1.jar:]
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1317)[org.apache.felix.framework-4.4.1.jar:]
      at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.4.1.jar:]
      at java.lang.Thread.run(Thread.java:745)[:1.7.0_60]

      Attachments

        1. FELIX-4783-2.patch
          0.7 kB
          Christian Schneider
        2. FELIX-4783-1.patch
          0.7 kB
          Christian Schneider

        Activity

          People

            gnodet Guillaume Nodet
            cschneider Christian Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: