[omniORB] Re:2nd invocation in case of timeouts

Masaaki Sekiya sekiya@nagoya.ydc.co.jp
Wed, 6 Dec 2000 18:45:53 +0900 (JST)


Hi,
I sent a mail before, but I have't received any reply here.
Sorry to send same issue again, I send it with a detail.

I wrote:
> I'm using omniORB 3.0.2 on HP-UX11.00.
> When a client invokes server object method with 
> -ORBclientCallTimeOutPeriod,
> ( which not to return for long time )
> a server object method seems to be invoked twice.
> 2nd invocation seems to be on the time that client timeout is expired.
> A few seconds after 2nd invocation occured,client catches COMM_FAILURE.
> Is this a right action ?

This symptoms occurs in echo example.
I slightly changed eg2_impl.cc as below.

#include <unistd.h>
#include <stdio.h>

char* Echo_i::echoString(const char* mesg)
{
  printf("Echo_i::echoString\n");
  sleep(10);
  return CORBA::string_dup(mesg);
}

Then I started eg2_impl and eg2_clt as below.

%eg2_impl
%eg2_clt 'IOR:0000..' -ORBclientCallTimeOutPeriod 2

eg2_impl displays "Echo_i::echoString" twice.
After that, eg2_clt displays "Caught system exception COMM_FAILURE".

I found it seems to be related with defaultTransientExceptionHandler
with "-ORBtraceLevel 40".
It seems that socket doesn't be cleared immediately after ::shutdown(), 
so defaultTransientExceptionHandler succesfully send a same message to
server..

Is it my unique problem ?

Here is a client log with "-ORBtraceLevel 40".

mniORB: strand Ripper: start.
omniORB: scavenger : start.
omniORB: gateKeeper is not installed. All incoming are accepted.
omniORB: Initialising omniDynamic library.
omniORB: strand Rope::incrRefCount: old value = 0
omniORB: Creating ref to remote: root<0>
 target id      : IDL:omg.org/CORBA/Object:1.0
 most derived id: IDL:Echo:1.0
omniORB: LocateRequest to remote: root<0>
ll_send: 34 bytes
4749 4f50 0100 0003 0000 0016 0000 0001 GIOP............
0000 000e fe3a 2e02 00db 2500 0000 0000 .....:....%.....
0000                                    ..
ll_recv: 20 bytes
4749 4f50 0100 0004 0000 0008 0000 0001 GIOP............
0000 0001                               ....
ll_send: 83 bytes
4749 4f50 0100 0000 0000 0047 0000 0000 GIOP.......G....
0000 0002 013a 2e02 0000 000e fe3a 2e02 .....:.......:..
00db 2500 0000 0000 0000 0000 0000 000b ..%.............
6563 686f 5374 7269 6e67 0000 0000 0007 echoString......
6e6f 626f 6479 0000 0000 0007 4865 6c6c nobody......Hell
6f21 00                                 o!.
omniORB: scavenger : scanning connections
omniORB: scavenger : scanning connections
omniORB: tcpSocketStrand::real_shutdown() fd no. 3 Done
omniORB: throw omniConnectionBroken from tcpSocketMTfactory.cc:1058
omniORB: tcpSocketStrand::~Strand() close socket no. 3
omniORB: defaultTransientExceptionHandler: retry 0th times.
ll_send: 83 bytes
4749 4f50 0100 0000 0000 0047 0000 0000 GIOP.......G....
0000 0001 0100 0000 0000 000e fe3a 2e02 .............:..
00db 2500 0000 0000 0000 0000 0000 000b ..%.............
6563 686f 5374 7269 6e67 0000 0000 0007 echoString......
6e6f 626f 6479 0000 0000 0007 4865 6c6c nobody......Hell
6f21 00                                 o!.
omniORB: scavenger : scanning connections
omniORB: scavenger : scanning connections
omniORB: tcpSocketStrand::real_shutdown() fd no. 3 Done
omniORB: throw omniConnectionBroken from tcpSocketMTfactory.cc:1058
omniORB: tcpSocketStrand::~Strand() close socket no. 3
omniORB: throw COMM_FAILURE from remoteIdentity.cc:178
omniORB: omniRemoteIdentity deleted.
omniORB: strand Rope::decrRefCount: old value = 1
omniORB: ObjRef(IDL:Echo:1.0) -- deleted.
Caught system exception COMM_FAILURE -- unable to contact the object.

-----
Thanks.

Masaaki Sekiya