4 Replies Latest reply on Nov 8, 2013 10:06 AM by jbertram

    HornetQ-server-HornetQServerImpl waiting on condition (stuck in deployment)

    ronsi

      I'm trying to deploy an EAR application which makes use of JMS Queues. The application gets hung in the deployment process. I got a thread dump and it seems like there's something wrong with HornetQ configuration I have in place. Any pointers would be really appreciated.

       

      Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.6-b04 mixed mode):

       

       

      "Thread-11 (HornetQ-server-HornetQServerImpl::serverUUID=e1757c39-47c1-11e3-86ef-85ee7ab9fe0d-143547336)" prio=6 tid=0x0000000017ad8800 nid=0x1068 waiting on condition [0x000000001992f000]

         java.lang.Thread.State: WAITING (parking)

        at sun.misc.Unsafe.park(Native Method)

        - parking to wait for  <0x00000000eb0ec7d8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)

        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)

        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

        at java.lang.Thread.run(Thread.java:722)

       

       

      "Thread-10 (HornetQ-server-HornetQServerImpl::serverUUID=e1757c39-47c1-11e3-86ef-85ee7ab9fe0d-143547336)" prio=6 tid=0x0000000017ad8000 nid=0x1b9c waiting on condition [0x000000002094f000]

         java.lang.Thread.State: WAITING (parking)

        at sun.misc.Unsafe.park(Native Method)

        - parking to wait for  <0x00000000eb0ec7d8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)

        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)

        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

        at java.lang.Thread.run(Thread.java:722)

       

       

      "Thread-9 (HornetQ-server-HornetQServerImpl::serverUUID=e1757c39-47c1-11e3-86ef-85ee7ab9fe0d-143547336)" prio=6 tid=0x0000000017ad7000 nid=0x118c waiting on condition [0x000000001feae000]

         java.lang.Thread.State: WAITING (parking)

        at sun.misc.Unsafe.park(Native Method)

        - parking to wait for  <0x00000000eb0ec7d8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)

        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)

        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

        at java.lang.Thread.run(Thread.java:722)

       

       

      "Thread-8 (HornetQ-server-HornetQServerImpl::serverUUID=e1757c39-47c1-11e3-86ef-85ee7ab9fe0d-143547336)" prio=6 tid=0x0000000017ad6800 nid=0x1548 waiting on condition [0x000000002071e000]

         java.lang.Thread.State: WAITING (parking)

        at sun.misc.Unsafe.park(Native Method)

        - parking to wait for  <0x00000000eb0ec7d8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)

        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)

        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

        at java.lang.Thread.run(Thread.java:722)

       

       

      "Thread-7 (HornetQ-server-HornetQServerImpl::serverUUID=e1757c39-47c1-11e3-86ef-85ee7ab9fe0d-143547336)" prio=6 tid=0x0000000017ad4000 nid=0x2238 waiting on condition [0x000000001ad4e000]

         java.lang.Thread.State: WAITING (parking)

        at sun.misc.Unsafe.park(Native Method)

        - parking to wait for  <0x00000000eb0ec7d8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)

        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)

        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

        at java.lang.Thread.run(Thread.java:722)

       

       

      "Thread-6 (HornetQ-server-HornetQServerImpl::serverUUID=e1757c39-47c1-11e3-86ef-85ee7ab9fe0d-143547336)" prio=6 tid=0x0000000017ad5000 nid=0x16f8 waiting on condition [0x000000002058e000]

         java.lang.Thread.State: WAITING (parking)

        at sun.misc.Unsafe.park(Native Method)

        - parking to wait for  <0x00000000eb0ec7d8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)

        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)

        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

        at java.lang.Thread.run(Thread.java:722)

       

       

      "Thread-5 (HornetQ-server-HornetQServerImpl::serverUUID=e1757c39-47c1-11e3-86ef-85ee7ab9fe0d-143547336)" prio=6 tid=0x0000000013d14800 nid=0x1a94 waiting on condition [0x000000002038f000]

         java.lang.Thread.State: WAITING (parking)

        at sun.misc.Unsafe.park(Native Method)

        - parking to wait for  <0x00000000eb0ec7d8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)

        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)

        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)

        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

        at java.lang.Thread.run(Thread.java:722)

      ......

        • 1. Re: HornetQ-server-HornetQServerImpl waiting on condition (stuck in deployment)
          jbertram

          Those are just parked HornetQ threads (i.e. threads from a thread pool which aren't being used).  The server.log would probably be more helpful.

          • 2. Re: HornetQ-server-HornetQServerImpl waiting on condition (stuck in deployment)
            clebert.suconic

            Justin: +1

             

            These are just threads that are part of the thread pool... they are just waiting tasks to arrive.

            1 of 1 people found this helpful
            • 3. Re: HornetQ-server-HornetQServerImpl waiting on condition (stuck in deployment)
              ronsi

              Thanks for the quick reply. So, I found the problem surfaced after I removed "pooled-connection-factory" blocked from the "jms-connection-factories". Is it mandatory to have pooled-connection-factory for XA type connections.

               

              <jms-connection-factories>

                                  <connection-factory name="XAConnectionFactory">

                                      <factory-type>XA_GENERIC</factory-type>

                                      <connectors>

                                          <connector-ref connector-name="in-vm"/>

                                      </connectors>

                                      <entries>

                                          <entry name="java:/ConnectionFactory"/>

                                          <entry name="java:/XAConnectionFactory"/>

                                      </entries>

                                  </connection-factory>

                                 <!-- When I removed below block: my deployment was frozen -->

                                  <pooled-connection-factory name="hornetq-ra">

                                      <transaction mode="xa"/>

                                      <connectors>

                                          <connector-ref connector-name="in-vm"/>

                                      </connectors>

                                      <entries>

                                          <entry name="java:/JmsXA"/>

                                      </entries>

                                  </pooled-connection-factory>

              <jms-connection-factories>

              • 4. Re: HornetQ-server-HornetQServerImpl waiting on condition (stuck in deployment)
                jbertram

                Any MDB will try to use that pooled-connection-factory by default so if you remove then I could see why an MDB deployment would hang.  Or if you are injecting "java:/JmsXA" somewhere in your app, that would cause it to hang as well.