[omniORB] LOCATION_FORWARD exception from a python method
baileyk at schneider.com
baileyk at schneider.com
Fri Dec 12 15:18:13 GMT 2003
omniORB 4.0.3, omniORBpy 2.3
I'm getting a SEGV from omni::locationForward() during a test case where a
python servant method throws a omniORB::LOCATION_FORWARD exception because
new_location.pd_id is null.
Everything is colocated in one process. I have a several servants in the
root POA, and then another POA with a servant locator that creates indirect
references only. The preinvoke method always throws a
PortableServer::ForwardRequest. The test case has the following sequence
1. client invokes on indirect reference
2. preinvoke is called on locator
3. locator calls invokes on a direct reference (ProcessManager) to find a
suitable direct reference, and throws ForwardRequest
4. client automatically reinvokes on the returned reference
5. servant gets request and decides it's the wrong 'flavor'
6. servant invokes on a reference to get a new indirect reference that
included 'flavor' specifier in the object key
7. servant throws omniORB.LOCATION_FORWARD
8. client again automatically reinvokes on this new indirect reference
9. preinvoke is called again on the locator
10. The locator now has more info on which object to forward to and finds
the right one from the ProcessManager (see #3)
11. locator throws ForwardRequest
12. client should finally invoke on the proper direct reference and get the
result it wants.
All code is Python, and all in a single process. I'm simulating a
distributed use case using all local POAs and servants. I'm designing for
a case of redundant load balanced replicas, but with some different flavors
among the replicas. If a request goes to the wrong flavor, then the system
should rebind the client to the right flavor with no extra client side
logic. Here's the end of the trace (25). I've tried to manually mark
where each step above begins
step 1
omniORB: Creating Python ref to in process:
root/implRepo<g..test.balance.group..>
target id : IDL:IMR_ObjTest/Tester:1.0
most derived id: IDL:IMR_ObjTest/Tester:1.0
omniORB: ObjRef(IDL:IMR_ObjTest/Tester:1.0) -- deleted.
step 2
omniORB: Creating ref to local: root<2>
target id : IDL:omg.org/CORBA/Object:1.0
most derived id: IDL:ImplRepo/ProcessManager:1.0
step 3
omniORB: Creating Python ref to local: root<2>
target id : IDL:omg.org/CORBA/Object:1.0
most derived id: IDL:ImplRepo/ProcessManager:1.0
omniORB: ObjRef(IDL:ImplRepo/ProcessManager:1.0) -- deleted.
omniORB: Creating Python ref to local: root<2>
target id : IDL:ImplRepo/ProcessManager:1.0
most derived id: IDL:ImplRepo/ProcessManager:1.0
omniORB: ObjRef(IDL:ImplRepo/ProcessManager:1.0) -- deleted.
step 4
omniORB: GIOP::LOCATION_FORWARD -- retry request.
step 5,6
omniORB: Creating ref to in process:
root/implRepo<g..test.balance.group..not.me.BalanceTestODD.obj.1>
target id : IDL:omg.org/CORBA/Object:1.0
most derived id: IDL:IMR_ObjTest/Tester:1.0
omniORB: Creating Python ref to in process:
root/implRepo<g..test.balance.group..not.me.BalanceTestODD.obj.1>
target id : IDL:IMR_ObjTest/Tester:1.0
most derived id: IDL:IMR_ObjTest/Tester:1.0
omniORB: ObjRef(IDL:IMR_ObjTest/Tester:1.0) -- deleted.
omniORB: ObjRef(IDL:IMR_ObjTest/Tester:1.0) -- deleted.
step 7
omniORB: GIOP::LOCATION_FORWARD -- retry request.
step 8
Segmentation Fault(coredump)
The SEGV happens because the pd_id field of the new_location parameter is
nil. However, I'm not sure what that means. Here's the full new_location
state
*new_location = {
pd_refCount = 1
pd_mostDerivedRepoId = 0x3575c8 "IDL:IMR_ObjTest/Tester:1.0"
pd_intfRepoId = 0x3575c8 "IDL:IMR_ObjTest/Tester:1.0"
pd_ior = 0x139ec8
pd_id = (nil)
pd_next = 0x3617b8
pd_prev = 0xfe3894e0
pd_flags = {
forward_location = 0
type_verified = 1U
object_exists = 0
transient_exception_handler = 0
commfail_exception_handler = 0
system_exception_handler = 0
static_repoId = 0
orb_shutdown = 0
}
pd_timeout_secs = 0
pd_timeout_nanosecs = 0
}
The exact line failing is
1172 omniLocalIdentity* new_lid =
omniLocalIdentity::downcast(new_id);
Any help appreciated.
Kendall
More information about the omniORB-list
mailing list