[ https://issues.apache.org/jira/browse/AMQCPP-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13574813#comment-13574813 ]
Helen Huang edited comment on AMQCPP-459 at 2/8/13 8:56 PM: ------------------------------------------------------------ The node pool's destructor is the only place that I found head.nextFree to be set back to NULL. So tt is possible that this node pool is being destructed by another thread at the same time. ~NodePool() { PlatformThread::lockMutex(lock); while (head.nextFree != NULL) { Node* node = head.nextFree; head.nextFree = node->nextFree; delete node; } PlatformThread::unlockMutex(lock); PlatformThread::destroyMutex(lock); } was (Author: hhuang): It is possible that this node pool is being destructed by another thread at the same time, because the node pools destructor is the only place that I found head.nextFree to be set back to NULL. ~NodePool() { PlatformThread::lockMutex(lock); while (head.nextFree != NULL) { Node* node = head.nextFree; head.nextFree = node->nextFree; delete node; } PlatformThread::unlockMutex(lock); PlatformThread::destroyMutex(lock); } > Found an access violation in NodePool::ReturNode(Node* node) > ------------------------------------------------------------ > > Key: AMQCPP-459 > URL: https://issues.apache.org/jira/browse/AMQCPP-459 > Project: ActiveMQ C++ Client > Issue Type: Bug > Components: CMS Impl > Affects Versions: 3.5.0 > Environment: Windows xp service pack 3, ActiveMQ broker 5.3.1, apr > 1.4.2, apr-util 1.3.9, apr iconv 1.2.1 > Reporter: Helen Huang > Assignee: Timothy Bish > Priority: Critical > Fix For: 3.5.1, 3.6.0 > > > Caught an access violation in NodePool::ReturNode(Node* node) > The following is the call stack: > activemq-cppud.dll!`anonymous > namespace'::NodePool::returnNode(`anonymous-namespace'::Node * > node=0x05237488) Line 311 + 0x6 bytes > activemq-cppud.dll!decaf::util::concurrent::locks::DefaultConditionObject::unlinkCancelledWaiters() > Line 1450 > activemq-cppud.dll!decaf::util::concurrent::locks::DefaultConditionObject::await() > Line 1145 > CmsMessageHandlerCOMUD.dll!decaf::util::concurrent::LinkedBlockingQueue<decaf::lang::Runnable > *>::take() Line 435 + 0x32 bytes > activemq-cppud.dll!decaf::util::concurrent::ExecutorKernel::getTask() Line > 1288 + 0x24 bytes > activemq-cppud.dll!decaf::util::concurrent::ExecutorKernel::runWorker(decaf::util::concurrent::ExecutorKernel::Worker > * w=0x052359b8) Line 720 + 0xe bytes > activemq-cppud.dll!decaf::util::concurrent::ExecutorKernel::Worker::run() > Line 184 > activemq-cppud.dll!decaf::lang::Thread::run() Line 143 > activemq-cppud.dll!`anonymous namespace'::runCallback(void * arg=0x0523a690) > Line 262 + 0x11 bytes > activemq-cppud.dll!`anonymous namespace'::threadEntryMethod(void * > arg=0x0523a690) Line 250 + 0x15 bytes > msvcr80d.dll!_callthreadstartex() Line 348 + 0xf bytes > msvcr80d.dll!_threadstartex(void * ptd=0x0523ab30) Line 331 > kernel32.dll!7c80b729() > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira