activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henrique Magarotto (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AMQCPP-356) Auto-Acknowledge consumer using MessageListener freezes on destructor
Date Thu, 17 Mar 2011 17:56:29 GMT

     [ https://issues.apache.org/jira/browse/AMQCPP-356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henrique Magarotto updated AMQCPP-356:
--------------------------------------

    Description: 
Consumer freezes on destructor.

Maybe related to issue AMQCPP-355.
First reported by Óscar Pernas Plaza (http://activemq.2283324.n4.nabble.com/AMQCPP-Closing-consumer-freezes-if-broker-is-stopped-while-is-consuming-tt3319403.html).

How to reproduce (using test code attached in AMQCPP-354 issue):

1- Apply simple change in test code (attached in AMQCPP-354):
@@ -440,6 +440,7 @@
             if(_delay) {
                 std::cout<<"Starting delay..."<<std::endl;
                 stopCheck(_delay);
+                std::cout<<"Delay finish..."<<std::endl;
             }
 
         } catch (CMSException& e) {
@@ -561,7 +562,7 @@
 
     void loadEndPoins() {
         for(int i=0; i<_consumer;i++) {
-            _endPointList.push_back( new Consumer(&_poolManager,"TEST.FOO",_delay,_useListener)
);
+            _endPointList.push_back( new Consumer(&_poolManager,"TEST.FOO",_delay,_useListener,false)
);
         }
         for(int i=0; i<_producer;i++) {
             _endPointList.push_back( new Producer(&_poolManager,"TEST.FOO",_delay,_numMessages)
);

2- Start ActiveMQ
3- Start 'MessageListener' consumer './activemqTest -l -c1 -d10000'
4- Send one message './activemqTest -p1'
5- Wait consumer 'Starting delay'
6- Stop ActiveMQ
7- Wait consumer delay finishes 'Delay finish'
8- Try kill consumer
9- Freezes

BACKTRACE:

Thread 1:
#0  0x0079b422 in __kernel_vsyscall ()
#1  0x008bfb5d in pthread_join (threadid=3061021552, thread_return=0xbfbff07c) at pthread_join.c:89
#2  0x0132a3c0 in decaf::lang::Thread::join (this=0x9be0574) at decaf/lang/Thread.cpp:421
#3  0x0804ca15 in AppTest::joinEndPoins (this=0xbfbff104) at main.cpp:587
#4  0x0804c69c in AppTest::run (this=0xbfbff104) at main.cpp:556
#5  0x0804a33c in main (argc=4, argv=0xbfbff224) at main.cpp:634

Thread 2:
#0  0x0079b422 in __kernel_vsyscall ()
#1  0x008c3015 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2  0x004ed9dd in __pthread_cond_wait (cond=0x9bd6e38, mutex=0x9bd6e08) at forward.c:139
#3  0x012f86a9 in decaf::internal::util::concurrent::ConditionImpl::wait (condition=0x9bd6e38)
at decaf/internal/util/concurrent/unix/ConditionImpl.cpp:94
#4  0x01369353 in decaf::util::concurrent::Mutex::wait (this=0x9bd6d6c) at decaf/util/concurrent/Mutex.cpp:95
#5  0x010949c5 in activemq::threads::CompositeTaskRunner::run (this=0x9bd6d48) at activemq/threads/CompositeTaskRunner.cpp:118
#6  0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9bd6e90) at decaf/lang/Thread.cpp:135
#7  0x0132a847 in threadWorker (arg=0x9bd6e90) at decaf/lang/Thread.cpp:188
#8  0x008be96e in start_thread (arg=0xb7739b70) at pthread_create.c:300
#9  0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3:
#0  0x0079b422 in __kernel_vsyscall ()
#1  0x008c5af9 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
#2  0x008c113b in _L_lock_748 () from /lib/tls/i686/cmov/libpthread.so.0
#3  0x008c0f61 in __pthread_mutex_lock (mutex=0x9be12d8) at pthread_mutex_lock.c:61
#4  0x004edba6 in pthread_mutex_lock (mutex=0x9be12d8) at forward.c:182
#5  0x012f8aa1 in decaf::internal::util::concurrent::MutexImpl::lock (handle=0x9be12d8) at
decaf/internal/util/concurrent/unix/MutexImpl.cpp:71
#6  0x01369412 in decaf::util::concurrent::Mutex::lock (this=0x9be11ec) at decaf/util/concurrent/Mutex.cpp:75
#7  0x0105d770 in decaf::util::StlQueue<decaf::lang::Pointer<activemq::commands::MessageDispatch,
decaf::util::concurrent::atomic::AtomicRefCounter> >::lock (this=0x9be11d8)
    at ./decaf/util/StlQueue.h:253
#8  activemq::core::MessageDispatchChannel::lock (this=0x9be11d8) at activemq/core/MessageDispatchChannel.h:153
#9  0x01368ab5 in decaf::util::concurrent::Lock::lock (this=0xb6f37fe4) at decaf/util/concurrent/Lock.cpp:54
#10 0x01368c08 in Lock (this=0xfffffe00, object=0x9be12d8, intiallyLocked=true) at decaf/util/concurrent/Lock.cpp:32
#11 0x01026102 in activemq::core::ActiveMQConsumer::clearMessagesInProgress (this=0x9be11a0)
at activemq/core/ActiveMQConsumer.cpp:1112
#12 0x0104715c in activemq::core::ActiveMQSession::clearMessagesInProgress (this=0x9be0b90)
at activemq/core/ActiveMQSession.cpp:239
#13 0x01010543 in activemq::core::ActiveMQConnection::transportInterrupted (this=0x9bd7210)
at activemq/core/ActiveMQConnection.cpp:704
#14 0x0109bb34 in activemq::transport::TransportFilter::transportInterrupted (this=0x9bd71c0)
at activemq/transport/TransportFilter.cpp:67
#15 0x010b07ae in activemq::transport::failover::FailoverTransport::handleTransportFailure
(this=0x9bd6a38, error=...) at activemq/transport/failover/FailoverTransport.cpp:476
#16 0x010bc06c in activemq::transport::failover::FailoverTransportListener::onException (this=0x9bd6878,
ex=...) at activemq/transport/failover/FailoverTransportListener.cpp:97
#17 0x0109bc0b in activemq::transport::TransportFilter::fire (this=0x9bd8ec8, ex=...) at activemq/transport/TransportFilter.cpp:49
#18 0x0109bc64 in activemq::transport::TransportFilter::onException (this=0x9bd8ec8, ex=...)
at activemq/transport/TransportFilter.cpp:41
#19 0x0109bc0b in activemq::transport::TransportFilter::fire (this=0x9bd8938, ex=...) at activemq/transport/TransportFilter.cpp:49
#20 0x0109bc64 in activemq::transport::TransportFilter::onException (this=0x9bd8938, ex=...)
at activemq/transport/TransportFilter.cpp:41
#21 0x01099b13 in activemq::transport::IOTransport::fire (this=0x9bd88e8, ex=...) at activemq/transport/IOTransport.cpp:73
#22 0x0109a3bf in activemq::transport::IOTransport::run (this=0x9bd88e8) at activemq/transport/IOTransport.cpp:246
#23 0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9bd8fe8) at decaf/lang/Thread.cpp:135
#24 0x0132a847 in threadWorker (arg=0x9bd8fe8) at decaf/lang/Thread.cpp:188
#25 0x008be96e in start_thread (arg=0xb6f38b70) at pthread_create.c:300
#26 0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4:
#0  0x0079b422 in __kernel_vsyscall ()
#1  0x008c5af9 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
#2  0x008c113b in _L_lock_748 () from /lib/tls/i686/cmov/libpthread.so.0
#3  0x008c0f61 in __pthread_mutex_lock (mutex=0x9be12d8) at pthread_mutex_lock.c:61
#4  0x004edba6 in pthread_mutex_lock (mutex=0x9be12d8) at forward.c:182
#5  0x012f8aa1 in decaf::internal::util::concurrent::MutexImpl::lock (handle=0x9be12d8) at
decaf/internal/util/concurrent/unix/MutexImpl.cpp:71
#6  0x01369412 in decaf::util::concurrent::Mutex::lock (this=0x9be11ec) at decaf/util/concurrent/Mutex.cpp:75
#7  0x01036830 in decaf::util::StlQueue<decaf::lang::Pointer<activemq::commands::MessageDispatch,
decaf::util::concurrent::atomic::AtomicRefCounter> >::lock (this=0x9be11e0)
    at ./decaf/util/StlQueue.h:253
#8  0x01368ab5 in decaf::util::concurrent::Lock::lock (this=0xb6737064) at decaf/util/concurrent/Lock.cpp:54
#9  0x01368c08 in Lock (this=0xfffffe00, object=0x9be12d8, intiallyLocked=true) at decaf/util/concurrent/Lock.cpp:32
#10 0x0105c507 in activemq::core::MessageDispatchChannel::clear (this=0x9be11d8) at activemq/core/MessageDispatchChannel.cpp:143
#11 0x0102ec37 in activemq::core::ActiveMQConsumer::doClose (this=0x9be11a0) at activemq/core/ActiveMQConsumer.cpp:335
#12 0x0102fb00 in activemq::core::ActiveMQConsumer::close (this=0x9be11a0) at activemq/core/ActiveMQConsumer.cpp:309
#13 0x01030390 in ~ActiveMQConsumer (this=0x9be11a0, __in_chrg=<value optimized out>)
at activemq/core/ActiveMQConsumer.cpp:261
#14 0x0804c276 in Consumer::cleanup (this=0x9be0570) at main.cpp:469
#15 0x0804bcdd in Consumer::run (this=0x9be0570) at main.cpp:394
#16 0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9be05b0) at decaf/lang/Thread.cpp:135
#17 0x0132a847 in threadWorker (arg=0x9be05b0) at decaf/lang/Thread.cpp:188
#18 0x008be96e in start_thread (arg=0xb6737b70) at pthread_create.c:300
#19 0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 5:
#0  0x0079b422 in __kernel_vsyscall ()
#1  0x008c5af9 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
#2  0x008c113b in _L_lock_748 () from /lib/tls/i686/cmov/libpthread.so.0
#3  0x008c0f61 in __pthread_mutex_lock (mutex=0x9bd65e0) at pthread_mutex_lock.c:61
#4  0x004edba6 in pthread_mutex_lock (mutex=0x9bd65e0) at forward.c:182
#5  0x012f8aa1 in decaf::internal::util::concurrent::MutexImpl::lock (handle=0x9bd65e0) at
decaf/internal/util/concurrent/unix/MutexImpl.cpp:71
#6  0x01369412 in decaf::util::concurrent::Mutex::lock (this=0x9bd6a88) at decaf/util/concurrent/Mutex.cpp:75
#7  0x01368ab5 in decaf::util::concurrent::Lock::lock (this=0xb5f35ea0) at decaf/util/concurrent/Lock.cpp:54
#8  0x01368c08 in Lock (this=0xfffffe00, object=0x9bd65e0, intiallyLocked=true) at decaf/util/concurrent/Lock.cpp:32
#9  0x010b38fd in activemq::transport::failover::FailoverTransport::oneway (this=0x9bd6a38,
command=...) at activemq/transport/failover/FailoverTransport.cpp:186
#10 0x0109ff9f in activemq::transport::correlator::ResponseCorrelator::oneway (this=0x9bd71c0,
command=...) at activemq/transport/correlator/ResponseCorrelator.cpp:82
#11 0x010093be in activemq::core::ActiveMQConnection::oneway (this=0x9bd7210, command=...)
at activemq/core/ActiveMQConnection.cpp:741
#12 0x01048a4f in activemq::core::ActiveMQSession::oneway (this=0x9be0b90, command=...) at
activemq/core/ActiveMQSession.cpp:903
#13 0x01030df4 in activemq::core::ActiveMQConsumer::afterMessageIsConsumed (this=0x9be11a0,
message=..., messageExpired=false) at activemq/core/ActiveMQConsumer.cpp:642
#14 0x01031743 in activemq::core::ActiveMQConsumer::dispatch (this=0x9be11a0, dispatch=...)
at activemq/core/ActiveMQConsumer.cpp:1021
#15 0x010555c3 in activemq::core::ActiveMQSessionExecutor::dispatch (this=0x9be0dc8, dispatch=...)
at activemq/core/ActiveMQSessionExecutor.cpp:129
#16 0x01055993 in activemq::core::ActiveMQSessionExecutor::iterate (this=0x9be0dc8) at activemq/core/ActiveMQSessionExecutor.cpp:166
#17 0x010987f3 in activemq::threads::DedicatedTaskRunner::run (this=0x9be1480) at activemq/threads/DedicatedTaskRunner.cpp:111
#18 0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9be0ad8) at decaf/lang/Thread.cpp:135
#19 0x0132a847 in threadWorker (arg=0x9be0ad8) at decaf/lang/Thread.cpp:188
#20 0x008be96e in start_thread (arg=0xb5f36b70) at pthread_create.c:300
#21 0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130


  was:
Consumer freezes on destructor.

Maybe related to issue AMQ-355.
First reported by Óscar Pernas Plaza (http://activemq.2283324.n4.nabble.com/AMQCPP-Closing-consumer-freezes-if-broker-is-stopped-while-is-consuming-tt3319403.html).

How to reproduce (using test code attached in AMQ-354 issue):

1- Apply simple change in test code (attached in AMQ-354):
@@ -440,6 +440,7 @@
             if(_delay) {
                 std::cout<<"Starting delay..."<<std::endl;
                 stopCheck(_delay);
+                std::cout<<"Delay finish..."<<std::endl;
             }
 
         } catch (CMSException& e) {
@@ -561,7 +562,7 @@
 
     void loadEndPoins() {
         for(int i=0; i<_consumer;i++) {
-            _endPointList.push_back( new Consumer(&_poolManager,"TEST.FOO",_delay,_useListener)
);
+            _endPointList.push_back( new Consumer(&_poolManager,"TEST.FOO",_delay,_useListener,false)
);
         }
         for(int i=0; i<_producer;i++) {
             _endPointList.push_back( new Producer(&_poolManager,"TEST.FOO",_delay,_numMessages)
);

2- Start ActiveMQ
3- Start 'MessageListener' consumer './activemqTest -l -c1 -d10000'
4- Send one message './activemqTest -p1'
5- Wait consumer 'Starting delay'
6- Stop ActiveMQ
7- Wait consumer delay finishes 'Delay finish'
8- Try kill consumer
9- Freezes

BACKTRACE:

Thread 1:
#0  0x0079b422 in __kernel_vsyscall ()
#1  0x008bfb5d in pthread_join (threadid=3061021552, thread_return=0xbfbff07c) at pthread_join.c:89
#2  0x0132a3c0 in decaf::lang::Thread::join (this=0x9be0574) at decaf/lang/Thread.cpp:421
#3  0x0804ca15 in AppTest::joinEndPoins (this=0xbfbff104) at main.cpp:587
#4  0x0804c69c in AppTest::run (this=0xbfbff104) at main.cpp:556
#5  0x0804a33c in main (argc=4, argv=0xbfbff224) at main.cpp:634

Thread 2:
#0  0x0079b422 in __kernel_vsyscall ()
#1  0x008c3015 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2  0x004ed9dd in __pthread_cond_wait (cond=0x9bd6e38, mutex=0x9bd6e08) at forward.c:139
#3  0x012f86a9 in decaf::internal::util::concurrent::ConditionImpl::wait (condition=0x9bd6e38)
at decaf/internal/util/concurrent/unix/ConditionImpl.cpp:94
#4  0x01369353 in decaf::util::concurrent::Mutex::wait (this=0x9bd6d6c) at decaf/util/concurrent/Mutex.cpp:95
#5  0x010949c5 in activemq::threads::CompositeTaskRunner::run (this=0x9bd6d48) at activemq/threads/CompositeTaskRunner.cpp:118
#6  0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9bd6e90) at decaf/lang/Thread.cpp:135
#7  0x0132a847 in threadWorker (arg=0x9bd6e90) at decaf/lang/Thread.cpp:188
#8  0x008be96e in start_thread (arg=0xb7739b70) at pthread_create.c:300
#9  0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3:
#0  0x0079b422 in __kernel_vsyscall ()
#1  0x008c5af9 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
#2  0x008c113b in _L_lock_748 () from /lib/tls/i686/cmov/libpthread.so.0
#3  0x008c0f61 in __pthread_mutex_lock (mutex=0x9be12d8) at pthread_mutex_lock.c:61
#4  0x004edba6 in pthread_mutex_lock (mutex=0x9be12d8) at forward.c:182
#5  0x012f8aa1 in decaf::internal::util::concurrent::MutexImpl::lock (handle=0x9be12d8) at
decaf/internal/util/concurrent/unix/MutexImpl.cpp:71
#6  0x01369412 in decaf::util::concurrent::Mutex::lock (this=0x9be11ec) at decaf/util/concurrent/Mutex.cpp:75
#7  0x0105d770 in decaf::util::StlQueue<decaf::lang::Pointer<activemq::commands::MessageDispatch,
decaf::util::concurrent::atomic::AtomicRefCounter> >::lock (this=0x9be11d8)
    at ./decaf/util/StlQueue.h:253
#8  activemq::core::MessageDispatchChannel::lock (this=0x9be11d8) at activemq/core/MessageDispatchChannel.h:153
#9  0x01368ab5 in decaf::util::concurrent::Lock::lock (this=0xb6f37fe4) at decaf/util/concurrent/Lock.cpp:54
#10 0x01368c08 in Lock (this=0xfffffe00, object=0x9be12d8, intiallyLocked=true) at decaf/util/concurrent/Lock.cpp:32
#11 0x01026102 in activemq::core::ActiveMQConsumer::clearMessagesInProgress (this=0x9be11a0)
at activemq/core/ActiveMQConsumer.cpp:1112
#12 0x0104715c in activemq::core::ActiveMQSession::clearMessagesInProgress (this=0x9be0b90)
at activemq/core/ActiveMQSession.cpp:239
#13 0x01010543 in activemq::core::ActiveMQConnection::transportInterrupted (this=0x9bd7210)
at activemq/core/ActiveMQConnection.cpp:704
#14 0x0109bb34 in activemq::transport::TransportFilter::transportInterrupted (this=0x9bd71c0)
at activemq/transport/TransportFilter.cpp:67
#15 0x010b07ae in activemq::transport::failover::FailoverTransport::handleTransportFailure
(this=0x9bd6a38, error=...) at activemq/transport/failover/FailoverTransport.cpp:476
#16 0x010bc06c in activemq::transport::failover::FailoverTransportListener::onException (this=0x9bd6878,
ex=...) at activemq/transport/failover/FailoverTransportListener.cpp:97
#17 0x0109bc0b in activemq::transport::TransportFilter::fire (this=0x9bd8ec8, ex=...) at activemq/transport/TransportFilter.cpp:49
#18 0x0109bc64 in activemq::transport::TransportFilter::onException (this=0x9bd8ec8, ex=...)
at activemq/transport/TransportFilter.cpp:41
#19 0x0109bc0b in activemq::transport::TransportFilter::fire (this=0x9bd8938, ex=...) at activemq/transport/TransportFilter.cpp:49
#20 0x0109bc64 in activemq::transport::TransportFilter::onException (this=0x9bd8938, ex=...)
at activemq/transport/TransportFilter.cpp:41
#21 0x01099b13 in activemq::transport::IOTransport::fire (this=0x9bd88e8, ex=...) at activemq/transport/IOTransport.cpp:73
#22 0x0109a3bf in activemq::transport::IOTransport::run (this=0x9bd88e8) at activemq/transport/IOTransport.cpp:246
#23 0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9bd8fe8) at decaf/lang/Thread.cpp:135
#24 0x0132a847 in threadWorker (arg=0x9bd8fe8) at decaf/lang/Thread.cpp:188
#25 0x008be96e in start_thread (arg=0xb6f38b70) at pthread_create.c:300
#26 0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4:
#0  0x0079b422 in __kernel_vsyscall ()
#1  0x008c5af9 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
#2  0x008c113b in _L_lock_748 () from /lib/tls/i686/cmov/libpthread.so.0
#3  0x008c0f61 in __pthread_mutex_lock (mutex=0x9be12d8) at pthread_mutex_lock.c:61
#4  0x004edba6 in pthread_mutex_lock (mutex=0x9be12d8) at forward.c:182
#5  0x012f8aa1 in decaf::internal::util::concurrent::MutexImpl::lock (handle=0x9be12d8) at
decaf/internal/util/concurrent/unix/MutexImpl.cpp:71
#6  0x01369412 in decaf::util::concurrent::Mutex::lock (this=0x9be11ec) at decaf/util/concurrent/Mutex.cpp:75
#7  0x01036830 in decaf::util::StlQueue<decaf::lang::Pointer<activemq::commands::MessageDispatch,
decaf::util::concurrent::atomic::AtomicRefCounter> >::lock (this=0x9be11e0)
    at ./decaf/util/StlQueue.h:253
#8  0x01368ab5 in decaf::util::concurrent::Lock::lock (this=0xb6737064) at decaf/util/concurrent/Lock.cpp:54
#9  0x01368c08 in Lock (this=0xfffffe00, object=0x9be12d8, intiallyLocked=true) at decaf/util/concurrent/Lock.cpp:32
#10 0x0105c507 in activemq::core::MessageDispatchChannel::clear (this=0x9be11d8) at activemq/core/MessageDispatchChannel.cpp:143
#11 0x0102ec37 in activemq::core::ActiveMQConsumer::doClose (this=0x9be11a0) at activemq/core/ActiveMQConsumer.cpp:335
#12 0x0102fb00 in activemq::core::ActiveMQConsumer::close (this=0x9be11a0) at activemq/core/ActiveMQConsumer.cpp:309
#13 0x01030390 in ~ActiveMQConsumer (this=0x9be11a0, __in_chrg=<value optimized out>)
at activemq/core/ActiveMQConsumer.cpp:261
#14 0x0804c276 in Consumer::cleanup (this=0x9be0570) at main.cpp:469
#15 0x0804bcdd in Consumer::run (this=0x9be0570) at main.cpp:394
#16 0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9be05b0) at decaf/lang/Thread.cpp:135
#17 0x0132a847 in threadWorker (arg=0x9be05b0) at decaf/lang/Thread.cpp:188
#18 0x008be96e in start_thread (arg=0xb6737b70) at pthread_create.c:300
#19 0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 5:
#0  0x0079b422 in __kernel_vsyscall ()
#1  0x008c5af9 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
#2  0x008c113b in _L_lock_748 () from /lib/tls/i686/cmov/libpthread.so.0
#3  0x008c0f61 in __pthread_mutex_lock (mutex=0x9bd65e0) at pthread_mutex_lock.c:61
#4  0x004edba6 in pthread_mutex_lock (mutex=0x9bd65e0) at forward.c:182
#5  0x012f8aa1 in decaf::internal::util::concurrent::MutexImpl::lock (handle=0x9bd65e0) at
decaf/internal/util/concurrent/unix/MutexImpl.cpp:71
#6  0x01369412 in decaf::util::concurrent::Mutex::lock (this=0x9bd6a88) at decaf/util/concurrent/Mutex.cpp:75
#7  0x01368ab5 in decaf::util::concurrent::Lock::lock (this=0xb5f35ea0) at decaf/util/concurrent/Lock.cpp:54
#8  0x01368c08 in Lock (this=0xfffffe00, object=0x9bd65e0, intiallyLocked=true) at decaf/util/concurrent/Lock.cpp:32
#9  0x010b38fd in activemq::transport::failover::FailoverTransport::oneway (this=0x9bd6a38,
command=...) at activemq/transport/failover/FailoverTransport.cpp:186
#10 0x0109ff9f in activemq::transport::correlator::ResponseCorrelator::oneway (this=0x9bd71c0,
command=...) at activemq/transport/correlator/ResponseCorrelator.cpp:82
#11 0x010093be in activemq::core::ActiveMQConnection::oneway (this=0x9bd7210, command=...)
at activemq/core/ActiveMQConnection.cpp:741
#12 0x01048a4f in activemq::core::ActiveMQSession::oneway (this=0x9be0b90, command=...) at
activemq/core/ActiveMQSession.cpp:903
#13 0x01030df4 in activemq::core::ActiveMQConsumer::afterMessageIsConsumed (this=0x9be11a0,
message=..., messageExpired=false) at activemq/core/ActiveMQConsumer.cpp:642
#14 0x01031743 in activemq::core::ActiveMQConsumer::dispatch (this=0x9be11a0, dispatch=...)
at activemq/core/ActiveMQConsumer.cpp:1021
#15 0x010555c3 in activemq::core::ActiveMQSessionExecutor::dispatch (this=0x9be0dc8, dispatch=...)
at activemq/core/ActiveMQSessionExecutor.cpp:129
#16 0x01055993 in activemq::core::ActiveMQSessionExecutor::iterate (this=0x9be0dc8) at activemq/core/ActiveMQSessionExecutor.cpp:166
#17 0x010987f3 in activemq::threads::DedicatedTaskRunner::run (this=0x9be1480) at activemq/threads/DedicatedTaskRunner.cpp:111
#18 0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9be0ad8) at decaf/lang/Thread.cpp:135
#19 0x0132a847 in threadWorker (arg=0x9be0ad8) at decaf/lang/Thread.cpp:188
#20 0x008be96e in start_thread (arg=0xb5f36b70) at pthread_create.c:300
#21 0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130



> Auto-Acknowledge consumer using MessageListener freezes on destructor
> ---------------------------------------------------------------------
>
>                 Key: AMQCPP-356
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-356
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>    Affects Versions: 3.2.4
>         Environment: ActiveMQ 5.4.2
> ActiveMQ-CPP 3.2.4
> Ubuntu 10.04
> JRE 1.6.0_20-b02
>            Reporter: Henrique Magarotto
>            Assignee: Timothy Bish
>
> Consumer freezes on destructor.
> Maybe related to issue AMQCPP-355.
> First reported by Óscar Pernas Plaza (http://activemq.2283324.n4.nabble.com/AMQCPP-Closing-consumer-freezes-if-broker-is-stopped-while-is-consuming-tt3319403.html).
> How to reproduce (using test code attached in AMQCPP-354 issue):
> 1- Apply simple change in test code (attached in AMQCPP-354):
> @@ -440,6 +440,7 @@
>              if(_delay) {
>                  std::cout<<"Starting delay..."<<std::endl;
>                  stopCheck(_delay);
> +                std::cout<<"Delay finish..."<<std::endl;
>              }
>  
>          } catch (CMSException& e) {
> @@ -561,7 +562,7 @@
>  
>      void loadEndPoins() {
>          for(int i=0; i<_consumer;i++) {
> -            _endPointList.push_back( new Consumer(&_poolManager,"TEST.FOO",_delay,_useListener)
);
> +            _endPointList.push_back( new Consumer(&_poolManager,"TEST.FOO",_delay,_useListener,false)
);
>          }
>          for(int i=0; i<_producer;i++) {
>              _endPointList.push_back( new Producer(&_poolManager,"TEST.FOO",_delay,_numMessages)
);
> 2- Start ActiveMQ
> 3- Start 'MessageListener' consumer './activemqTest -l -c1 -d10000'
> 4- Send one message './activemqTest -p1'
> 5- Wait consumer 'Starting delay'
> 6- Stop ActiveMQ
> 7- Wait consumer delay finishes 'Delay finish'
> 8- Try kill consumer
> 9- Freezes
> BACKTRACE:
> Thread 1:
> #0  0x0079b422 in __kernel_vsyscall ()
> #1  0x008bfb5d in pthread_join (threadid=3061021552, thread_return=0xbfbff07c) at pthread_join.c:89
> #2  0x0132a3c0 in decaf::lang::Thread::join (this=0x9be0574) at decaf/lang/Thread.cpp:421
> #3  0x0804ca15 in AppTest::joinEndPoins (this=0xbfbff104) at main.cpp:587
> #4  0x0804c69c in AppTest::run (this=0xbfbff104) at main.cpp:556
> #5  0x0804a33c in main (argc=4, argv=0xbfbff224) at main.cpp:634
> Thread 2:
> #0  0x0079b422 in __kernel_vsyscall ()
> #1  0x008c3015 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
> #2  0x004ed9dd in __pthread_cond_wait (cond=0x9bd6e38, mutex=0x9bd6e08) at forward.c:139
> #3  0x012f86a9 in decaf::internal::util::concurrent::ConditionImpl::wait (condition=0x9bd6e38)
at decaf/internal/util/concurrent/unix/ConditionImpl.cpp:94
> #4  0x01369353 in decaf::util::concurrent::Mutex::wait (this=0x9bd6d6c) at decaf/util/concurrent/Mutex.cpp:95
> #5  0x010949c5 in activemq::threads::CompositeTaskRunner::run (this=0x9bd6d48) at activemq/threads/CompositeTaskRunner.cpp:118
> #6  0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9bd6e90) at
decaf/lang/Thread.cpp:135
> #7  0x0132a847 in threadWorker (arg=0x9bd6e90) at decaf/lang/Thread.cpp:188
> #8  0x008be96e in start_thread (arg=0xb7739b70) at pthread_create.c:300
> #9  0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
> Thread 3:
> #0  0x0079b422 in __kernel_vsyscall ()
> #1  0x008c5af9 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
> #2  0x008c113b in _L_lock_748 () from /lib/tls/i686/cmov/libpthread.so.0
> #3  0x008c0f61 in __pthread_mutex_lock (mutex=0x9be12d8) at pthread_mutex_lock.c:61
> #4  0x004edba6 in pthread_mutex_lock (mutex=0x9be12d8) at forward.c:182
> #5  0x012f8aa1 in decaf::internal::util::concurrent::MutexImpl::lock (handle=0x9be12d8)
at decaf/internal/util/concurrent/unix/MutexImpl.cpp:71
> #6  0x01369412 in decaf::util::concurrent::Mutex::lock (this=0x9be11ec) at decaf/util/concurrent/Mutex.cpp:75
> #7  0x0105d770 in decaf::util::StlQueue<decaf::lang::Pointer<activemq::commands::MessageDispatch,
decaf::util::concurrent::atomic::AtomicRefCounter> >::lock (this=0x9be11d8)
>     at ./decaf/util/StlQueue.h:253
> #8  activemq::core::MessageDispatchChannel::lock (this=0x9be11d8) at activemq/core/MessageDispatchChannel.h:153
> #9  0x01368ab5 in decaf::util::concurrent::Lock::lock (this=0xb6f37fe4) at decaf/util/concurrent/Lock.cpp:54
> #10 0x01368c08 in Lock (this=0xfffffe00, object=0x9be12d8, intiallyLocked=true) at decaf/util/concurrent/Lock.cpp:32
> #11 0x01026102 in activemq::core::ActiveMQConsumer::clearMessagesInProgress (this=0x9be11a0)
at activemq/core/ActiveMQConsumer.cpp:1112
> #12 0x0104715c in activemq::core::ActiveMQSession::clearMessagesInProgress (this=0x9be0b90)
at activemq/core/ActiveMQSession.cpp:239
> #13 0x01010543 in activemq::core::ActiveMQConnection::transportInterrupted (this=0x9bd7210)
at activemq/core/ActiveMQConnection.cpp:704
> #14 0x0109bb34 in activemq::transport::TransportFilter::transportInterrupted (this=0x9bd71c0)
at activemq/transport/TransportFilter.cpp:67
> #15 0x010b07ae in activemq::transport::failover::FailoverTransport::handleTransportFailure
(this=0x9bd6a38, error=...) at activemq/transport/failover/FailoverTransport.cpp:476
> #16 0x010bc06c in activemq::transport::failover::FailoverTransportListener::onException
(this=0x9bd6878, ex=...) at activemq/transport/failover/FailoverTransportListener.cpp:97
> #17 0x0109bc0b in activemq::transport::TransportFilter::fire (this=0x9bd8ec8, ex=...)
at activemq/transport/TransportFilter.cpp:49
> #18 0x0109bc64 in activemq::transport::TransportFilter::onException (this=0x9bd8ec8,
ex=...) at activemq/transport/TransportFilter.cpp:41
> #19 0x0109bc0b in activemq::transport::TransportFilter::fire (this=0x9bd8938, ex=...)
at activemq/transport/TransportFilter.cpp:49
> #20 0x0109bc64 in activemq::transport::TransportFilter::onException (this=0x9bd8938,
ex=...) at activemq/transport/TransportFilter.cpp:41
> #21 0x01099b13 in activemq::transport::IOTransport::fire (this=0x9bd88e8, ex=...) at
activemq/transport/IOTransport.cpp:73
> #22 0x0109a3bf in activemq::transport::IOTransport::run (this=0x9bd88e8) at activemq/transport/IOTransport.cpp:246
> #23 0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9bd8fe8) at
decaf/lang/Thread.cpp:135
> #24 0x0132a847 in threadWorker (arg=0x9bd8fe8) at decaf/lang/Thread.cpp:188
> #25 0x008be96e in start_thread (arg=0xb6f38b70) at pthread_create.c:300
> #26 0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
> Thread 4:
> #0  0x0079b422 in __kernel_vsyscall ()
> #1  0x008c5af9 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
> #2  0x008c113b in _L_lock_748 () from /lib/tls/i686/cmov/libpthread.so.0
> #3  0x008c0f61 in __pthread_mutex_lock (mutex=0x9be12d8) at pthread_mutex_lock.c:61
> #4  0x004edba6 in pthread_mutex_lock (mutex=0x9be12d8) at forward.c:182
> #5  0x012f8aa1 in decaf::internal::util::concurrent::MutexImpl::lock (handle=0x9be12d8)
at decaf/internal/util/concurrent/unix/MutexImpl.cpp:71
> #6  0x01369412 in decaf::util::concurrent::Mutex::lock (this=0x9be11ec) at decaf/util/concurrent/Mutex.cpp:75
> #7  0x01036830 in decaf::util::StlQueue<decaf::lang::Pointer<activemq::commands::MessageDispatch,
decaf::util::concurrent::atomic::AtomicRefCounter> >::lock (this=0x9be11e0)
>     at ./decaf/util/StlQueue.h:253
> #8  0x01368ab5 in decaf::util::concurrent::Lock::lock (this=0xb6737064) at decaf/util/concurrent/Lock.cpp:54
> #9  0x01368c08 in Lock (this=0xfffffe00, object=0x9be12d8, intiallyLocked=true) at decaf/util/concurrent/Lock.cpp:32
> #10 0x0105c507 in activemq::core::MessageDispatchChannel::clear (this=0x9be11d8) at activemq/core/MessageDispatchChannel.cpp:143
> #11 0x0102ec37 in activemq::core::ActiveMQConsumer::doClose (this=0x9be11a0) at activemq/core/ActiveMQConsumer.cpp:335
> #12 0x0102fb00 in activemq::core::ActiveMQConsumer::close (this=0x9be11a0) at activemq/core/ActiveMQConsumer.cpp:309
> #13 0x01030390 in ~ActiveMQConsumer (this=0x9be11a0, __in_chrg=<value optimized out>)
at activemq/core/ActiveMQConsumer.cpp:261
> #14 0x0804c276 in Consumer::cleanup (this=0x9be0570) at main.cpp:469
> #15 0x0804bcdd in Consumer::run (this=0x9be0570) at main.cpp:394
> #16 0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9be05b0) at
decaf/lang/Thread.cpp:135
> #17 0x0132a847 in threadWorker (arg=0x9be05b0) at decaf/lang/Thread.cpp:188
> #18 0x008be96e in start_thread (arg=0xb6737b70) at pthread_create.c:300
> #19 0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
> Thread 5:
> #0  0x0079b422 in __kernel_vsyscall ()
> #1  0x008c5af9 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
> #2  0x008c113b in _L_lock_748 () from /lib/tls/i686/cmov/libpthread.so.0
> #3  0x008c0f61 in __pthread_mutex_lock (mutex=0x9bd65e0) at pthread_mutex_lock.c:61
> #4  0x004edba6 in pthread_mutex_lock (mutex=0x9bd65e0) at forward.c:182
> #5  0x012f8aa1 in decaf::internal::util::concurrent::MutexImpl::lock (handle=0x9bd65e0)
at decaf/internal/util/concurrent/unix/MutexImpl.cpp:71
> #6  0x01369412 in decaf::util::concurrent::Mutex::lock (this=0x9bd6a88) at decaf/util/concurrent/Mutex.cpp:75
> #7  0x01368ab5 in decaf::util::concurrent::Lock::lock (this=0xb5f35ea0) at decaf/util/concurrent/Lock.cpp:54
> #8  0x01368c08 in Lock (this=0xfffffe00, object=0x9bd65e0, intiallyLocked=true) at decaf/util/concurrent/Lock.cpp:32
> #9  0x010b38fd in activemq::transport::failover::FailoverTransport::oneway (this=0x9bd6a38,
command=...) at activemq/transport/failover/FailoverTransport.cpp:186
> #10 0x0109ff9f in activemq::transport::correlator::ResponseCorrelator::oneway (this=0x9bd71c0,
command=...) at activemq/transport/correlator/ResponseCorrelator.cpp:82
> #11 0x010093be in activemq::core::ActiveMQConnection::oneway (this=0x9bd7210, command=...)
at activemq/core/ActiveMQConnection.cpp:741
> #12 0x01048a4f in activemq::core::ActiveMQSession::oneway (this=0x9be0b90, command=...)
at activemq/core/ActiveMQSession.cpp:903
> #13 0x01030df4 in activemq::core::ActiveMQConsumer::afterMessageIsConsumed (this=0x9be11a0,
message=..., messageExpired=false) at activemq/core/ActiveMQConsumer.cpp:642
> #14 0x01031743 in activemq::core::ActiveMQConsumer::dispatch (this=0x9be11a0, dispatch=...)
at activemq/core/ActiveMQConsumer.cpp:1021
> #15 0x010555c3 in activemq::core::ActiveMQSessionExecutor::dispatch (this=0x9be0dc8,
dispatch=...) at activemq/core/ActiveMQSessionExecutor.cpp:129
> #16 0x01055993 in activemq::core::ActiveMQSessionExecutor::iterate (this=0x9be0dc8) at
activemq/core/ActiveMQSessionExecutor.cpp:166
> #17 0x010987f3 in activemq::threads::DedicatedTaskRunner::run (this=0x9be1480) at activemq/threads/DedicatedTaskRunner.cpp:111
> #18 0x0132bcf1 in decaf::lang::ThreadProperties::runCallback (properties=0x9be0ad8) at
decaf/lang/Thread.cpp:135
> #19 0x0132a847 in threadWorker (arg=0x9be0ad8) at decaf/lang/Thread.cpp:188
> #20 0x008be96e in start_thread (arg=0xb5f36b70) at pthread_create.c:300
> #21 0x004e0a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message