You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by dcheckoway <dc...@gmail.com> on 2011/05/01 18:00:15 UTC

InterruptedException with embedded 5.5.0 broker

Hello,

Any idea what would cause this exception (stack trace below)?  ActiveMQ
5.5.0 *embedded* broker, fwiw (I'm reluctantly using 5.5.0 despite this
error and the ConcurrentModificationException, since there's no 5.5.1
yet...hint hint).  Connection URL to two independent (non-networked) brokers
is:

failover:(tcp://mq01:61616,tcp://mq02:61616)?randomize=true

Curious what might be causing the interruption, and what this error
means...i.e. it doesn't look like any messages are being lost, but I can't
tell what the ramification (if any) is.

SEVERE; 01-May-2011 15:43:50; tid:5280; ServiceStopper logError; Could not
stop service: tcp://mq01/10.0.3.46:61616. Reason:
java.lang.InterruptedException
java.lang.InterruptedException
       at
java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1302)
       at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:253)
       at
org.apache.activemq.transport.tcp.TcpTransport.doStop(TcpTransport.java:532)
       at
org.apache.activemq.util.ServiceSupport.stop(ServiceSupport.java:69)
       at
org.apache.activemq.transport.tcp.TcpTransport.stop(TcpTransport.java:549)
       at
org.apache.activemq.transport.InactivityMonitor.stop(InactivityMonitor.java:132)
       at
org.apache.activemq.transport.TransportFilter.stop(TransportFilter.java:65)
       at
org.apache.activemq.transport.WireFormatNegotiator.stop(WireFormatNegotiator.java:91)
       at
org.apache.activemq.util.ServiceSupport.dispose(ServiceSupport.java:43)
       at
org.apache.activemq.transport.failover.FailoverTransport.disposeTransport(FailoverTransport.java:210)
       at
org.apache.activemq.transport.failover.FailoverTransport.handleTransportFailure(FailoverTransport.java:226)
       at
org.apache.activemq.transport.failover.FailoverTransport$3.onException(FailoverTransport.java:187)
       at
org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:101)
       at
org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:160)
       at
org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:265)
       at
org.apache.activemq.transport.InactivityMonitor$3.run(InactivityMonitor.java:156)
       at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
       at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
       at java.lang.Thread.run(Thread.java:662)

Thanks!  (and pretty please release 5.5.1 with the
ConcurrentModificationException fix!)
-----Dan Checkoway
dcheckoway gmail com--
View this message in context: http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3487950.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: InterruptedException with embedded 5.5.0 broker

Posted by dcheckoway <dc...@gmail.com>.
I always forget to mention something...possibly relevant bits of info:

a. This wasn't happening with 5.4.2, but is happening regularly
(intermittently) with 5.5.0.

b. The pattern this application uses is rapid-fire producing -- no consuming
on that connection.

Thanks!
-----Dan Checkoway
dcheckoway gmail com--
View this message in context: http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3487959.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: InterruptedException with embedded 5.5.0 broker

Posted by khandelwalanuj <kh...@gmail.com>.
I have also seen the same issue today.

Can someone from ActiveMQ dev team will let us know , Why this is happening
?

Thanks,
Anuj



--
View this message in context: http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p4675846.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: InterruptedException with embedded 5.5.0 broker

Posted by dcheckoway <dc...@gmail.com>.
Cool.  For the ActiveMQ developers, I just want to reiterate/clarify, this
is NOT happening at app or context or broker or executor shutdown time as
Justin suggested.  This is happening mid-run, sporadically.  5.5.0 only.

Dan

On Sun, May 1, 2011 at 3:34 PM, Justin Randall[via ActiveMQ] <
ml-node+3488380-1055209878-140184@n4.nabble.com> wrote:

> Understood.
>
> My point in commenting on InterruptedException is that it shouldn't be
> getting caught in that manner.  It means that the executor service is likely
> not getting shutdown properly.  This would be true for any application and
> isn't specific to ActiveMQ.
>
> I'll leave it to the developers to explain why the code is behaving this
> way.
>
> Regards,
>
> Justin Randall
> Sent from my BlackBerry device
>
> -----Original Message-----
> From: dcheckoway <[hidden email]<http://user/SendEmail.jtp?type=node&node=3488380&i=0&by-user=t>>
>
> Date: Sun, 1 May 2011 12:13:08
> To: <[hidden email]<http://user/SendEmail.jtp?type=node&node=3488380&i=1&by-user=t>>
>
> Reply-To: [hidden email]<http://user/SendEmail.jtp?type=node&node=3488380&i=2&by-user=t>
> Subject: Re: InterruptedException with embedded 5.5.0 broker
>
> Justin,
>
> If you look further down the stack trace, you can see it's doing failover
> disposal after some sort of wire format exception...or perhaps inactivity
> on
> the wire (which is extremely unlikely in my app, which is in a constant
> mode
> of producing messages).  I'm looking for ActiveMQ experts to let me know if
>
> this is typical in 5.5.0 and onward, since I've never seen it occur in
> prior
> versions.
>
> Dan
>
> On Sun, May 1, 2011 at 2:19 PM, Justin Randall[via ActiveMQ] <
> [hidden email]<http://user/SendEmail.jtp?type=node&node=3488380&i=3&by-user=t>>
> wrote:
>
> > Hello,
> >
> > Not being familiar with the MQ code itself but experienced in Java,
> > InterruptedException typically occurs with a thread is interrupted for
> > various reasons, but most commonly thread cancellation/shutdown.
> >
> > From the stack trace it looks like this occurred during the shutdown
> > procedure for the TCP pooled executor service.
> >
> > The fact that InterruptedException occurred is normal and should be
> > expected (anytime you shutdown an executor service InterruptedException
> > occurs on all active threads in the executor service), but it is not
> typical
> > to catch InterruptedException and print a stack trace.   Usually you
> should
> > allow InterruptedException to propagate through so that the executor
> service
> > can properly shutdown all threads.  If it is being caught and printed in
> the
> > manner as indicated below, it would cause improper thread shutdown.
>  Common
> > practices can also include catching InterruptedException, then performing
>
> > cleanup work and then re-throwing the exception or calling
> > Thread.currentThread().interrupt() when complete (allowing the
> interruption
> > to "bubble up" to the executor service).
> >
> > That said, if this is only occurring when you are shutting down MQ, while
>
> > it may not be a sign of good handling of InterruptedException, it is
> > unlikely to cause any problems.
> >
> > Regards,
> >
> > Justin Randall
> > ------Original Message------
> > From: dcheckoway
> > To: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=3488262&i=0&by-user=t>
> > ReplyTo: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=3488262&i=1&by-user=t>
> > Subject: Re: InterruptedException with embedded 5.5.0 broker
> > Sent: May 1, 2011 12:04
> >
> > I always forget to mention something...possibly relevant bits of info:
> >
> > a. This wasn't happening with 5.4.2, but is happening regularly
> > (intermittently) with 5.5.0.
> >
> > b. The pattern this application uses is rapid-fire producing -- no
> > consuming
> > on that connection.
> >
> > Thanks!
> > -----Dan Checkoway
> > dcheckoway gmail com--
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3487959.html<http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3487959.html?by-user=t><http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3487959.html%3Chttp://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3487959.html?by-user=t%3E&by-user=t>
>
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
> >
> >
> > Sent from my BlackBerry device
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
>
> > below:
> >
> >
> http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3488262.html<http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3488262.html?by-user=t>
> >  To unsubscribe from InterruptedException with embedded 5.5.0 broker,
> click
> > here<
> >
> >
>
> -----Dan Checkoway
> dcheckoway gmail com--
> View this message in context:
> http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3488342.html<http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3488342.html?by-user=t>
>
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3488380.html
>  To unsubscribe from InterruptedException with embedded 5.5.0 broker, click
> here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3487950&code=ZGNoZWNrb3dheUBnbWFpbC5jb218MzQ4Nzk1MHw3MDc4NzEwMTU=>.
>
>

-----Dan Checkoway
dcheckoway gmail com--
View this message in context: http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3488673.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: InterruptedException with embedded 5.5.0 broker

Posted by Justin Randall <ra...@hotmail.com>.
Understood.

My point in commenting on InterruptedException is that it shouldn't be getting caught in that manner.  It means that the executor service is likely not getting shutdown properly.  This would be true for any application and isn't specific to ActiveMQ.

I'll leave it to the developers to explain why the code is behaving this way.

Regards,

Justin Randall
Sent from my BlackBerry device

-----Original Message-----
From: dcheckoway <dc...@gmail.com>
Date: Sun, 1 May 2011 12:13:08 
To: <us...@activemq.apache.org>
Reply-To: users@activemq.apache.org
Subject: Re: InterruptedException with embedded 5.5.0 broker

Justin,

If you look further down the stack trace, you can see it's doing failover
disposal after some sort of wire format exception...or perhaps inactivity on
the wire (which is extremely unlikely in my app, which is in a constant mode
of producing messages).  I'm looking for ActiveMQ experts to let me know if
this is typical in 5.5.0 and onward, since I've never seen it occur in prior
versions.

Dan

On Sun, May 1, 2011 at 2:19 PM, Justin Randall[via ActiveMQ] <
ml-node+3488262-603559487-140184@n4.nabble.com> wrote:

> Hello,
>
> Not being familiar with the MQ code itself but experienced in Java,
> InterruptedException typically occurs with a thread is interrupted for
> various reasons, but most commonly thread cancellation/shutdown.
>
> From the stack trace it looks like this occurred during the shutdown
> procedure for the TCP pooled executor service.
>
> The fact that InterruptedException occurred is normal and should be
> expected (anytime you shutdown an executor service InterruptedException
> occurs on all active threads in the executor service), but it is not typical
> to catch InterruptedException and print a stack trace.   Usually you should
> allow InterruptedException to propagate through so that the executor service
> can properly shutdown all threads.  If it is being caught and printed in the
> manner as indicated below, it would cause improper thread shutdown.  Common
> practices can also include catching InterruptedException, then performing
> cleanup work and then re-throwing the exception or calling
> Thread.currentThread().interrupt() when complete (allowing the interruption
> to "bubble up" to the executor service).
>
> That said, if this is only occurring when you are shutting down MQ, while
> it may not be a sign of good handling of InterruptedException, it is
> unlikely to cause any problems.
>
> Regards,
>
> Justin Randall
> ------Original Message------
> From: dcheckoway
> To: [hidden email]<http://user/SendEmail.jtp?type=node&node=3488262&i=0&by-user=t>
> ReplyTo: [hidden email]<http://user/SendEmail.jtp?type=node&node=3488262&i=1&by-user=t>
> Subject: Re: InterruptedException with embedded 5.5.0 broker
> Sent: May 1, 2011 12:04
>
> I always forget to mention something...possibly relevant bits of info:
>
> a. This wasn't happening with 5.4.2, but is happening regularly
> (intermittently) with 5.5.0.
>
> b. The pattern this application uses is rapid-fire producing -- no
> consuming
> on that connection.
>
> Thanks!
> -----Dan Checkoway
> dcheckoway gmail com--
> View this message in context:
> http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3487959.html<http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3487959.html?by-user=t>
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
>
> Sent from my BlackBerry device
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3488262.html
>  To unsubscribe from InterruptedException with embedded 5.5.0 broker, click
> here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3487950&code=ZGNoZWNrb3dheUBnbWFpbC5jb218MzQ4Nzk1MHw3MDc4NzEwMTU=>.
>
>

-----Dan Checkoway
dcheckoway gmail com--
View this message in context: http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3488342.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: InterruptedException with embedded 5.5.0 broker

Posted by dcheckoway <dc...@gmail.com>.
Justin,

If you look further down the stack trace, you can see it's doing failover
disposal after some sort of wire format exception...or perhaps inactivity on
the wire (which is extremely unlikely in my app, which is in a constant mode
of producing messages).  I'm looking for ActiveMQ experts to let me know if
this is typical in 5.5.0 and onward, since I've never seen it occur in prior
versions.

Dan

On Sun, May 1, 2011 at 2:19 PM, Justin Randall[via ActiveMQ] <
ml-node+3488262-603559487-140184@n4.nabble.com> wrote:

> Hello,
>
> Not being familiar with the MQ code itself but experienced in Java,
> InterruptedException typically occurs with a thread is interrupted for
> various reasons, but most commonly thread cancellation/shutdown.
>
> From the stack trace it looks like this occurred during the shutdown
> procedure for the TCP pooled executor service.
>
> The fact that InterruptedException occurred is normal and should be
> expected (anytime you shutdown an executor service InterruptedException
> occurs on all active threads in the executor service), but it is not typical
> to catch InterruptedException and print a stack trace.   Usually you should
> allow InterruptedException to propagate through so that the executor service
> can properly shutdown all threads.  If it is being caught and printed in the
> manner as indicated below, it would cause improper thread shutdown.  Common
> practices can also include catching InterruptedException, then performing
> cleanup work and then re-throwing the exception or calling
> Thread.currentThread().interrupt() when complete (allowing the interruption
> to "bubble up" to the executor service).
>
> That said, if this is only occurring when you are shutting down MQ, while
> it may not be a sign of good handling of InterruptedException, it is
> unlikely to cause any problems.
>
> Regards,
>
> Justin Randall
> ------Original Message------
> From: dcheckoway
> To: [hidden email]<http://user/SendEmail.jtp?type=node&node=3488262&i=0&by-user=t>
> ReplyTo: [hidden email]<http://user/SendEmail.jtp?type=node&node=3488262&i=1&by-user=t>
> Subject: Re: InterruptedException with embedded 5.5.0 broker
> Sent: May 1, 2011 12:04
>
> I always forget to mention something...possibly relevant bits of info:
>
> a. This wasn't happening with 5.4.2, but is happening regularly
> (intermittently) with 5.5.0.
>
> b. The pattern this application uses is rapid-fire producing -- no
> consuming
> on that connection.
>
> Thanks!
> -----Dan Checkoway
> dcheckoway gmail com--
> View this message in context:
> http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3487959.html<http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3487959.html?by-user=t>
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
>
> Sent from my BlackBerry device
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3488262.html
>  To unsubscribe from InterruptedException with embedded 5.5.0 broker, click
> here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3487950&code=ZGNoZWNrb3dheUBnbWFpbC5jb218MzQ4Nzk1MHw3MDc4NzEwMTU=>.
>
>

-----Dan Checkoway
dcheckoway gmail com--
View this message in context: http://activemq.2283324.n4.nabble.com/InterruptedException-with-embedded-5-5-0-broker-tp3487950p3488342.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.