You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by bozimmerman <bo...@zimmers.net> on 2008/07/02 17:48:31 UTC

Fixed Ab-end in latest public release.

Forgive me if this is already known.

On both solarisx86 and linux platforms, version 2.1.3 public release.

My code looks like this:

activemq::core::ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory(URL);
cms::Connection connection = connectionFactory->createConnection();
connection->start();

Problem: the start command above would cause my application to ab-end...
VERY infrequently... I would normally have to connect repeatedly every 30
secs or so for a whole day to see the problem.

Cause: In ResponseCorrelator::request method: 

futureResponse->wait( maxResponseWaitTime ) would time-out (the full default
3 seconds went by), and 

response = futureResponse->getResponse() would return null.

Now, at the bottom, after response is checked for null, 

throw CommandIOException( __FILE__, __LINE__,
    "No valid response received for command: %s, check broker.",
    command->toString().c_str() );

would cause the crash in my application.  I suspect (but did not confirm)
that command->toString() is either crashing itself, or returning null or a
bad buffer pointer.  Since its just an exception message, I didn't really
care.

Fix:
throw CommandIOException( __FILE__, __LINE__, "No valid response received
for command, check broker.");

Verified: I ran my tests, and after 15 hours of continuous running I got
exactly one timeout on connection->start().  However, unlike all the other
times, no ab-end was observed and my application recovered and reconnected
normally after catching the exception.

Please do with what you will.  Have a good day!

- Bo Zimmerman
-- 
View this message in context: http://www.nabble.com/Fixed-Ab-end-in-latest-public-release.-tp18240676p18240676.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


RE: Fixed Ab-end in latest public release.

Posted by "Bish, Tim" <Ti...@Sensis.com>.
Please feel free to create a Jira Issue to capture this along with your
fix comments, that way it won't slip through the cracks.  Also v2.2 is
out with several fixes in the Socket code and error handling which might
be helpful.

Regards
Tim.

> -----Original Message-----
> From: bozimmerman [mailto:bo@zimmers.net]
> Sent: Wednesday, July 02, 2008 11:49 AM
> To: dev@activemq.apache.org
> Subject: Fixed Ab-end in latest public release.
> 
> 
> Forgive me if this is already known.
> 
> On both solarisx86 and linux platforms, version 2.1.3 public release.
> 
> My code looks like this:
> 
> activemq::core::ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory(URL);
> cms::Connection connection = connectionFactory->createConnection();
> connection->start();
> 
> Problem: the start command above would cause my application to
ab-end...
> VERY infrequently... I would normally have to connect repeatedly every
30
> secs or so for a whole day to see the problem.
> 
> Cause: In ResponseCorrelator::request method:
> 
> futureResponse->wait( maxResponseWaitTime ) would time-out (the full
> default
> 3 seconds went by), and
> 
> response = futureResponse->getResponse() would return null.
> 
> Now, at the bottom, after response is checked for null,
> 
> throw CommandIOException( __FILE__, __LINE__,
>     "No valid response received for command: %s, check broker.",
>     command->toString().c_str() );
> 
> would cause the crash in my application.  I suspect (but did not
confirm)
> that command->toString() is either crashing itself, or returning null
or a
> bad buffer pointer.  Since its just an exception message, I didn't
really
> care.
> 
> Fix:
> throw CommandIOException( __FILE__, __LINE__, "No valid response
received
> for command, check broker.");
> 
> Verified: I ran my tests, and after 15 hours of continuous running I
got
> exactly one timeout on connection->start().  However, unlike all the
other
> times, no ab-end was observed and my application recovered and
reconnected
> normally after catching the exception.
> 
> Please do with what you will.  Have a good day!
> 
> - Bo Zimmerman
> --
> View this message in context: http://www.nabble.com/Fixed-Ab-end-in-
> latest-public-release.-tp18240676p18240676.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.