<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>RE: endless loop when cancelRequest received. </TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P DIR=LTR><SPAN LANG="de"></SPAN><SPAN LANG="de"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Hello Duncan and All,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Our project uses omniOrb version 4.0.6 and we</FONT><FONT SIZE=2 FACE="Arial">‘</FONT><FONT SIZE=2 FACE="Arial"> ve just got the following issue:</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">When the client (non omniORb) sends a request</FONT> <FONT SIZE=2 FACE="Arial">to the servant (omniOrb) and the servant is not able to reply to the client (e.g. because the IP connectivity is disturbed) we observe that the client sends a CancelRequest to the servant. The servant then enters an endless loop in</FONT> <FONT SIZE=2 FACE="Arial">giopWorker::real_execute</FONT><FONT SIZE=2 FACE="Arial">()</FONT><FONT SIZE=2 FACE="Arial"> and occupies the full cpu. This leads later to a reboot of our application.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> do {</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> {</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> GIOP_S_Holder iops_holder(pd_strand,this);</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> GIOP_S* iop_s = iops_holder.operator->();</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> if (iop_s) {</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">exit_on_error = !iop_s->dispatcher();</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> }</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> else {</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Arial">exit_on_error = 1;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> }</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> }</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> go = pd_server->notifyWkDone(this,exit_on_error);</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> } while(go && !exit_on_error);</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Variable “go” keeps true and “exit_on_error” keeps false so that the loop is executed for ever. </FONT></SPAN></P>
<BR>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Looking at the code of</FONT> <FONT SIZE=2 FACE="Arial">CORBA::Boolean</FONT><FONT SIZE=2 FACE="Arial"></FONT> <FONT SIZE=2 FACE="Arial">GIOP_S::handleCancelRequest() </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">{</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> // We do not have the means to asynchronously abort the execution of</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> // an upcall by another thread. Therefore it is not possible to</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> // cancel a request that has already been in p</FONT><FONT SIZE=2 FACE="Arial">rogress. The best we</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> // can do is prevent the reply from happening.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> omniORB::logs(5, "Received a CancelRequest message.");</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> pd_state = WaitingForReply;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> response_expected(0);</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial"> return 1;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">}</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Would it be an acceptable solution to return 0 to avoid the</FONT> <FONT SIZE=2 FACE="Arial">endless loop without side effects. </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Is there any plan to improve the handling of cancelRequest in a future release ?</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Thanks in advance for any help</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="de"></SPAN><SPAN LANG="de"></SPAN><SPAN LANG="fr"></SPAN><SPAN LANG="fr"><FONT SIZE=2 FACE="Arial">Jean-Pierre Vinouse</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT SIZE=2 FACE="Arial">Alcatel-Lucent</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="fr"><FONT SIZE=2 FACE="Arial">Nuremberg Germany </FONT></SPAN></P>
<BR>
<BR>
<BR>
<BR>
<P DIR=LTR><SPAN LANG="de"></SPAN><SPAN LANG="de"></SPAN><SPAN LANG="fr"></SPAN></P>
</BODY>
</HTML>