[Ace-users] [ace-bugs] trying to fix an ACE hang
gpy at altair.com
Thu Nov 29 15:28:28 CST 2007
YES! I think found exactly this issue:
Sun May 5 19:14:34 2002 Douglas C. Schmidt
<schmidt at macarena.cs.wustl.edu>
* ace/Message_Queue_T.cpp: Modified all the enqueue*()
methods so that
their calls to notify() occur *outside* of the monitor
This change prevents deadlock from occurring when a
notification pipe is full. Thanks to Sasha Agranov
<sagranov at COMGATES.co.il> for reporting this.
Did it creep back in somehow?
From: Steve Huston [mailto:shuston at riverace.com]
Sent: Thursday, November 29, 2007 4:15 PM
To: Greg Popovitch; ace-bugs at cse.wustl.edu
Subject: RE: [ace-bugs] trying to fix an ACE hang
Thanks for the PROBLEM-REPORT-FORM.
Doug poked me to see if I remembered this type of problem. Your
description looks familiar - I've a feeling we've been down this road
before, but can't recall the details. Could you please scan through the
ACE_wrappers/ChangeLogs files for changes in this area to see if we've
tried this fix before?
Steve Huston, Riverace Corporation
Want to take ACE training on YOUR schedule?
From: ace-bugs-bounces at cse.wustl.edu
[mailto:ace-bugs-bounces at cse.wustl.edu] On Behalf Of Greg Popovitch
Sent: Thursday, November 29, 2007 2:23 PM
To: ace-bugs at cse.wustl.edu
Subject: [ace-bugs] trying to fix an ACE hang
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.
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
int queue_count = 0;
ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->lock_,
if (this->state_ == ACE_Message_Queue_Base::DEACTIVATED)
errno = ESHUTDOWN;
if (this->wait_not_full_cond (ace_mon, timeout) == -1)
queue_count = this->enqueue_head_i (new_item);
if (queue_count == -1)
this->notify (); //******** move after closing brace below
ACE VERSION: 5.6
HOST MACHINE and OPERATING SYSTEM:
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
Visual Studio 2005
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ace-users