hi Eric,
this is classic dead lock, and it is a bug in AMQCPP, as Rob said, file
a bug fix, but here is what is going on
thread 1, in line
#9 0x00506316 in activemq::connector::openwire::OpenWireConnector::close
it has acquired the lock
synchronized( &mutex )
then it calls
transport->close();
and this calls
thread->join();
thread in this case is your thread 2.
thread 2, in line
#16 0x0052678f in activemq::transport::IOTransport::run (this=0xb7e02410) at
has caught an exception and it invoking onTransportException,
and this is calling
activemq::connector::openwire::OpenWireConnector::onTransportException
and this is calling
synchronized( &mutex ) {
and that's where the dead lock is put in place.
this bug was introduced in
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireConnector.cpp?view=diff&r1=630692&r2=630693
when the mutex was added in, but the threading wasn't considered
Filip
[EMAIL PROTECTED] wrote:
we use ActiveMQ 2.2 now and the issus occurs again
we have the thread info as follows:
thread 1: the thread in our application which call the ActiveMQ cpp.
#0 0x009517a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x001f20fd in pthread_join () from /lib/tls/libpthread.so.0
#2 0x00d48b09 in apr_thread_join (retval=0xfffffffc, thd=0x82cda20) at
threadproc/unix/thread.c:217
#3 0x00567b7f in decaf::lang::Thread::join (this=0xb7e026c8) at
decaf/lang/Thread.cpp:87
#4 0x00525e8d in activemq::transport::IOTransport::close (this=0xb7e02410)
at activemq/transport/IOTransport.cpp:163
#5 0x005314bb in activemq::transport::filters::TcpTransport::close
(this=0xb7e01fe0) at ./activemq/transport/TransportFilter.h:209
#6 0x0052edf1 in activemq::transport::filters::AsyncSendTransport::close
(this=0xb7e021e8) at activemq/transport/filters/AsyncSendTransport.cpp:96
#7 0x0052a9a5 in activemq::transport::filters::ResponseCorrelator::close
(this=0xb7e00878)
at activemq/transport/filters/ResponseCorrelator.cpp:252
#8 0x0050166d in
activemq::connector::openwire::OpenWireFormatNegotiator::close
(this=0xb7e02610)
at activemq/connector/openwire/OpenWireFormatNegotiator.cpp:228
#9 0x00506316 in activemq::connector::openwire::OpenWireConnector::close
(this=0xb7e019e8)
at activemq/connector/openwire/OpenWireConnector.cpp:177
#10 0x005089db in ~OpenWireConnector (this=0xb7e019e8) at
activemq/connector/openwire/OpenWireConnector.cpp:116
#11 0x004ac5d0 in
activemq::core::ActiveMQConnectionFactory::createConnection
([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED]) at activemq/core/ActiveMQConnectionFactory.cpp:177
#12 0x004acbf2 in
activemq::core::ActiveMQConnectionFactory::createConnection
(this=0xb7e00b38) at activemq/core/ActiveMQConnectionFactory.cpp:67
#13 0x0807aefd in CCommonActiveMQConnector::CreateConnection
(this=0xb7e01ce8) at CommonActiveMQConnector.cpp:358
thread 2: the ActiveMQ thread.
#0 0x009517a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x001f61de in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0
#2 0x001f2e47 in _L_mutex_lock_179 () from /lib/tls/libpthread.so.0
#3 0x0237f1a8 in ?? ()
#4 0x00d4d92c in ?? () from /opt/webex/tricon/bin/libapr-1.so.0
#5 0xb7e01a3c in ?? ()
#6 0x0237fbb0 in ?? ()
#7 0x0237f1b8 in ?? ()
#8 0x00d3dea7 in apr_thread_mutex_lock (mutex=0x82c58dc) at
locks/unix/thread_mutex.c:92
#9 0x00d3dea7 in apr_thread_mutex_lock (mutex=0x82c58d8) at
locks/unix/thread_mutex.c:92
#10 0x00581671 in decaf::util::concurrent::Mutex::lock (this=0x1f61de) at
decaf/util/concurrent/Mutex.cpp:53
#11 0x00505349 in
activemq::connector::openwire::OpenWireConnector::onTransportException
(this=0xb7e019e8, source=0xb7e02610, [EMAIL PROTECTED])
at ./decaf/util/concurrent/Lock.h:94
#12 0x00502331 in
activemq::connector::openwire::OpenWireFormatNegotiator::onTransportException
(this=0xb7e02610, source=0xb7e00878, [EMAIL PROTECTED])
at ./activemq/transport/TransportFilter.h:74
#13 0x00524919 in activemq::transport::TransportFilter::onTransportException
(this=0xb7e00878, source=0xb7e021e8, [EMAIL PROTECTED])
at activemq/transport/TransportFilter.h:74
#14 0x00524919 in activemq::transport::TransportFilter::onTransportException
(this=0xb7e021e8, source=0xb7e01fe0, [EMAIL PROTECTED])
at activemq/transport/TransportFilter.h:74
#15 0x00524919 in activemq::transport::TransportFilter::onTransportException
(this=0xb7e01fe0, source=0xb7e02410, [EMAIL PROTECTED])
at activemq/transport/TransportFilter.h:74
#16 0x0052678f in activemq::transport::IOTransport::run (this=0xb7e02410) at
activemq/transport/IOTransport.h:105
#17 0x00567c59 in decaf::lang::Thread::runCallback (self=0x82cda20,
param=0xb7e026c8) at decaf/lang/Thread.cpp:113
#18 0x00d489a4 in dummy_worker (opaque=0xfffffffc) at
threadproc/unix/thread.c:142
#19 0x001f1371 in start_thread () from /lib/tls/libpthread.so.0
#20 0x00853ffe in clone () from /lib/tls/libc.so.6
[EMAIL PROTECTED] wrote:
thanks for caring,
the answer is :yes. we use activeMQ cpp 2.1.3 . and the version of the
activeMq broker is 5.5.
rajdavies wrote:
Do you mean the cpp client? - what version is the activemq broker ?
On 18 Aug 2008, at 07:48, [EMAIL PROTECTED] wrote:
we use client activeMq2.1 .
the logic flow is as follows:
step1:there will be disconnection with activeMq server in about 5
minutes,
step2:a onexception to activeMQ client ,then client reconnect to the
activeMQ server.
step3:reconnect ok and return to step1.
the issue is :after about 300--400 times successful reconnection, the
Client Hangs up.
is there anyone know this issue and how to correct it
thanks.
--
View this message in context:
http://www.nabble.com/activeMq-hangs-after-long-time-using-tp19026674p19026674.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.