We have a problem where our network would occasionally goes down and one of
the threads sending a message the hang. We're using Spring 2.0.7, ActiveMQ
4.1.2, Jencks 2.1 (for pooling). & the Failover transport with a single
embedded broker. The thread dump is:

"CONFFUNC-T5PG:Output Pump" daemon prio=10 tid=0x00002aaaf81c1000 nid=0x3758
in Object.wait() [0x0000000042701000..0x0000000042702a90]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00002aaab53ed438> (a
edu.emory.mathcs.backport.java.util.concurrent.locks.CondVar)
        at java.lang.Object.wait(Object.java:485)
        at
edu.emory.mathcs.backport.java.util.concurrent.locks.CondVar.await(CondVar.java:75)
        - locked <0x00002aaab53ed438> (a
edu.emory.mathcs.backport.java.util.concurrent.locks.CondVar)
        at
edu.emory.mathcs.backport.java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:318)
        at
org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:42)
        at
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:75)
        at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1175)
        at
org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1263)
        - locked <0x00002aaab53e91e0> (a org.apache.activemq.ActiveMQConnection)
        at
org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:276)
        at org.jencks.amqpool.SessionPool.createSession(SessionPool.java:110)
        at org.jencks.amqpool.SessionPool.makeObject(SessionPool.java:78)
        at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
        at org.jencks.amqpool.SessionPool.borrowSession(SessionPool.java:53)
        at 
org.jencks.amqpool.ConnectionPool.createSession(ConnectionPool.java:89)
        at
org.jencks.amqpool.XaConnectionPool.createSession(XaConnectionPool.java:51)
        at
org.jencks.amqpool.PooledConnection.createSession(PooledConnection.java:132)
        at
org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:200)
        at 
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:421)
        at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:477)
        at
org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:557)
        at
org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:548)

Searching through the forums, I did find some similar posts. 

http://www.nabble.com/hung-connecting-to-broker-td4662968.html#a4995330
http://www.nabble.com/4.1-hang-in-ActiveMQSession.setClientID-td8955836.html#a8955836

The problem seems to trace back to
http://issues.apache.org/activemq/browse/AMQ-789, which Hiram Chirino fixed
in 4.0.2. However, the problems still persist in 4.1.2. Looking into the
source a little further, the ensureConnectionInfoSent method calls

public Response syncSendPacket(Command command) throws JMSException

rather than:

public Response syncSendPacket(Command command, int timeout) throws
JMSException

The second method seems to timeout whereas the one being used doesn't.
Looking at the trunk version, it's still seem to be the case.

http://fisheye6.atlassian.com/browse/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?r=691124

-----------

I was wondering if anyone else has run into this problem? Is there any
workaround to the issue? If Hiram is still monitoring this mailing list, any
ideas what was the change that fixed the issue (the fix predated FishEye, so
I can't find it)? Did it get nuked in a merge sometime in the past?

Any help here would be greatly appreciated.

Cheers,

Mark C

-- 
View this message in context: 
http://www.nabble.com/Sending-message-hangs-when-negotiating-wire-format-tp19717526p19717526.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to