Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 51790 invoked from network); 12 Jan 2010 14:38:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Jan 2010 14:38:07 -0000 Received: (qmail 55832 invoked by uid 500); 12 Jan 2010 14:38:07 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 55806 invoked by uid 500); 12 Jan 2010 14:38:07 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 55796 invoked by uid 99); 12 Jan 2010 14:38:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jan 2010 14:38:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jan 2010 14:38:04 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 87DE2234C052 for ; Tue, 12 Jan 2010 06:37:43 -0800 (PST) Message-ID: <805729228.81263307063554.JavaMail.jira@brutus.apache.org> Date: Tue, 12 Jan 2010 14:37:43 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Subject: [jira] Updated: (AMQCPP-277) Freeze when creating multiple Consumers In-Reply-To: <403595662.5741263273857117.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQCPP-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish updated AMQCPP-277: -------------------------------- Description: We create multiple MessageConsumers with different selectors. This can be upwards of 50 or so consumers per client. We recently upgraded to 3.1 from 2.2.2. We also upgraded our ActiveMQ Server to 5.3 from 5.2. After upgrading, we've been seeing random, but frequent freezing in our clients. I've narrowed it down to where it creates the MessageConsumer and calls setMessageListener(); It seems to be stuck, waiting for a thread to join. I've modified the main.cpp to exhibit this behavior, but I've only been able to reproduce it randomly. It seems to happen more frequently if you stick a breakpoint on this line in Thread.cpp, Thread::join(): Thread::join( INFINITE, 0 ); Here's the callstack where it freezes, which is consistent in our clients as well as the main.cpp example: ntdll.dll!76fff871() [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!76fff871() KernelBase.dll!75e20816() kernel32.dll!755b1138() activemq-cppd.dll!decaf::internal::util::concurrent::ConditionImpl::wait(decaf::util::concurrent::ConditionHandle * condition=0x0239e0e0, __int64 mills=4294967295, __int64 nanos=0) Line 110 + 0x10 bytes C++ activemq-cppd.dll!decaf::util::concurrent::Mutex::wait(__int64 millisecs=4294967295, int nanos=0) Line 124 + 0x20 bytes C++ activemq-cppd.dll!decaf::lang::Thread::join(__int64 millisecs=4294967295, unsigned int nanos=0) Line 464 + 0x36 bytes C++ activemq-cppd.dll!decaf::lang::Thread::join() Line 421 C++ > activemq-cppd.dll!activemq::threads::DedicatedTaskRunner::shutdown() Line 83 C++ activemq-cppd.dll!activemq::core::ActiveMQSessionExecutor::stop() Line 110 C++ activemq-cppd.dll!activemq::core::ActiveMQSession::stop() Line 807 C++ activemq-cppd.dll!activemq::core::ActiveMQConsumer::setMessageListener(cms::MessageListener * listener=0x0018fe0c) Line 523 C++ vs2005-activemq-example.exe!HelloWorldConsumer::run() Line 247 + 0x5b bytes C++ activemq-cppd.dll!decaf::lang::ThreadProperties::runCallback(decaf::lang::ThreadProperties * properties=0x01df7f68) Line 133 + 0x11 bytes C++ activemq-cppd.dll!`anonymous namespace'::threadWorker(void * arg=0x01df7f68) Line 204 + 0x9 bytes C++ msvcr90d.dll!_callthreadstartex() Line 348 + 0xf bytes C msvcr90d.dll!_threadstartex(void * ptd=0x01dfafd8) Line 331 C To modify main.cpp, it's pretty simple. Instead of creating 1 MessageConsumer in HelloWorldConsumer::run(), I've created 50: {quote} // put this line with the class variables std::vector consumers; for ( int i = 0; i < 50; i++ ) {{ // Create a MessageConsumer from the Session to the Topic or Queue consumers.push_back( session->createConsumer( destination ) ); consumers.back()->setMessageListener( this ); }} {quote} I'm using the standard .conf for the server. I've reverted to 2.2.2 and have no issues. Any ideas? was: We create multiple MessageConsumers with different selectors. This can be upwards of 50 or so consumers per client. We recently upgraded to 3.1 from 2.2.2. We also upgraded our ActiveMQ Server to 5.3 from 5.2. After upgrading, we've been seeing random, but frequent freezing in our clients. I've narrowed it down to where it creates the MessageConsumer and calls setMessageListener(); It seems to be stuck, waiting for a thread to join. I've modified the main.cpp to exhibit this behavior, but I've only been able to reproduce it randomly. It seems to happen more frequently if you stick a breakpoint on this line in Thread.cpp, Thread::join(): Thread::join( INFINITE, 0 ); Here's the callstack where it freezes, which is consistent in our clients as well as the main.cpp example: ntdll.dll!76fff871() [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!76fff871() KernelBase.dll!75e20816() kernel32.dll!755b1138() activemq-cppd.dll!decaf::internal::util::concurrent::ConditionImpl::wait(decaf::util::concurrent::ConditionHandle * condition=0x0239e0e0, __int64 mills=4294967295, __int64 nanos=0) Line 110 + 0x10 bytes C++ activemq-cppd.dll!decaf::util::concurrent::Mutex::wait(__int64 millisecs=4294967295, int nanos=0) Line 124 + 0x20 bytes C++ activemq-cppd.dll!decaf::lang::Thread::join(__int64 millisecs=4294967295, unsigned int nanos=0) Line 464 + 0x36 bytes C++ activemq-cppd.dll!decaf::lang::Thread::join() Line 421 C++ > activemq-cppd.dll!activemq::threads::DedicatedTaskRunner::shutdown() Line 83 C++ activemq-cppd.dll!activemq::core::ActiveMQSessionExecutor::stop() Line 110 C++ activemq-cppd.dll!activemq::core::ActiveMQSession::stop() Line 807 C++ activemq-cppd.dll!activemq::core::ActiveMQConsumer::setMessageListener(cms::MessageListener * listener=0x0018fe0c) Line 523 C++ vs2005-activemq-example.exe!HelloWorldConsumer::run() Line 247 + 0x5b bytes C++ activemq-cppd.dll!decaf::lang::ThreadProperties::runCallback(decaf::lang::ThreadProperties * properties=0x01df7f68) Line 133 + 0x11 bytes C++ activemq-cppd.dll!`anonymous namespace'::threadWorker(void * arg=0x01df7f68) Line 204 + 0x9 bytes C++ msvcr90d.dll!_callthreadstartex() Line 348 + 0xf bytes C msvcr90d.dll!_threadstartex(void * ptd=0x01dfafd8) Line 331 C To modify main.cpp, it's pretty simple. Instead of creating 1 MessageConsumer in HelloWorldConsumer::run(), I've created 50: {quote} // put this line with the class variables std::vector consumers; for ( int i = 0; i < 50; i++ ) {{ // Create a MessageConsumer from the Session to the Topic or Queue consumers.push_back( session->createConsumer( destination ) ); consumers.back()->setMessageListener( this ); }} {quote} I'm using the standard .conf for the server. I've reverted to 2.2.2 and have no issues. Any ideas? Fix Version/s: 3.2.0 > Freeze when creating multiple Consumers > --------------------------------------- > > Key: AMQCPP-277 > URL: https://issues.apache.org/activemq/browse/AMQCPP-277 > Project: ActiveMQ C++ Client > Issue Type: Bug > Affects Versions: 3.1 > Environment: Windows 7 x64, ActiveMQ Server 5.3, Java 6.0.17, Visual Studio 2008 SP1, Windows 7 SDK, APR 1.3.9 > Reporter: Eddie Fast > Assignee: Timothy Bish > Fix For: 3.2.0 > > > We create multiple MessageConsumers with different selectors. This can be upwards of 50 or so consumers per client. > We recently upgraded to 3.1 from 2.2.2. We also upgraded our ActiveMQ Server to 5.3 from 5.2. > After upgrading, we've been seeing random, but frequent freezing in our clients. I've narrowed it down to where it creates the MessageConsumer and calls setMessageListener(); > It seems to be stuck, waiting for a thread to join. > I've modified the main.cpp to exhibit this behavior, but I've only been able to reproduce it randomly. It seems to happen more frequently if you stick a breakpoint on this line in Thread.cpp, Thread::join(): > Thread::join( INFINITE, 0 ); > Here's the callstack where it freezes, which is consistent in our clients as well as the main.cpp example: > ntdll.dll!76fff871() > [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] > ntdll.dll!76fff871() > KernelBase.dll!75e20816() > kernel32.dll!755b1138() > activemq-cppd.dll!decaf::internal::util::concurrent::ConditionImpl::wait(decaf::util::concurrent::ConditionHandle * condition=0x0239e0e0, __int64 mills=4294967295, __int64 nanos=0) Line 110 + 0x10 bytes C++ > activemq-cppd.dll!decaf::util::concurrent::Mutex::wait(__int64 millisecs=4294967295, int nanos=0) Line 124 + 0x20 bytes C++ > activemq-cppd.dll!decaf::lang::Thread::join(__int64 millisecs=4294967295, unsigned int nanos=0) Line 464 + 0x36 bytes C++ > activemq-cppd.dll!decaf::lang::Thread::join() Line 421 C++ > > activemq-cppd.dll!activemq::threads::DedicatedTaskRunner::shutdown() Line 83 C++ > activemq-cppd.dll!activemq::core::ActiveMQSessionExecutor::stop() Line 110 C++ > activemq-cppd.dll!activemq::core::ActiveMQSession::stop() Line 807 C++ > activemq-cppd.dll!activemq::core::ActiveMQConsumer::setMessageListener(cms::MessageListener * listener=0x0018fe0c) Line 523 C++ > vs2005-activemq-example.exe!HelloWorldConsumer::run() Line 247 + 0x5b bytes C++ > activemq-cppd.dll!decaf::lang::ThreadProperties::runCallback(decaf::lang::ThreadProperties * properties=0x01df7f68) Line 133 + 0x11 bytes C++ > activemq-cppd.dll!`anonymous namespace'::threadWorker(void * arg=0x01df7f68) Line 204 + 0x9 bytes C++ > msvcr90d.dll!_callthreadstartex() Line 348 + 0xf bytes C > msvcr90d.dll!_threadstartex(void * ptd=0x01dfafd8) Line 331 C > To modify main.cpp, it's pretty simple. Instead of creating 1 MessageConsumer in HelloWorldConsumer::run(), I've created 50: > {quote} > // put this line with the class variables > std::vector consumers; > for ( int i = 0; i < 50; i++ ) > {{ > // Create a MessageConsumer from the Session to the Topic or Queue > consumers.push_back( session->createConsumer( destination ) ); > consumers.back()->setMessageListener( this ); > }} > {quote} > I'm using the standard .conf for the server. I've reverted to 2.2.2 and have no issues. > Any ideas? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.