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

Deadlock with FeatureDeploymentListener

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 4.2.2
    • 4.2.3
    • karaf
    • None

    Description

      When I have feature files inside deploy/ dir (which is bad practice, I know), I see deadlock between:

      "FelixStartLevel" #21 daemon prio=5 os_prio=0 tid=0x00007f56dd2ac000 nid=0x7e69 waiting on condition [0x00007f5685bbc000]
         java.lang.Thread.State: WAITING (parking)
      	at sun.misc.Unsafe.park(Native Method)
      	- parking to wait for  <0x00000000e3044b98> (a java.util.concurrent.FutureTask)
      	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
      	at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:191)
      	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvisionInThread(FeaturesServiceImpl.java:966)
      	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.updateReposAndRequirements(FeaturesServiceImpl.java:912)
      	at org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:251)
      	- locked <0x00000000e3044ce0> (a org.apache.karaf.deployer.features.FeatureDeploymentListener)
      	at org.apache.karaf.deployer.features.FeatureDeploymentListener.init(FeatureDeploymentListener.java:95)
      	at org.apache.karaf.deployer.features.osgi.Activator.doStart(Activator.java:52)
      	at org.apache.karaf.util.tracker.BaseActivator.start(BaseActivator.java:89)
      	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
      	at org.apache.felix.framework.Felix.activateBundle(Felix.java:2240)
      	at org.apache.felix.framework.Felix.startBundle(Felix.java:2146)
      	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373)
      	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
      	at java.lang.Thread.run(Thread.java:748)
      

      and

      "features-3-thread-1" #55 prio=5 os_prio=0 tid=0x00007f5648486800 nid=0x7e99 in Object.wait() [0x00007f55f2bf6000]
         java.lang.Thread.State: WAITING (on object monitor)
      	at java.lang.Object.wait(Native Method)
      	at java.lang.Object.wait(Object.java:502)
      	at org.apache.felix.framework.Felix.acquireBundleLock(Felix.java:5293)
      	- locked <0x00000000e08b42f8> (a [Ljava.lang.Object;)
      	at org.apache.felix.framework.Felix.startBundle(Felix.java:1948)
      	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
      	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)
      	at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:161)
      	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1116)
      	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:997)
      	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025)
      	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964)
      	at org.apache.karaf.features.internal.service.FeaturesServiceImpl$$Lambda$97/1752701.call(Unknown Source)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: