You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Chris <ch...@gmail.com> on 2013/06/05 23:15:34 UTC

ActiveMQ-CPP v3.7.0 : how to close a connection blocked inside a start() when using failover

Hi,

I have a situation in which i need to close a client cms::connection block
inside a cms::connection::start(), from a different thread. In this case, no
broker as been started yet and i'm using failover. so the thread is blocked
inside connection.start() (which is expected). However to close and
terminate this connection, i tried calling cms::connection::close() on this
connection (from a different thread) and expecting a cms::Exception, but
this seems to be failing (see stack trace below).

What is the correct way to close a connection that is blocked inside a
connection::start() ?

R6025
- pure virtual function call

06/03/2013 11:59:02 **** STACK TRACE **** called from conntest.cpp line: 39

Thread 0x1cc8  7368
ZwGetContextThread
autopsy \utility.cpp (1078) 19 bytes
Purecall \conntest.cpp (39) 13 bytes
_purecall f:\dd\vctools\crt_bld\self_x86\crt\src\purevirt.c (54) 0 bytes
decaf::util::concurrent::Lock::lock \decaf\util\concurrent\lock.cpp (55) 0
bytes
decaf::util::concurrent::Lock::Lock \decaf\util\concurrent\lock.cpp (34) 0
bytes
`anonymous namespace'::ResponseFinalizer::~ResponseFinalizer
\activemq-cpp-library-3.7.0\src\main\activemq\transport\correlator\responsecorrelator.cpp
(64) 25 bytes
activemq::transport::correlator::ResponseCorrelator::request
\activemq-cpp-library-3.7.0\src\main\activemq\transport\correlator\responsecorrelator.cpp
(228) 51 bytes
activemq::core::ActiveMQConnection::syncRequest
\activemq-cpp-library-3.7.0\src\main\activemq\core\activemqconnection.cpp
(1271) 84 bytes
activemq::core::ActiveMQConnection::ensureConnectionInfoSent
\activemq-cpp-library-3.7.0\src\main\activemq\core\activemqconnection.cpp
(1352) 58 bytes
activemq::core::ActiveMQConnection::start \activemq-cpp- library
3.7.0\src\main\activemq\core\activemqconnection.cpp (857) 0 bytes




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-CPP-v3-7-0-how-to-close-a-connection-blocked-inside-a-start-when-using-failover-tp4667937.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ-CPP v3.7.0 : how to close a connection blocked inside a start() when using failover

Posted by Timothy Bish <ta...@gmail.com>.
On 06/07/2013 11:27 AM, Chris wrote:
> Hi Timothy,
>
> Thanks for your quick reply. I tried using stop(), but got the same
> result... i appears the mutex gets deleted, and this result in the r6025
> failure, since synchronisable object is an abstract class.
>
> Are you aware of any other method to abort the start() at the moment? (a
> workaround that would allow me to close() the connection later on)
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-CPP-v3-7-0-how-to-close-a-connection-blocked-inside-a-start-when-using-failover-tp4667937p4668008.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Not sure, you'd have to look into the code, I can't remember if there is 
any timeouts that apply to this case.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/

www.camelone.org : The open source integration conference:


Re: ActiveMQ-CPP v3.7.0 : how to close a connection blocked inside a start() when using failover

Posted by Chris <ch...@gmail.com>.
Hi Timothy,

Thanks for your quick reply. I tried using stop(), but got the same
result... i appears the mutex gets deleted, and this result in the r6025
failure, since synchronisable object is an abstract class.

Are you aware of any other method to abort the start() at the moment? (a
workaround that would allow me to close() the connection later on)





--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-CPP-v3-7-0-how-to-close-a-connection-blocked-inside-a-start-when-using-failover-tp4667937p4668008.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ-CPP v3.7.0 : how to close a connection blocked inside a start() when using failover

Posted by Timothy Bish <ta...@gmail.com>.
On 06/05/2013 05:15 PM, Chris wrote:
> Hi,
>
> I have a situation in which i need to close a client cms::connection block
> inside a cms::connection::start(), from a different thread. In this case, no
> broker as been started yet and i'm using failover. so the thread is blocked
> inside connection.start() (which is expected). However to close and
> terminate this connection, i tried calling cms::connection::close() on this
> connection (from a different thread) and expecting a cms::Exception, but
> this seems to be failing (see stack trace below).
>
> What is the correct way to close a connection that is blocked inside a
> connection::start() ?
>
> R6025
> - pure virtual function call
>
> 06/03/2013 11:59:02 **** STACK TRACE **** called from conntest.cpp line: 39
>
> Thread 0x1cc8  7368
> ZwGetContextThread
> autopsy \utility.cpp (1078) 19 bytes
> Purecall \conntest.cpp (39) 13 bytes
> _purecall f:\dd\vctools\crt_bld\self_x86\crt\src\purevirt.c (54) 0 bytes
> decaf::util::concurrent::Lock::lock \decaf\util\concurrent\lock.cpp (55) 0
> bytes
> decaf::util::concurrent::Lock::Lock \decaf\util\concurrent\lock.cpp (34) 0
> bytes
> `anonymous namespace'::ResponseFinalizer::~ResponseFinalizer
> \activemq-cpp-library-3.7.0\src\main\activemq\transport\correlator\responsecorrelator.cpp
> (64) 25 bytes
> activemq::transport::correlator::ResponseCorrelator::request
> \activemq-cpp-library-3.7.0\src\main\activemq\transport\correlator\responsecorrelator.cpp
> (228) 51 bytes
> activemq::core::ActiveMQConnection::syncRequest
> \activemq-cpp-library-3.7.0\src\main\activemq\core\activemqconnection.cpp
> (1271) 84 bytes
> activemq::core::ActiveMQConnection::ensureConnectionInfoSent
> \activemq-cpp-library-3.7.0\src\main\activemq\core\activemqconnection.cpp
> (1352) 58 bytes
> activemq::core::ActiveMQConnection::start \activemq-cpp- library
> 3.7.0\src\main\activemq\core\activemqconnection.cpp (857) 0 bytes
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-CPP-v3-7-0-how-to-close-a-connection-blocked-inside-a-start-when-using-failover-tp4667937.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Could be a bug, best thing to do is create a unit test for the 
integration package and open a new Jira.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/

www.camelone.org : The open source integration conference: