You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Mark Chaimungkalanont (JIRA)" <ji...@apache.org> on 2010/06/25 08:49:51 UTC
[jira] Created: (AMQ-2798) Occaional hangs on
Occaional hangs on
-------------------
Key: AMQ-2798
URL: https://issues.apache.org/activemq/browse/AMQ-2798
Project: ActiveMQ
Issue Type: Bug
Components: JMS client
Affects Versions: 5.3.2
Reporter: Mark Chaimungkalanont
When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
{noformat}
"QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
- locked <0x10b9bdf8> (a java.lang.Object)
at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
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)
{noformat}
Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
{code}
public Response syncSendPacket(Command command) throws JMSException {
{code}
which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
{code}
public Response syncSendPacket(Command command, int timeout) throws JMSException {
{code}
should / can ensureConnectionInfoSent use the one with the timeout instead?
We're using the failover transport:
failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Anish Khanzode (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anish Khanzode updated AMQ-2798:
--------------------------------
Attachment: blocked-connection-patch2
Attaching new patch as FailoverTransactionTest was failing. Still running tests.
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch2
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Anish Khanzode (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61289#action_61289 ]
Anish Khanzode commented on AMQ-2798:
-------------------------------------
I see that 5.4.0 behaves better. Is there any property that controlls the timeout? Additionally I see excessive logging in this situation and activemq takes over CPU.
Here is the exception:
2010-08-19 09:39:17,090 INFO [org.apache.activemq.broker.TransportConnection.Transport] Transport failed: java.io.IOException: The transport is not running.
java.io.IOException: The transport is not running.
at org.apache.activemq.transport.TransportSupport.checkStarted(TransportSupport.java:107)
at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:179)
at org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:244)
at org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:85)
at org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:104)
at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
at org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1247)
at org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:808)
at org.apache.activemq.broker.TransportConnection.dispatchSync(TransportConnection.java:768)
at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:187)
at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)
at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:217)
at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:219)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:201)
at java.lang.Thread.run(Thread.java:619)
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Mark Chaimungkalanont (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Chaimungkalanont updated AMQ-2798:
---------------------------------------
Summary: Occaional hangs on ensureConnectionInfoSent (was: Occaional hangs on )
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Anish Khanzode (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anish Khanzode updated AMQ-2798:
--------------------------------
Attachment: (was: blocked-connection-patch2)
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Przemek Bruski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61256#action_61256 ]
Przemek Bruski commented on AMQ-2798:
-------------------------------------
The attached patch will throw NPE on timeout.
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Anish Khanzode (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61232#action_61232 ]
Anish Khanzode commented on AMQ-2798:
-------------------------------------
I can reproduce this issue. I am using Master/Slave configuration with Master set to waitForSlave="true"
Start Master and then start consumer. Consumer hangs at ensureConnectionInfoSent() does not matter if I am using shared or unshared connection.
I added a property syncResponseTimeout in factory and connection and wired it in. Changed syncSendPacket to use timeout and I dont get hung consumer.
I am going to attach a patch.
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61267#action_61267 ]
Timothy Bish commented on AMQ-2798:
-----------------------------------
Version 5.4.0 adds a RequestTimeoutException that is thrown on timeout in ResponseCorrelator so the NPE is not an issue any longer.
Currently the code is operating as designed, the case where the connection.start or createSession is hanging is awaiting a response from the broker for its ConnectionInfo. The case in which this is happening in regards to this issue is when the Master broker is up but awaiting its slave to start as well. In this case the Master is there but it won't respond to the ConnectionInfo and the connection breaks at which time the FailoverTransport tries again to connect. This explains why the maxReconnectAttempts and startupMaxReconnectAttempts don't apply here since it is able to actually open a socket successfully to the Master broker, it just doesn't complete the connect cycle because the master is awaiting its slave before it will allow any connections. Once the slave comes online and the Master completes its start-up then the Connection should be established as normal.
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Anish Khanzode (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61243#action_61243 ]
Anish Khanzode commented on AMQ-2798:
-------------------------------------
I have startupMaxReconnectAttempts=2 and it does not work.
my brokerURL looks like failover:(tcp://hostname:61616?keepAlive=true)?randomize=false&startupMaxReconnectAttempts=2
keepAlive or not it fails.
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Mark Chaimungkalanont (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61247#action_61247 ]
Mark Chaimungkalanont commented on AMQ-2798:
--------------------------------------------
@Tim, I think the problem is happening at a lower level than that. As in, I think the the {{ensureConnectionInfoSent}} does the {{syncSendPacket}} on some sort of advisorial transport (I think org.apache.activemq.transport.ResponseCorrelator) and not the actual specified transport. This seems likely since syncSendPacket calls {{(Response)this.transport.request(command)}} and for FailoverTransport, the implementation for this is:
{code}
public Object request(Object command) throws IOException {
throw new AssertionError("Unsupported Method");
}
{code}
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Anish Khanzode (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anish Khanzode updated AMQ-2798:
--------------------------------
Attachment: blocked-connection-patch3
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Przemek Bruski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61288#action_61288 ]
Przemek Bruski commented on AMQ-2798:
-------------------------------------
I am not sure whether it's also an issue, but it seems that although ResponseCorrelator is fixed, ReliableTransport may still return null, since it does:
{code}
while (timeout > 0) {
...
}
return response.getResult(0);
{code}
and FutureResponse does:
{code}
if (result == null && timeout > 0) {
throw new RequestTimedOutIOException();
}
if (result == null && timeout > 0) {
throw new RequestTimedOutIOException();
}
return result;
{code}
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Anish Khanzode (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61266#action_61266 ]
Anish Khanzode commented on AMQ-2798:
-------------------------------------
Do you think ResponseCrrelator needs to guard against nulls? I always assumes that Command (Object o) is a valid object.
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61242#action_61242 ]
Timothy Bish commented on AMQ-2798:
-----------------------------------
Have you tried just adding in the startupMaxReconnectAttempts option to your connection URI? This option will limit the number of time the Failover Transport will attempt to reconnect on startup and allow the client to fail after that number of tries.
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Anish Khanzode (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61266#action_61266 ]
Anish Khanzode edited comment on AMQ-2798 at 8/18/10 5:39 PM:
--------------------------------------------------------------
Do you think ResponseCrrelator needs to guard against nulls? I always assumes that Command (Object o) is a valid object. Or Can we assume if Response is null the connection is closed?
was (Author: akhanzode):
Do you think ResponseCrrelator needs to guard against nulls? I always assumes that Command (Object o) is a valid object.
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Anish Khanzode (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anish Khanzode updated AMQ-2798:
--------------------------------
Attachment: (was: blocked-connection-patch)
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch2
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Przemek Bruski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61256#action_61256 ]
Przemek Bruski edited comment on AMQ-2798 at 8/18/10 12:17 PM:
---------------------------------------------------------------
The attached patch may throw an NPE on timeout, depending on transport.
was (Author: pbruski):
The attached patch will throw NPE on timeout.
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Przemek Bruski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61288#action_61288 ]
Przemek Bruski edited comment on AMQ-2798 at 8/19/10 7:09 AM:
--------------------------------------------------------------
I am not sure whether it's also an issue, but it seems that although ResponseCorrelator is fixed, ReliableTransport may still return null, since it does:
{code}
while (timeout > 0) {
...
}
return response.getResult(0);
{code}
and FutureResponse does:
{code}
if (result == null && timeout > 0) {
throw new RequestTimedOutIOException();
}
return result;
{code}
was (Author: pbruski):
I am not sure whether it's also an issue, but it seems that although ResponseCorrelator is fixed, ReliableTransport may still return null, since it does:
{code}
while (timeout > 0) {
...
}
return response.getResult(0);
{code}
and FutureResponse does:
{code}
if (result == null && timeout > 0) {
throw new RequestTimedOutIOException();
}
if (result == null && timeout > 0) {
throw new RequestTimedOutIOException();
}
return result;
{code}
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch3
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQ-2798) Occaional hangs on
ensureConnectionInfoSent
Posted by "Anish Khanzode (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anish Khanzode updated AMQ-2798:
--------------------------------
Attachment: blocked-connection-patch
Patch I used to fix this issue. I am not expert in this codebase but ping me if this is not the best way. This is STOPPING us from going to production with this issue open.
> Occaional hangs on ensureConnectionInfoSent
> -------------------------------------------
>
> Key: AMQ-2798
> URL: https://issues.apache.org/activemq/browse/AMQ-2798
> Project: ActiveMQ
> Issue Type: Bug
> Components: JMS client
> Affects Versions: 5.3.2
> Reporter: Mark Chaimungkalanont
> Attachments: blocked-connection-patch
>
>
> When connecting to the broker, the client occasionally starts to hang. A thread dump reveals:
> {noformat}
> "QuartzScheduler_Worker-7" prio=5 tid=0x0116f190 nid=0x1ce2400 waiting on condition [0xf1fae000..0xf1fafb30]
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
> at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
> at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
> at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1233)
> at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1339)
> - locked <0x10b9bdf8> (a java.lang.Object)
> at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:298)
> 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)
> {noformat}
> Looking closer at the code of {{ensureConnectionInfoSent}} in {{ActiveMQConnection}}, it uses the method:
> {code}
> public Response syncSendPacket(Command command) throws JMSException {
> {code}
> which never times out, possibly causing everything to hang eternally. There does seem to be an identical method that allows for a timeout.
> {code}
> public Response syncSendPacket(Command command, int timeout) throws JMSException {
> {code}
> should / can ensureConnectionInfoSent use the one with the timeout instead?
> We're using the failover transport:
> failover:(tcp://<someIP>:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&initialReconnectDelay=15000
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.