You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2010/07/16 23:49:52 UTC

[jira] Closed: (AMQCPP-297) Deadlock in ActiveMQSession::close

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

Timothy Bish closed AMQCPP-297.
-------------------------------

    Resolution: Duplicate

Closing since this appears to be a duplicate of AMQCPP-277 and the user hasn't reported back on whether its still an issue.  If it reappears please reopen the issue.

> Deadlock in ActiveMQSession::close
> ----------------------------------
>
>                 Key: AMQCPP-297
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-297
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>    Affects Versions: 3.1.2
>         Environment: WinXP Pro, vs2008
>            Reporter: Harry Storbacka
>            Assignee: Timothy Bish
>
> There seems to be a deadlock when closing a session. This can be reproduced using the SimpleAsyncProducer example from version 3.1.2, with the following loop added to main():
> for (int i=0; i<10000; i++)
> {
>     consumer.runConsumer();
>     std::cout << "i = " << i << std::endl;
>     consumer.close();
> } 
> And the used broker URI was as follows:
> std::string brokerURI =
>  	"failover:(tcp://192.168.0.23:61616"
>  	"?wireFormat=openwire";
>  	"&transport.useAsyncSend=true"
> 	// "&transport.commandTracingEnabled=true"
>  	// "&transport.tcpTracingEnabled=true";
>  	"&wireFormat.tightEncodingEnabled=true"
>        ")";
> The deadlock has usually appeared before the counter reaches 150. No messages are sent while the example runs. 
> I'll try this again with version 3.2.1 when the windows build files are included. This example also reproduces the setMessageListener deadlock reported in another bug for version 3.1.2, except with only one message listener being set.
> Below are the callstacks of the threads when it's locked. 
> ---------------------------
>  	ntdll.dll!7c90e514() 	
>  	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
>  	ntdll.dll!7c90df5a() 	
>  	kernel32.dll!7c8025db() 	
>  	kernel32.dll!7c802542() 	
>  	AsyncConsumer.exe!decaf::internal::util::concurrent::ConditionImpl::wait(decaf::util::concurrent::ConditionHandle * condition=0x011d6718, __int64 mills=4294967295, __int64 nanos=0)  Line 110 + 0x10 bytes	C++
>  	AsyncConsumer.exe!decaf::util::concurrent::Mutex::wait(__int64 millisecs=4294967295, int nanos=0)  Line 124 + 0x20 bytes	C++
>  	AsyncConsumer.exe!decaf::lang::Thread::join(__int64 millisecs=4294967295, unsigned int nanos=0)  Line 464 + 0x36 bytes	C++
>  	AsyncConsumer.exe!decaf::lang::Thread::join()  Line 421	C++
>  	AsyncConsumer.exe!activemq::threads::DedicatedTaskRunner::shutdown()  Line 83	C++
>  	AsyncConsumer.exe!activemq::core::ActiveMQSessionExecutor::stop()  Line 110	C++
>  	AsyncConsumer.exe!activemq::core::ActiveMQSession::stop()  Line 807	C++
> >	AsyncConsumer.exe!activemq::core::ActiveMQSession::close()  Line 126	C++
>  	AsyncConsumer.exe!SimpleAsyncConsumer::cleanup()  Line 198	C++
>  	AsyncConsumer.exe!SimpleAsyncConsumer::close()  Line 86	C++
>  	AsyncConsumer.exe!main(int argc=1, char * * argv=0x01036618)  Line 280	C++
>  	AsyncConsumer.exe!__tmainCRTStartup()  Line 586 + 0x19 bytes	C
>  	AsyncConsumer.exe!mainCRTStartup()  Line 403	C
> ----------------------------
>  	ntdll.dll!7c90e514() 	
>  	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
>  	ntdll.dll!7c90df5a() 	
>  	kernel32.dll!7c8025db() 	
>  	kernel32.dll!7c802542() 	
>  	AsyncConsumer.exe!decaf::internal::util::concurrent::ConditionImpl::wait(decaf::util::concurrent::ConditionHandle * condition=0x011d0430, __int64 mills=4294967295, __int64 nanos=0)  Line 110 + 0x10 bytes	C++
>  	AsyncConsumer.exe!decaf::internal::util::concurrent::ConditionImpl::wait(decaf::util::concurrent::ConditionHandle * condition=0x011d0430)  Line 71 + 0x11 bytes	C++
>  	AsyncConsumer.exe!decaf::util::concurrent::Mutex::wait()  Line 95 + 0xf bytes	C++
>  	AsyncConsumer.exe!activemq::threads::CompositeTaskRunner::run()  Line 119	C++
>  	AsyncConsumer.exe!decaf::lang::ThreadProperties::runCallback(decaf::lang::ThreadProperties * properties=0x011d0578)  Line 133 + 0x11 bytes	C++
>  	AsyncConsumer.exe!`anonymous namespace'::threadWorker(void * arg=0x011d0578)  Line 204 + 0x9 bytes	C++
> >	msvcr90d.dll!_callthreadstartex()  Line 348 + 0xf bytes	C
>  	msvcr90d.dll!_threadstartex(void * ptd=0x011d0c90)  Line 331	C
> ---------------------------
>  	ntdll.dll!7c90e514() 	
>  	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
>  	ntdll.dll!7c90df5a() 	
>  	kernel32.dll!7c8025db() 	
> >	msvcr90d.dll!_unlock(int locknum=7932)  Line 376	C
>  	AsyncConsumer.exe!decaf::internal::util::concurrent::ConditionImpl::wait(decaf::util::concurrent::ConditionHandle * condition=0x0103ffb0, __int64 mills=30000, __int64 nanos=0)  Line 110 + 0x10 bytes	C++
>  	AsyncConsumer.exe!decaf::util::concurrent::Mutex::wait(__int64 millisecs=30000, int nanos=0)  Line 124 + 0x20 bytes	C++
>  	AsyncConsumer.exe!decaf::util::concurrent::Mutex::wait(__int64 millisecs=30000)  Line 105	C++
>  	AsyncConsumer.exe!decaf::internal::util::concurrent::SynchronizableImpl::wait(__int64 millisecs=30000)  Line 60	C++
>  	AsyncConsumer.exe!decaf::util::TimerImpl::run()  Line 101 + 0x1f bytes	C++
>  	AsyncConsumer.exe!decaf::lang::ThreadProperties::runCallback(decaf::lang::ThreadProperties * properties=0x0103fd68)  Line 133 + 0x11 bytes	C++
>  	AsyncConsumer.exe!`anonymous namespace'::threadWorker(void * arg=0x0103fd68)  Line 204 + 0x9 bytes	C++
>  	msvcr90d.dll!_callthreadstartex()  Line 348 + 0xf bytes	C
>  	msvcr90d.dll!_threadstartex(void * ptd=0x011d1810)  Line 331	C
>  	kernel32.dll!7c80b729() 
> --------------------------
>  	ntdll.dll!7c90e514() 	
>  	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
>  	ntdll.dll!7c90df5a() 	
>  	kernel32.dll!7c8025db() 	
> >	msvcr90d.dll!_unlock(int locknum=7056)  Line 376	C
>  	AsyncConsumer.exe!decaf::internal::util::concurrent::ConditionImpl::wait(decaf::util::concurrent::ConditionHandle * condition=0x011d1648, __int64 mills=10000, __int64 nanos=0)  Line 110 + 0x10 bytes	C++
>  	AsyncConsumer.exe!decaf::util::concurrent::Mutex::wait(__int64 millisecs=10000, int nanos=0)  Line 124 + 0x20 bytes	C++
>  	AsyncConsumer.exe!decaf::util::concurrent::Mutex::wait(__int64 millisecs=10000)  Line 105	C++
>  	AsyncConsumer.exe!decaf::internal::util::concurrent::SynchronizableImpl::wait(__int64 millisecs=10000)  Line 60	C++
>  	AsyncConsumer.exe!decaf::util::TimerImpl::run()  Line 101 + 0x1f bytes	C++
>  	AsyncConsumer.exe!decaf::lang::ThreadProperties::runCallback(decaf::lang::ThreadProperties * properties=0x011d1790)  Line 133 + 0x11 bytes	C++
>  	AsyncConsumer.exe!`anonymous namespace'::threadWorker(void * arg=0x011d1790)  Line 204 + 0x9 bytes	C++
>  	msvcr90d.dll!_callthreadstartex()  Line 348 + 0xf bytes	C
>  	msvcr90d.dll!_threadstartex(void * ptd=0x011d1dd0)  Line 331	C
>  	kernel32.dll!7c80b729() 	
> 	
> ----------------------------
>  	ntdll.dll!7c90e514() 	
>  	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
>  	ntdll.dll!7c90df5a() 	
>  	mswsock.dll!71a5402b() 	
>  	mswsock.dll!71a557c9() 	
>  	ws2_32.dll!71ab4d16() 	
>  	libapr-1.dll!6eecad09() 	
> >	msvcp90d.dll!std::_Container_base_secure::_Orphan_all()  Line 226 + 0x8 bytes	C++
>  	msvcp90d.dll!std::_Container_base_secure::~_Container_base_secure()  Line 115	C++
>  	AsyncConsumer.exe!std::_Container_base_aux_alloc_empty<std::allocator<unsigned char> >::~_Container_base_aux_alloc_empty<std::allocator<unsigned char> >()  Line 627 + 0x10 bytes	C++
>  	AsyncConsumer.exe!std::_Vector_val<unsigned char,std::allocator<unsigned char> >::~_Vector_val<unsigned char,std::allocator<unsigned char> >()  + 0xf bytes	C++
>  	AsyncConsumer.exe!decaf::lang::Thread::getId()  Line 530 + 0x6 bytes	C++
>  	498c18a2()	
> --------------------------
>  	ntdll.dll!7c90e514() 	
>  	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]	
>  	ntdll.dll!7c90df5a() 	
>  	kernel32.dll!7c8025db() 	
>  	kernel32.dll!7c802542() 	
>  	AsyncConsumer.exe!decaf::internal::util::concurrent::ConditionImpl::wait(decaf::util::concurrent::ConditionHandle * condition=0x011d3228, __int64 mills=4294967295, __int64 nanos=0)  Line 110 + 0x10 bytes	C++
>  	AsyncConsumer.exe!decaf::internal::util::concurrent::ConditionImpl::wait(decaf::util::concurrent::ConditionHandle * condition=0x011d3228)  Line 71 + 0x11 bytes	C++
>  	AsyncConsumer.exe!decaf::util::concurrent::Mutex::wait()  Line 95 + 0xf bytes	C++
>  	AsyncConsumer.exe!activemq::threads::CompositeTaskRunner::run()  Line 119	C++
>  	AsyncConsumer.exe!decaf::lang::ThreadProperties::runCallback(decaf::lang::ThreadProperties * properties=0x011d3370)  Line 133 + 0x11 bytes	C++
>  	AsyncConsumer.exe!`anonymous namespace'::threadWorker(void * arg=0x011d3370)  Line 204 + 0x9 bytes	C++
> >	msvcr90d.dll!_callthreadstartex()  Line 348 + 0xf bytes	C
>  	msvcr90d.dll!_threadstartex(void * ptd=0x011d3910)  Line 331	C
>  	kernel32.dll!7c80b729() 	

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.