Description of problem: In a multi-threaded test where one thread loops on Session::nextReceiver and another calls Session::createSender, the call to createSender hangs. Version-Release number of selected component (if applicable): MRG1.3 beta4 How reproducible: 100%
pstack output from hanging process: $ pstack 7602 Thread 3 (Thread 0x7fe5f5ff2910 (LWP 7603)): #0 0x000000334f6de868 in epoll_wait () from /lib64/libc.so.6 #1 0x00007fe5f6e33fca in qpid::sys::Poller::wait(qpid::sys::Duration) () #2 0x00007fe5f6e34639 in qpid::sys::Poller::run() () #3 0x00007fe5f6e2aeba in qpid::sys::(anonymous namespace)::runRunnable(void*) #4 0x000000335020685a in start_thread () from /lib64/libpthread.so.0 #5 0x000000334f6de22d in clone () from /lib64/libc.so.6 #6 0x0000000000000000 in ?? () Thread 2 (Thread 0x7fe5effff910 (LWP 7604)): #0 0x000000335020b54d in pthread_cond_timedwait@@GLIBC_2.3.2 () #1 0x00007fe5f791a5d9 in qpid::sys::Condition::wait(qpid::sys::Mutex&, qpid::sys::AbsTime const&) () #2 0x00007fe5f791aa6d in qpid::sys::BlockingQueue<boost::shared_ptr<qpid::framing::FrameSet> >::pop(boost::shared_ptr<qpid::framing::FrameSet>&, qpid::sys::Duration) () from /home/ross/svn/qpid/build-vpath/src/.libs/libqpidmessaging.so.2 #3 0x00007fe5f7917ed8 in qpid::client::amqp0_10::IncomingMessages::wait(qpid::sys::Duration) () #4 0x00007fe5f791833b in qpid::client::amqp0_10::IncomingMessages::getNextDestination(std::string&, qpid::sys::Duration) () #5 0x00007fe5f7921014 in qpid::client::amqp0_10::SessionImpl::nextReceiver(qpid::messaging::Receiver&, qpid::messaging::Duration) () #6 0x00007fe5f76ac94e in qmf::AgentSessionImpl::run() () #7 0x00007fe5f6e2aeba in qpid::sys::(anonymous namespace)::runRunnable(void*) #8 0x000000335020685a in start_thread () from /lib64/libpthread.so.0 #9 0x000000334f6de22d in clone () from /lib64/libc.so.6 #10 0x0000000000000000 in ?? () Thread 1 (Thread 0x7fe5f5ff3790 (LWP 7602)): #0 0x000000335020d944 in __lll_lock_wait () from /lib64/libpthread.so.0 #1 0x0000003350208ff0 in _L_lock_1017 () from /lib64/libpthread.so.0 #2 0x0000003350208e51 in pthread_mutex_lock () from /lib64/libpthread.so.0 #3 0x00007fe5f7921d18 in qpid::client::amqp0_10::SessionImpl::createSenderImpl(qpid::messaging::Address const&) () #4 0x00007fe5f7929b20 in bool qpid::client::amqp0_10::SessionImpl::execute<qpid::client::amqp0_10::SessionImpl::CreateSender>(qpid::client::amqp0_10::SessionImpl::CreateSender&) () #5 0x00007fe5f792214b in qpid::client::amqp0_10::SessionImpl::createSender(qpid::messaging::Address const&) () #6 0x00007fe5f78ffc50 in qpid::messaging::Session::createSender(std::string const&) () from /home/ross/svn/qpid/build-vpath/src/.libs/libqpidmessaging.so.2 #7 0x00007fe5f76ae508 in qmf::AgentSessionImpl::sendHeartbeat() () #8 0x00007fe5f76af92f in qmf::AgentSessionImpl::open() () #9 0x0000000000401652 in main ()
Fixed on trunk (r960951) and in release repo (http://mrg1.lab.bos.redhat.com/git/?p=qpid.git;a=commitdiff;h=22397fbf439ed2d7f61fa50a85439e3998771fdd).