<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.6000.16544" name=GENERATOR>
<STYLE>@font-face {
        font-family: Wingdings;
}
@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
        FONT-SIZE: 11pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
LI.MsoNormal {
        FONT-SIZE: 11pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
DIV.MsoNormal {
        FONT-SIZE: 11pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
P.MsoListParagraph {
        FONT-SIZE: 11pt; MARGIN: 0in 0in 0pt 0.5in; FONT-FAMILY: "Calibri","sans-serif"; mso-style-priority: 34
}
LI.MsoListParagraph {
        FONT-SIZE: 11pt; MARGIN: 0in 0in 0pt 0.5in; FONT-FAMILY: "Calibri","sans-serif"; mso-style-priority: 34
}
DIV.MsoListParagraph {
        FONT-SIZE: 11pt; MARGIN: 0in 0in 0pt 0.5in; FONT-FAMILY: "Calibri","sans-serif"; mso-style-priority: 34
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-compose
}
.MsoChpDefault {
        mso-style-type: export-only
}
DIV.Section1 {
        page: Section1
}
OL {
        MARGIN-BOTTOM: 0in
}
UL {
        MARGIN-BOTTOM: 0in
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=856210721-29112007><FONT face=Arial color=#0000ff size=2>Hi
Greg,</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=856210721-29112007><FONT face=Arial color=#0000ff size=2>Thanks
for the PROBLEM-REPORT-FORM.</FONT></SPAN></DIV>
<DIV><SPAN class=856210721-29112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=856210721-29112007><FONT face=Arial color=#0000ff size=2>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?</FONT></SPAN></DIV>
<DIV><SPAN class=856210721-29112007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=856210721-29112007><FONT face=Arial color=#0000ff
size=2>Thanks!<BR>-Steve</FONT></SPAN></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>--<BR>Steve Huston, Riverace Corporation<BR>Want to take ACE
training on YOUR schedule?<BR>See <A
href="http://www.riverace.com/training.htm">http://www.riverace.com/training.htm</A><BR></FONT></P>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
ace-bugs-bounces@cse.wustl.edu [mailto:ace-bugs-bounces@cse.wustl.edu] <B>On
Behalf Of </B>Greg Popovitch<BR><B>Sent:</B> Thursday, November 29, 2007 2:23
PM<BR><B>To:</B> ace-bugs@cse.wustl.edu<BR><B>Subject:</B> [ace-bugs] trying
to fix an ACE hang<BR><BR></FONT></DIV>
<DIV class=Section1>
<P class=MsoNormal>Hi,<o:p></o:p></P>
<P class=MsoNormal> <o:p></o:p></P>
<P class=MsoNormal>I have a hang on Windows Vista 64 and also on linux 64
(RHEL 4). <o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>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.<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>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.<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>My question: <o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>In file Message_Queue_T.cpp,<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Would it be OK to move the “this->notify ()” outside of
the scope of the ACE_GUARD in:<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>template <ACE_SYNCH_DECL> int<o:p></o:p></P>
<P class=MsoNormal>ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_head
(ACE_Message_Block *new_item,<o:p></o:p></P>
<P
class=MsoNormal>
ACE_Time_Value *timeout)<o:p></o:p></P>
<P class=MsoNormal>{<o:p></o:p></P>
<P class=MsoNormal> ACE_TRACE
("ACE_Message_Queue<ACE_SYNCH_USE>::enqueue_head");<o:p></o:p></P>
<P class=MsoNormal> int queue_count = 0;<o:p></o:p></P>
<P class=MsoNormal> {<o:p></o:p></P>
<P class=MsoNormal> ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T,
ace_mon, this->lock_, -1);<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal> if (this->state_ ==
ACE_Message_Queue_Base::DEACTIVATED)<o:p></o:p></P>
<P class=MsoNormal> {<o:p></o:p></P>
<P class=MsoNormal> errno =
ESHUTDOWN;<o:p></o:p></P>
<P class=MsoNormal> return
-1;<o:p></o:p></P>
<P class=MsoNormal> }<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal> if (this->wait_not_full_cond
(ace_mon, timeout) == -1)<o:p></o:p></P>
<P class=MsoNormal> return -1;<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal> queue_count = this->enqueue_head_i
(new_item);<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal> if (queue_count == -1)<o:p></o:p></P>
<P class=MsoNormal> return -1;<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal> this->notify ();
//******** move after closing brace below ??? ******<o:p></o:p></P>
<P class=MsoNormal> }<o:p></o:p></P>
<P class=MsoNormal> return queue_count;<o:p></o:p></P>
<P class=MsoNormal>}<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal> ACE VERSION: 5.6<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal> HOST MACHINE and OPERATING
SYSTEM:<o:p></o:p></P>
<P class=MsoNormal> Vindows
Vista<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal> TARGET MACHINE and OPERATING SYSTEM, if
different from HOST:<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal> COMPILER NAME AND VERSION (AND
PATCHLEVEL):<o:p></o:p></P>
<P class=MsoNormal> Visual Studio
2005<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Thanks,<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>greg<o:p></o:p></P></DIV></BLOCKQUOTE></BODY></HTML>