[Ace-users] [ace-bugs] trying to fix an ACE hang

Greg Popovitch gpy at altair.com
Thu Nov 29 13:22:56 CST 2007


Hi,

 

I have a hang on Windows Vista 64 and also on linux 64 (RHEL 4). 

 

One thread is enqueuing a message on an ACE_Message_Queue for another
thread and hangs on the notification to the WFMO reactor. The
ACE_WFMO_Reactor_Notify::notify() hangs because its internal message
queue is full.

 

The other thread hangs while checking of the message_queue is empty
because it can't grab its ACE_GUARD. Therefore it can't dequeue messages
from the WFMO_Reactor.

 

My question: 

 

In file Message_Queue_T.cpp,

 

Would it be OK to move the "this->notify ()" outside of the scope of the
ACE_GUARD in:

 

template <ACE_SYNCH_DECL> int

ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_head (ACE_Message_Block
*new_item,

                                                ACE_Time_Value *timeout)

{

  ACE_TRACE ("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_head");

  int queue_count = 0;

  {

    ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_, -1);

 

    if (this->state_ == ACE_Message_Queue_Base::DEACTIVATED)

      {

        errno = ESHUTDOWN;

        return -1;

      }

 

    if (this->wait_not_full_cond (ace_mon, timeout) == -1)

      return -1;

 

    queue_count = this->enqueue_head_i (new_item);

 

    if (queue_count == -1)

      return -1;

 

     this->notify ();  //******** move after closing brace below ???
******

  }

  return queue_count;

}

 

 

   ACE VERSION: 5.6

 

    HOST MACHINE and OPERATING SYSTEM:

        Vindows Vista

 

    TARGET MACHINE and OPERATING SYSTEM, if different from HOST:

 

    COMPILER NAME AND VERSION (AND PATCHLEVEL):

        Visual Studio 2005

 

Thanks,

 

greg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/ace-users/attachments/20071129/30019697/attachment.html 


More information about the Ace-users mailing list