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

Blueprint bundle deadlocks in "Stopping" status when update-ing/dev:watch bundle

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: karaf-osgi
    • Labels:
      None
    • Environment:

      Java Virtual Machine OpenJDK 64-Bit Server VM version 22.0-b10
      Version 1.7.0_03
      org.apache.aries.blueprint (0.3.2)

      Description

      I'm not sure if this should be reported in Karaf or Aries Blueprint, please let me know if I should move it.

      I use "dev:watch *" to update bundles during development. However Karaf usually is unable to stop bundles/services properly during update, Blueprint status for that bundle is stuck in "Stopping"

      By attaching JPDA, it seems that the Blueprint thread is stuck here at Felix.acquireGlobalLock() :

      Daemon Thread [Blueprint Extender: 3] (Suspended)	
      	Object.wait(long) line: not available [native method]	
      	Object[](Object).wait() line: 503	
      	Felix.acquireGlobalLock() line: 4944	
      	StatefulResolver.resolve(Set, Set) line: 102	
      	Felix.resolveBundleRevision(BundleRevision) line: 3819	
      	Felix.getBundleResource(BundleImpl, String) line: 1498	
      	BundleImpl.getResource(String) line: 628	
      	NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.<init>(Set<URI>, Bundle) line: 468	
      	NamespaceHandlerRegistryImpl.getNamespaceHandlers(Set<URI>, Bundle) line: 232	
      	BlueprintContainerImpl.doRun() line: 256	
      	BlueprintContainerImpl.run() line: 230	
      	Executors$RunnableAdapter<T>.call() line: 471	
      	FutureTask$Sync.innerRun() line: 334	
      	ScheduledThreadPoolExecutor$ScheduledFutureTask<V>(FutureTask<V>).run() line: 166	
      	ScheduledThreadPoolExecutor$ScheduledFutureTask<V>.access$201(ScheduledThreadPoolExecutor$ScheduledFutureTask) line: 178	
      	ScheduledThreadPoolExecutor$ScheduledFutureTask<V>.run() line: 292	
      	ScheduledThreadPoolExecutor(ThreadPoolExecutor).runWorker(ThreadPoolExecutor$Worker) line: 1110	
      	ThreadPoolExecutor$Worker.run() line: 603	
      	Thread.run() line: 722	
      

      While other Blueprint threads seem "normal":

      Daemon Thread [Blueprint Extender: 1] (Suspended)	
      	Unsafe.park(boolean, long) line: not available [native method]	
      	LockSupport.parkNanos(Object, long) line: 226	
      	AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) line: 2082	
      	ScheduledThreadPoolExecutor$DelayedWorkQueue.take() line: 1090	
      	ScheduledThreadPoolExecutor$DelayedWorkQueue.take() line: 807	
      	ScheduledThreadPoolExecutor(ThreadPoolExecutor).getTask() line: 1043	
      	ScheduledThreadPoolExecutor(ThreadPoolExecutor).runWorker(ThreadPoolExecutor$Worker) line: 1103	
      	ThreadPoolExecutor$Worker.run() line: 603	
      	Thread.run() line: 722	
      

      List of bundles:

      START LEVEL 100 , List Threshold: 0
         ID   State         Blueprint      Level  Symbolic name
      [   0] [Active     ] [            ] [    0] org.apache.felix.framework (4.0.3)
      [   1] [Active     ] [            ] [    5] org.ops4j.pax.url.mvn (1.3.5)
      [   2] [Active     ] [            ] [    5] org.ops4j.pax.url.wrap (1.3.5)
      [   3] [Active     ] [            ] [    8] org.ops4j.pax.logging.pax-logging-service (1.6.9)
      [   4] [Active     ] [            ] [    8] org.ops4j.pax.logging.pax-logging-api (1.6.9)
      [   5] [Active     ] [            ] [   10] org.apache.felix.configadmin (1.4.0)
      [   6] [Active     ] [            ] [   11] org.apache.felix.fileinstall (3.2.4)
      [   7] [Active     ] [            ] [   20] org.apache.aries.proxy (0.3.1)
      [   8] [Active     ] [            ] [   20] org.apache.servicemix.bundles.asm (3.3.1.1)
      [   9] [Active     ] [Created     ] [   20] org.apache.aries.blueprint (0.3.2)
      [  10] [Active     ] [            ] [   20] org.apache.aries.util (0.3.1)
      [  11] [Active     ] [Created     ] [   28] org.apache.karaf.deployer.blueprint (2.3.0.SNAPSHOT)
      [  12] [Active     ] [Created     ] [   28] org.apache.karaf.deployer.spring (2.3.0.SNAPSHOT)
      [  13] [Active     ] [Created     ] [   30] org.apache.karaf.deployer.features (2.3.0.SNAPSHOT)
      [  14] [Active     ] [            ] [   30] org.apache.karaf.diagnostic.core (2.3.0.SNAPSHOT)
      [  15] [Active     ] [Created     ] [   30] org.apache.karaf.shell.commands (2.3.0.SNAPSHOT)
      [  16] [Active     ] [Created     ] [   30] org.apache.karaf.features.core (2.3.0.SNAPSHOT)
      [  17] [Active     ] [Created     ] [   30] org.apache.karaf.diagnostic.command (2.3.0.SNAPSHOT)
      [  18] [Active     ] [Created     ] [   30] org.apache.karaf.deployer.wrap (2.3.0.SNAPSHOT)
      [  19] [Active     ] [Created     ] [   30] org.apache.karaf.jaas.modules (2.3.0.SNAPSHOT)
      [  20] [Active     ] [Created     ] [   30] org.apache.karaf.admin.core (2.3.0.SNAPSHOT)
      [  21] [Active     ] [Created     ] [   30] org.apache.karaf.shell.osgi (2.3.0.SNAPSHOT)
      [  22] [Active     ] [            ] [   30] org.apache.sshd.core (0.7.0)
      [  23] [Active     ] [            ] [   30] org.apache.aries.jmx.blueprint (0.3.0)
      [  24] [Active     ] [Created     ] [   30] org.apache.karaf.shell.dev (2.3.0.SNAPSHOT)
      [  25] [Active     ] [Created     ] [   30] org.apache.karaf.diagnostic.common (2.3.0.SNAPSHOT)
      [  26] [Active     ] [Created     ] [   30] org.apache.karaf.diagnostic.management (2.3.0.SNAPSHOT)
      [  27] [Active     ] [Created     ] [   30] org.apache.karaf.shell.console (2.3.0.SNAPSHOT)
      [  28] [Active     ] [            ] [   30] org.apache.aries.jmx.api (0.3.0)
      [  29] [Active     ] [Created     ] [   30] org.apache.karaf.deployer.kar (2.3.0.SNAPSHOT)
      [  30] [Active     ] [Created     ] [   30] org.apache.karaf.features.management (2.3.0.SNAPSHOT)
      [  31] [Active     ] [Created     ] [   30] org.apache.karaf.features.command (2.3.0.SNAPSHOT)
      [  32] [Active     ] [Created     ] [   30] org.apache.karaf.shell.log (2.3.0.SNAPSHOT)
      [  33] [Active     ] [            ] [   30] org.apache.mina.core (2.0.4)
      [  34] [Active     ] [Created     ] [   30] org.apache.karaf.admin.management (2.3.0.SNAPSHOT)
      [  35] [Active     ] [Created     ] [   30] org.apache.karaf.management.server (2.3.0.SNAPSHOT)
      [  36] [Active     ] [Created     ] [   30] org.apache.karaf.shell.packages (2.3.0.SNAPSHOT)
      [  37] [Active     ] [Created     ] [   30] org.apache.karaf.shell.ssh (2.3.0.SNAPSHOT)
      [  38] [Active     ] [Created     ] [   30] org.apache.karaf.admin.command (2.3.0.SNAPSHOT)
      [  39] [Active     ] [Created     ] [   30] org.apache.karaf.jaas.command (2.3.0.SNAPSHOT)
      [  40] [Active     ] [            ] [   30] org.apache.aries.jmx.core (0.3.1)
      [  41] [Active     ] [Created     ] [   30] org.apache.karaf.jaas.config (2.3.0.SNAPSHOT)
      [  42] [Active     ] [Created     ] [   30] org.apache.karaf.shell.config (2.3.0.SNAPSHOT)
      [  43] [Active     ] [Created     ] [   30] org.apache.karaf.management.mbeans.system (2.3.0.SNAPSHOT)
      [  44] [Active     ] [Created     ] [   30] org.apache.karaf.management.mbeans.bundles (2.3.0.SNAPSHOT)
      [  45] [Active     ] [Created     ] [   30] org.apache.karaf.management.mbeans.services (2.3.0.SNAPSHOT)
      [  46] [Active     ] [Created     ] [   30] org.apache.karaf.management.mbeans.config (2.3.0.SNAPSHOT)
      [  47] [Active     ] [Created     ] [   30] org.apache.karaf.management.mbeans.log (2.3.0.SNAPSHOT)
      [  48] [Active     ] [Created     ] [   30] org.apache.karaf.management.mbeans.packages (2.3.0.SNAPSHOT)
      [  49] [Active     ] [Created     ] [   30] org.apache.karaf.management.mbeans.dev (2.3.0.SNAPSHOT)
      [  50] [Active     ] [            ] [   50] org.apache.ws.commons.axiom.axiom-dom (1.2.13)
      [ 115] [Active     ] [            ] [   50] org.apache.ws.commons.axiom.axiom-impl (1.2.13)
      [ 588] [Active     ] [            ] [   40] org.apache.geronimo.specs.geronimo-annotation_1.1_spec (1.0.1)
      [ 589] [Active     ] [            ] [   40] com.google.guava (12.0.0)
      [ 590] [Active     ] [            ] [   40] org.apache.commons.io (2.4.0)
      [ 591] [Active     ] [            ] [   40] org.apache.commons.lang3 (3.1.0)
      [ 592] [Active     ] [            ] [   40] org.apache.servicemix.bundles.xpp3 (1.1.0.4c_6)
      [ 593] [Active     ] [            ] [   40] org.apache.servicemix.bundles.xstream (1.4.1.1)
      [ 594] [Active     ] [            ] [   40] jackson-core (2.0.4)
      [ 595] [Active     ] [            ] [   40] jackson-annotations (2.0.4)
      [ 596] [Active     ] [            ] [   40] jackson-databind (2.0.4)
      [ 597] [Active     ] [            ] [   40] joda-time (2.1)
      [ 598] [Active     ] [            ] [   40] jackson-datatype-joda (2.0.4)
      [ 599] [Active     ] [            ] [   40] jackson-datatype-guava (2.0.3)
      [ 600] [Active     ] [            ] [   50] org.apache.httpcomponents.httpcore (4.2.1)
      [ 601] [Active     ] [            ] [   50] org.apache.httpcomponents.httpclient (4.2.1)
      [ 602] [Active     ] [            ] [   30] org.apache.geronimo.specs.geronimo-jta_1.1_spec (1.1.1)
      [ 603] [Active     ] [            ] [   30] org.apache.geronimo.specs.geronimo-jpa_2.0_spec (1.1)
      [ 604] [Active     ] [            ] [   30] org.apache.aries.jpa.api (0.3.0)
      [ 605] [Active     ] [Created     ] [   30] org.apache.aries.jpa.blueprint.aries (0.3.0)
      [ 606] [Active     ] [            ] [   30] org.apache.aries.jpa.container (0.3.0)
      [ 607] [Active     ] [            ] [   30] org.apache.aries.jpa.container.context (0.3.0)
      [ 608] [Active     ] [            ] [   10] org.apache.servicemix.specs.activation-api-1.1 (1.9.0)
      [ 609] [Active     ] [            ] [   10] org.apache.servicemix.specs.stax-api-1.0 (1.9.0)
      [ 610] [Active     ] [            ] [   10] org.apache.servicemix.specs.jaxb-api-2.2 (1.9.0)
      [ 611] [Active     ] [            ] [   10] stax2-api (3.1.1)
      [ 612] [Active     ] [            ] [   10] woodstox-core-asl (4.1.2)
      [ 613] [Active     ] [            ] [   10] org.apache.servicemix.bundles.jaxb-impl (2.2.1.1_2)
      [ 614] [Active     ] [            ] [   50] soluvas-commons (1.0.0.SNAPSHOT)
      [ 615] [Active     ] [Created     ] [   50] soluvas-json (1.0.0.SNAPSHOT)
      [ 616] [Active     ] [            ] [   50] soluvas-cdi (1.0.0.SNAPSHOT)
      [ 617] [Active     ] [            ] [   50] soluvas-jaxrs (1.0.0.SNAPSHOT)
      [ 618] [Active     ] [Created     ] [   30] org.apache.aries.transaction.blueprint (0.3.0)
      [ 619] [Active     ] [            ] [   30] org.apache.aries.transaction.manager (0.3.1)
      [ 620] [Active     ] [            ] [   30] org.apache.aries.transaction.wrappers (0.3.0)
      [ 621] [Active     ] [            ] [   30] org.apache.servicemix.specs.activation-api-1.1 (2.0.0)
      [ 622] [Active     ] [            ] [   30] org.apache.geronimo.specs.geronimo-servlet_2.5_spec (1.1.2)
      [ 623] [Active     ] [            ] [   30] javax.mail (1.4.4)
      [ 624] [Active     ] [            ] [   30] org.eclipse.jetty.util (7.6.2.v20120308)
      [ 625] [Active     ] [            ] [   30] org.eclipse.jetty.io (7.6.2.v20120308)
      [ 626] [Active     ] [            ] [   30] org.eclipse.jetty.http (7.6.2.v20120308)
      [ 627] [Active     ] [            ] [   30] org.eclipse.jetty.client (7.6.2.v20120308)
      [ 628] [Active     ] [            ] [   30] org.eclipse.jetty.continuation (7.6.2.v20120308)
      [ 629] [Active     ] [            ] [   30] org.eclipse.jetty.jmx (7.6.2.v20120308)
      [ 630] [Active     ] [            ] [   30] org.eclipse.jetty.server (7.6.2.v20120308)
      [ 631] [Active     ] [            ] [   30] org.eclipse.jetty.security (7.6.2.v20120308)
      [ 632] [Active     ] [            ] [   30] org.eclipse.jetty.servlet (7.6.2.v20120308)
      [ 633] [Active     ] [            ] [   30] org.eclipse.jetty.servlets (7.6.2.v20120308)
      [ 634] [Active     ] [            ] [   30] org.eclipse.jetty.xml (7.6.2.v20120308)
      [ 635] [Active     ] [            ] [   30] org.eclipse.jetty.webapp (7.6.2.v20120308)
      [ 636] [Active     ] [            ] [   30] org.eclipse.jetty.jndi (7.6.2.v20120308)
      [ 637] [Active     ] [            ] [   30] org.eclipse.jetty.plus (7.6.2.v20120308)
      [ 638] [Active     ] [            ] [   30] org.eclipse.jetty.websocket (7.6.2.v20120308)
      [ 639] [Active     ] [            ] [   30] org.ops4j.pax.web.pax-web-api (1.1.3)
      [ 640] [Active     ] [            ] [   30] org.ops4j.pax.web.pax-web-spi (1.1.3)
      [ 641] [Active     ] [            ] [   30] org.ops4j.pax.web.pax-web-runtime (1.1.3)
      [ 642] [Active     ] [            ] [   30] org.ops4j.pax.web.pax-web-jetty (1.1.3)
      [ 643] [Active     ] [            ] [   50] org.apache.geronimo.specs.geronimo-ws-metadata_2.0_spec (1.1.3)
      [ 644] [Active     ] [            ] [   50] org.apache.geronimo.specs.geronimo-jms_1.1_spec (1.1.1)
      [ 645] [Active     ] [            ] [   50] org.apache.servicemix.specs.jsr311-api-1.1.1 (2.0.0)
      [ 646] [Active     ] [            ] [   50] org.apache.commons.codec (1.4)
      [ 647] [Active     ] [            ] [   50] org.apache.servicemix.bundles.commons-httpclient (3.1.0.7)
      [ 648] [Active     ] [            ] [   50] org.apache.servicemix.bundles.stax-utils (20040917.0.0.2)
      [ 649] [Active     ] [            ] [   50] org.apache.servicemix.bundles.wsdl4j (1.6.2.6)
      [ 650] [Active     ] [            ] [   50] org.apache.james.apache-mime4j-core (0.7.2)
      [ 651] [Active     ] [            ] [   50] org.apache.ws.commons.axiom.axiom-api (1.2.13)
      [ 652] [Active     ] [            ] [   50] org.apache.commons.fileupload (1.2.2)
      [ 653] [Active     ] [            ] [   50] org.apache.neethi (3.0.2)
      [ 654] [Active     ] [            ] [   50] org.apache.servicemix.bundles.xmlschema (1.4.3.1)
      [ 655] [Active     ] [            ] [   50] org.apache.woden.woden-api (1.0.0)
      [ 656] [Active     ] [            ] [   50] org.apache.woden.woden-impl-commons (1.0.0)
      [ 657] [Active     ] [            ] [   50] org.apache.woden.woden-impl-dom (1.0.0)
      [ 659] [Active     ] [            ] [   50] org.apache.servicemix.bundles.commons-beanutils (1.8.3.1)
      [ 660] [Active     ] [            ] [   50] org.apache.servicemix.bundles.rhino (1.0.0.7R2_3)
      [ 661] [Active     ] [            ] [   60] com.google.code.magja (1.0.3.SNAPSHOT)
      [ 662] [Active     ] [            ] [   50] org.apache.commons.pool (1.6.0)
      [ 663] [Active     ] [            ] [   50] org.apache.servicemix.bundles.antlr (2.7.7.5)
      [ 664] [Active     ] [            ] [   50] org.apache.servicemix.bundles.commons-collections (3.2.1.3)
      [ 665] [Active     ] [            ] [   50] org.apache.commons.lang (2.6)
      [ 666] [Active     ] [            ] [   50] org.apache.directory.shared.ldap.client.api (1.0.0.M12)
      [ 667] [Active     ] [            ] [   50] org.apache.directory.shared.asn1.api (1.0.0.M12)
      [ 668] [Active     ] [            ] [   50] org.apache.directory.shared.asn1.ber (1.0.0.M12)
      [ 669] [Active     ] [            ] [   50] org.apache.directory.shared.i18n (1.0.0.M12)
      [ 670] [Active     ] [            ] [   50] org.apache.directory.shared.util (1.0.0.M12)
      [ 671] [Active     ] [            ] [   50] org.apache.directory.shared.ldap.codec.core (1.0.0.M12)
      [ 672] [Active     ] [            ] [   50] org.apache.directory.shared.ldap.net.mina (1.0.0.M12)
      [ 673] [Active     ] [            ] [   50] org.apache.directory.shared.ldap.model (1.0.0.M12)
      [ 674] [Active     ] [            ] [   50] org.apache.directory.shared.ldap.schema (1.0.0.M12)
      [ 675] [Active     ] [            ] [   50] org.apache.directory.shared.ldap.extras.aci (1.0.0.M12)
      [ 676] [Active     ] [            ] [   50] org.apache.servicemix.bundles.jaxb-xjc (2.2.1.1_2)
      [ 677] [Active     ] [            ] [   50] wrap_mvn_com.google.protobuf_protobuf-java_2.4.1_Export-Package___version_2.4.1 (0)
      [ 678] [Active     ] [            ] [   50] org.mvel2 (2.1.0.drools16)
      [ 679] [Active     ] [            ] [   50] wrap_mvn_com.sun.istack_istack-commons-runtime_2.12_Export-Package___version_2.12.0 (0)
      [ 680] [Active     ] [            ] [   50] wrap_mvn_com.thoughtworks.xstream_xstream_1.4.2_Export-Package___version_1.4.2 (0)
      [ 681] [Active     ] [            ] [   50] org.apache.servicemix.bundles.antlr-runtime (3.4.0.2)
      [ 682] [Active     ] [            ] [   50] org.drools.core (5.4.0.Final)
      [ 683] [Active     ] [            ] [   50] org.drools.compiler (5.4.0.Final)
      [ 684] [Active     ] [            ] [   50] org.drools.templates (5.4.0.Final)
      [ 685] [Active     ] [            ] [   50] org.drools.api (5.4.0.Final)
      [ 686] [Active     ] [            ] [   50] org.drools.internalapi (5.4.0.Final)
      [ 687] [Active     ] [            ] [   50] org.jbpm.flow.core (5.3.0.Final)
      [ 688] [Active     ] [            ] [   50] org.jbpm.flow.builder (5.3.0.Final)
      [ 689] [Active     ] [            ] [   50] org.jbpm.bpmn2 (5.3.0.Final)
      [ 690] [Resolved   ] [            ] [   50] wrap_mvn_org.neo4j_neo4j-kernel_1.7.2 (0)
      [ 691] [Resolved   ] [            ] [   50] wrap_mvn_org.neo4j_neo4j-lucene-index_1.7.2 (0)
      [ 692] [Resolved   ] [            ] [   50] wrap_mvn_org.neo4j_neo4j-cypher_1.7.2 (0)
      [ 693] [Resolved   ] [            ] [   50] wrap_mvn_org.neo4j_neo4j-rest-graphdb_1.7 (0)
      [ 694] [Active     ] [            ] [   50] wrap_mvn_com.tinkerpop.blueprints_blueprints-core_1.2 (0)
      [ 695] [Active     ] [            ] [   50] wrap_mvn_com.tinkerpop.blueprints_blueprints-neo4j-graph_1.2 (0)
      [ 696] [Active     ] [            ] [   50] wrap_mvn_com.tinkerpop_frames_0.7 (0)
      [ 697] [Active     ] [            ] [   50] wrap_mvn_net.coobird_thumbnailator_0.4.1 (0)
      [ 698] [Active     ] [            ] [   50] soluvas-image-store (1.0.0.SNAPSHOT)
      [ 699] [Active     ] [            ] [   50] org.apache.geronimo.specs.geronimo-validation_1.0_spec (1.1)
      [ 700] [Active     ] [            ] [   50] wrap_mvn_org.picketlink.idm_picketlink-idm-common_1.5.0.Alpha02_Export-Package___version_1.5.0.Alpha02 (0)
      [ 701] [Active     ] [            ] [   50] wrap_mvn_org.picketlink.idm_picketlink-idm-api_1.5.0.Alpha02_Export-Package___version_1.5.0.Alpha02 (0)
      [ 702] [Active     ] [            ] [   50] soluvas-ldap (1.0.0.SNAPSHOT)
      [ 703] [Active     ] [            ] [   50] org.apache.geronimo.specs.geronimo-ejb_3.1_spec (1.0.2)
      [ 704] [Active     ] [            ] [   50] org.apache.geronimo.specs.geronimo-jaxrpc_1.1_spec (2.0.0)
      [ 705] [Active     ] [            ] [   50] javax.cache (0.4.0)
      [ 706] [Active     ] [            ] [   50] org.apache.geronimo.specs.geronimo-jcdi_1.0_spec (1.0)
      [ 707] [Active     ] [            ] [   50] javax.el-api (2.2.99.b01)
      [ 708] [Active     ] [            ] [   50] org.apache.geronimo.specs.geronimo-atinject_1.0_spec (1.0)
      [ 709] [Active     ] [            ] [   50] org.apache.geronimo.specs.geronimo-interceptor_3.0_spec (1.0.1)
      [ 711] [Active     ] [            ] [   50] com.typesafe.config (0.4.1)
      [ 713] [Active     ] [            ] [   50] wrap_mvn_com.github.spullara.mustache.java_compiler_0.8.2 (0)
      [ 715] [Active     ] [            ] [   50] wrap_mvn_com.google.code.morphia_morphia-logging-slf4j_0.99 (0)
      [ 716] [Active     ] [            ] [   50] org.mongodb.mongo-java-driver (2.8.0.RELEASE)
      [ 717] [Active     ] [            ] [   50] com.rabbitmq.client (2.8.5)
      [ 718] [Active     ] [            ] [   50] wrap_mvn_com.restfb_restfb_1.6.9 (0)
      [ 719] [Active     ] [            ] [   50] org.apache.commons.email (1.2)
      [ 720] [Active     ] [            ] [   50] jackson-core-asl (1.9.9)
      [ 721] [Active     ] [            ] [   50] jackson-mapper-asl (1.9.9)
      [ 722] [Active     ] [            ] [   50] joda-time (1.6.2)
      [ 723] [Active     ] [GracePeriod ] [  100] id.co.bippo.commerce.core (4.0.1.SNAPSHOT)
      [ 724] [Active     ] [            ] [   50] wrap_mvn_org.apache.jena_jena-iri_0.9.3 (0)
      [ 725] [Active     ] [            ] [   50] wrap_mvn_org.apache.jena_jena-core_2.7.3 (0)
      [ 726] [Active     ] [            ] [   50] wrap_mvn_org.apache.jena_jena-arq_2.9.3 (0)
      [ 728] [Active     ] [            ] [   55] org.apache.axis2.osgi (1.0.0.2)
      [ 729] [Stopping   ] [            ] [   80] id.co.bippo.commerce.shell (4.0.1.SNAPSHOT)
      [ 732] [Active     ] [            ] [   80] com.typesafe.akka.actor (2.1.0.M1)
      [ 733] [Active     ] [            ] [   80] org.scala-lang-osgi.scala-library (2.10.0.M6)
      [ 743] [Installed  ] [            ] [   80] org.eclipse.emf.common (2.8.0.v20120606-0717)
      [ 744] [Installed  ] [            ] [   80] org.eclipse.emf.ecore.xmi (2.8.0.v20120606-0717)
      [ 745] [Installed  ] [            ] [   80] org.eclipse.emf.ecore (2.8.0.v20120606-0717)
      [ 747] [Resolved   ] [            ] [   80] wrap_mvn_com.google.code.morphia_morphia_0.99_DynamicImport-Package__ (0)
      [ 749] [Resolved   ] [            ] [   80] com.mysql.jdbc (5.1.20)
      [ 750] [Active     ] [Created     ] [   80] berbatik_dev_magento_mysql.xml (0.0.0)
      [ 751] [Active     ] [            ] [   30] org.apache.aries.jndi.api (0.3.0)
      [ 752] [Active     ] [            ] [   30] org.apache.aries.jndi.core (0.3.0)
      [ 753] [Active     ] [            ] [   30] org.apache.aries.jndi.rmi (0.3.0)
      [ 754] [Active     ] [            ] [   30] org.apache.aries.jndi.url (0.3.0)
      [ 755] [Active     ] [            ] [   30] org.apache.aries.jndi.legacy.support (0.3.0)
      

      The affected bundle:

      [ 729] [Stopping   ] [            ] [   80] id.co.bippo.commerce.shell (4.0.1.SNAPSHOT)
      

      Headers:

      karaf@root> headers 729
      
      Bippo Commerce Shell (729)
      --------------------------
      Manifest-Version = 1.0
      Bnd-LastModified = 1344892875353
      Tool = Bnd-1.50.0
      Built-By = ceefour
      Build-Jdk = 1.6.0_24
      Created-By = Apache Maven Bundle Plugin
      
      Bundle-Vendor = Bippo Indonesia
      Bundle-Name = Bippo Commerce Shell
      Bundle-DocURL = http://www.bippo.co.id/
      Bundle-Description = Shell commands for Product management, Booking management
      Bundle-SymbolicName = id.co.bippo.commerce.shell
      Bundle-Version = 4.0.1.SNAPSHOT
      Bundle-License = http://www.bippo.co.id/
      Bundle-ManifestVersion = 2
      
      Import-Package = 
              com.google.code.magja.model.product;version="[1.0,2)",
              com.google.code.magja.service;version="[1.0,2)",
              com.google.code.magja.service.product;version="[1.0,2)",
              com.google.code.magja.soap;version="[1.0,2)",
              com.google.common.base;version="[12.0,13)",
              com.google.common.collect;version="[12.0,13)",
              com.google.common.util.concurrent;version="[12.0,13)",
              com.hp.hpl.jena.rdf.model,
              com.hp.hpl.jena.shared,
              id.co.bippo.commerce.core;version="[4.0,5)",
              id.co.bippo.commerce.dao;version="[4.0,5)",
              javax.annotation,
              javax.inject,
              org.apache.commons.beanutils;version="[1.8,2)",
              org.apache.directory.ldap.client.api;version="[1.0,2)",
              org.apache.felix.gogo.commands;version="[0.10,1)",
              org.apache.felix.service.command;status=provisional;version="[0.10,1)",
              org.apache.karaf.shell.console;version="[2.2,3)",
              org.codehaus.jackson.map;version="[1.9,2)",
              org.osgi.framework;version="[1.5,2)",
              org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
              org.osgi.util.tracker;version="[1.4,2)",
              org.slf4j;version="[1.6,2)",
              org.soluvas.image.store;version="[1.0,2)",
              org.soluvas.ldap;version="[1.0,2)"
      Export-Package = 
              com.soluvas.multitenant;
                      uses:="org.apache.felix.service.command,
                              com.google.common.util.concurrent,
                              com.google.common.base,
                              javax.annotation,
                              org.osgi.util.tracker,
                              org.osgi.framework,
                              org.slf4j";
                      version=4.0.1.SNAPSHOT,
              com.soluvas.person.shell;
                      uses:="org.apache.karaf.shell.console,
                              com.google.common.collect,
                              org.soluvas.ldap,
                              org.apache.felix.gogo.commands,
                              org.slf4j";
                      version=4.0.1.SNAPSHOT,
              id.co.bippo.commerce.core.shell;
                      uses:="id.co.bippo.commerce.core,
                              javax.annotation,
                              org.soluvas.ldap,
                              com.google.common.base,
                              org.apache.felix.service.command,
                              org.apache.karaf.shell.console,
                              com.soluvas.multitenant,
                              org.apache.felix.gogo.commands,
                              org.slf4j";
                      version=4.0.1.SNAPSHOT,
              id.co.bippo.commerce.dao.shell;
                      uses:="javax.annotation,
                              com.google.common.base,
                              id.co.bippo.commerce.dao,
                              org.apache.felix.service.command,
                              org.apache.karaf.shell.console,
                              com.soluvas.multitenant,
                              org.apache.felix.gogo.commands,
                              org.slf4j";
                      version=4.0.1.SNAPSHOT,
              id.co.bippo.commerce.shell;
                      uses:="javax.annotation,
                              id.co.bippo.commerce.core,
                              com.google.code.magja.model.product,
                              com.google.code.magja.service,
                              com.google.code.magja.service.product,
                              com.google.code.magja.soap,
                              com.hp.hpl.jena.shared,
                              org.slf4j,
                              com.hp.hpl.jena.rdf.model,
                              org.codehaus.jackson.map,
                              javax.inject";
                      version=4.0.1.SNAPSHOT,
              org.soluvas.image.store.shell;
                      uses:="org.soluvas.image.store,
                              javax.annotation,
                              com.google.common.base,
                              org.apache.commons.beanutils,
                              org.apache.felix.service.command,
                              org.apache.karaf.shell.console,
                              com.soluvas.multitenant,
                              org.apache.felix.gogo.commands,
                              org.slf4j";
                      version=4.0.1.SNAPSHOT
      

      I also can't exit Karaf properly, i.e. using Ctrl+D still hangs. I need to Ctrl+Z (sleep), then do:

      kill -9 %1
      

      to forcefully kill karaf.

      I also am unable to run some other commands like dev:show-tree or osgi:install :

      karaf@root> dev:show-tree 729
      Bundle id.co.bippo.commerce.shell [729] is currently STOPPING
      (..........hangs here forever - slept for 6 hours and woke up - still at the same spot.......)
      ^C
      Error executing command: Unable to acquire global lock to retrieve exported packages.
      

      log:

      2012-08-14 10:44:48,592 | INFO  | l Console Thread | Console                          | araf.shell.console.jline.Console  196 | 27 - org.apache.karaf.shell.console - 2.3.0.SNAPSHOT | Exception caught while executing command
      org.apache.karaf.shell.console.MultiException: Error installing bundles:
              Unable to install bundle mvn:org.apache.openjpa/openjpa/2.2.0
              at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91)
              at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:70)[21:org.apache.karaf.shell.osgi:2.3.0.SNAPSHOT]
              at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.karaf.shell.console.jline.Console.run(Console.java:167)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at java.lang.Thread.run(Thread.java:722)[:1.7.0_03]
      Caused by: java.lang.Exception: Unable to install bundle mvn:org.apache.openjpa/openjpa/2.2.0
              at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:45)[21:org.apache.karaf.shell.osgi:2.3.0.SNAPSHOT]
              ... 11 more
      Caused by: org.osgi.framework.BundleException: Unable to acquire the global lock to install the bundle.
              at org.apache.felix.framework.Felix.installBundle(Felix.java:2727)[org.apache.felix.framework-4.0.3.jar:]
              at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)[org.apache.felix.framework-4.0.3.jar:]
              at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:43)[21:org.apache.karaf.shell.osgi:2.3.0.SNAPSHOT]
              ... 11 more
      

      install bundle locks up:

      karaf@root> install -s mvn:org.apache.openjpa/openjpa/2.2.0
      (......locks up here forever......)
      ^C
      Bundle IDs: 
      Error executing command: Error installing bundles:
              Unable to install bundle mvn:org.apache.openjpa/openjpa/2.2.0
      

      log:

      2012-08-14 16:01:20,459 | INFO  | l Console Thread | Console                          | araf.shell.console.jline.Console  196 | 27 - org.apache.karaf.shell.console - 2.3.0.SNAPSHOT | Exception caught while executing command
      org.apache.karaf.shell.console.MultiException: Error installing bundles:
              Unable to install bundle mvn:org.apache.openjpa/openjpa/2.2.0
              at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91)
              at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:70)[21:org.apache.karaf.shell.osgi:2.3.0.SNAPSHOT]
              at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at org.apache.karaf.shell.console.jline.Console.run(Console.java:167)[27:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
              at java.lang.Thread.run(Thread.java:722)[:1.7.0_03]
      Caused by: java.lang.Exception: Unable to install bundle mvn:org.apache.openjpa/openjpa/2.2.0
              at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:45)[21:org.apache.karaf.shell.osgi:2.3.0.SNAPSHOT]
              ... 11 more
      Caused by: org.osgi.framework.BundleException: Unable to acquire the global lock to install the bundle.
              at org.apache.felix.framework.Felix.installBundle(Felix.java:2727)[org.apache.felix.framework-4.0.3.jar:]
              at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)[org.apache.felix.framework-4.0.3.jar:]
              at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:43)[21:org.apache.karaf.shell.osgi:2.3.0.SNAPSHOT]
              ... 11 more
      

      The strange thing is that these commands do not trigger the bug:

      refresh <bundle>
      update <bundle>
      stop <bundle> then start <bundle>
      

      I've been having this issue quite a lot, I think it's quite a common problem in OSGi world, and I suspect it may have something to do with my bundle.

      Is there a procedure or something to diagnose/debug such problems?

      Or perhaps best practices to avoid this issue ?

      Let me know if you need more information.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ceefour Hendy Irawan
              • Votes:
                4 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: