[omniORB] SIGSEGV if CancelRequest
Andrei Zaparii
zappa at yandex-team.ru
Tue Apr 20 23:08:04 BST 2004
Hi!
My servant sometimes takes very long to complete the task and at the
case of timeout OpenORB sends CancelRequest. This leads to untimely
destruction of the GIOP_S object my servant is executed in and
segmentation fault at the moment of the SendReply.
Here is what i was able to reconstruct (i added some debugging to
illustrate what's happening):
omniORB: (3) Accepted connection from giop:tcp:x.x.x.x:40123 because of
this rule: "* unix,ssl,tcp"
Init ctor GIOP_S instance 0x8099a80
Init ctor GIOP_S_Holder instance 0xbefff9b0 for IOP_S 0x8099a80
Recieved CancelRequest to 432
omniORB: (3) Dispatching remote call 'MyMethod' to: root/guts<guts> (active)
in omniCallHandle::upcall desc.pd_op = MyMethod
in omniCallHandle::upcall pointer 0x8099a80 check
in omniCallHandle::upcall operation: MyMethod >>>
DEBUG [2004-04-20 21:46:01 +0400] 23497 guts_i.cpp(199): In NS_Guts_i:
:MyMethod
Init ctor GIOP_S instance 0x809c038
Init ctor GIOP_S_Holder instance 0xbedff9b0 for IOP_S 0x809c038
Init ctor GIOP_S_Holder instance 0xbebff9b0 for IOP_S 0x8099a80
Recieved CancelRequest to 432
in GIOP_S::dispatcher calling to handleCancelRequest
omniORB: (5) Received and ignored a CancelRequest message.
Destroying GIOP_S instance 0x8099a80
Destroying GIOP_S_Holder instance 0xbebff9b0 releasing iop_s 0x8099a80
in omniCallHandle::upcall pointer 0x8099a80 check
Check is performed via call
pd_iop_s->operation_name()
as i do in string marked with >>>
This check is performed just before call to
pd_iop_s->SendReply();
is performed
My servant now does only following:
sleep(n) - where n is enough to trigger timeout
returns sequence of octets
It can work forever if no timeouts (and hence CancelRequest messages) occur.
The policy i use for POA is:
pl[0] = rootPOA->create_id_assignment_policy(PortableServer::USER_ID);
pl[1] = rootPOA->create_lifespan_policy(PortableServer::PERSISTENT);
pl[2] = rootPOA->create_servant_retention_policy(PortableServer::RETAIN)
For some reason, as it seems, in giopWorker::real_execute() unnecessary
instance of GIOP_S_Holder is created in do{}while(go && !exit_on_error)
loop.
As you can see what handleCancelRequest does has no real meaning since
destruction is a result of superfluous instantiation of GIOP_S_Holder
At this point i'm completely lost. Can anybody please help me?
--
Regards,
Andrei Zaparii
More information about the omniORB-list
mailing list