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

InterruptedException when updating the shell.core bundle

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.1.1
    • 4.1.2, 4.2.0.M1
    • karaf
    • None

    Description

      update org.apache.karaf.shell.core

      There are two InterruptedExceptions. This issue is mainly about the second one.
      It seems to hint that the start of a bundles extensions did not finish which is not true.
      I found that started.await() always throws InterruptedException if the thread was interrupted even if the countdown latch for started already finished.

      2017-07-31T15:33:53,571 | ERROR | Karaf local console user karaf | ShellUtil | 42 - org.apache.karaf.shell.core - 4.2.0.SNAPSHOT | Exception caught while executing command
      java.lang.InterruptedException: null
      at java.lang.Object.wait(Native Method) ~[?:?]
      at java.lang.Object.wait(Object.java:502) [?:?]
      at org.apache.felix.gogo.runtime.CommandSessionImpl$JobImpl.start(CommandSessionImpl.java:772) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:295) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:168) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:148) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:168) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:363) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at java.lang.Thread.run(Thread.java:748) [?:?]

      2017-07-31T15:34:20,192 | WARN | pipe-update 42 | CommandExtension | 42 - org.apache.karaf.shell.core - 4.2.0.SNAPSHOT | The wait for bundle org.apache.karaf.service.core being started before destruction has been interrupted.
      java.lang.InterruptedException: null
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1326) [?:?]
      at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:277) [?:?]
      at org.apache.karaf.shell.impl.action.osgi.CommandExtension.destroy(CommandExtension.java:125) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.utils.extender.AbstractExtender$2.run(AbstractExtender.java:285) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
      at org.apache.felix.utils.extender.AbstractExtender.destroyExtension(AbstractExtender.java:307) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.utils.extender.AbstractExtender.stop(AbstractExtender.java:125) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.karaf.shell.impl.console.osgi.Activator.stop(Activator.java:128) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:719) [?:?]
      at org.apache.felix.framework.Felix.stopBundle(Felix.java:2632) [?:?]
      at org.apache.felix.framework.Felix.updateBundle(Felix.java:2366) [?:?]
      at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1018) [?:?]
      at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:1004) [?:?]
      at org.apache.karaf.bundle.command.Update.doExecute(Update.java:57) [21:org.apache.karaf.bundle.core:4.2.0.SNAPSHOT]
      at org.apache.karaf.bundle.command.BundleCommand.execute(BundleCommand.java:46) [21:org.apache.karaf.bundle.core:4.2.0.SNAPSHOT]
      at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:571) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:497) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:386) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) [42:org.apache.karaf.shell.core:4.2.0.SNAPSHOT]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]

      Attachments

        Issue Links

          Activity

            People

              cschneider Christian Schneider
              cschneider Christian Schneider
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: