[omniORB] SEGV on Red Hat Enterprise Linux AS release 3 in
servant_to_reference
radamkie at kdm.pl
radamkie at kdm.pl
Thu Mar 9 15:13:06 GMT 2006
Hello,
I have problem with Segmentation fault by migration omniORB application
from SunOS Sparc platform to Linux ix86 platform. On the first everything goes
allright. I use there omniORB4.0.3. By migration on Linux platform I tested
the same application with omniORB4.0.3 but also with omniORB4.1.0. In
both cases I receive Segmentation fault error in this place (marked by
***)
CORBA::Object_var obj;
orb = CORBA::ORB_init(argc, argv, "omniORB4");
obj = orb->resolve_initial_references("RootPOA");
poa = PortableServer::POA::_narrow(obj);
PortableServer::POAManager_var pman = poa->the_POAManager();
pman->activate();
..
FILE *file = fopen(NameServiceIORFileName,"r")
...
fread(buffer, sizeof (unsigned char), BUFFER_SIZE, file);
...
obj = orb->string_to_object(buffer);
...
root = CosNaming::NamingContext::_narrow(obj);
...
PortableServer::ObjectId_var obj_id = poa->activate_object(servant);
...
/***/ CORBA::Object_var ref = poa->servant_to_reference(servant);
...
--------------------------------------------------
No core file.
Deeper analize show that problem is by line marked below by "***" in
..../src/lib/omniORB/orbcore/poa.cc file in function
servant_to_reference()
CORBA::Object_ptr
omniOrbPOA::servant_to_reference(PortableServer::Servant p_servant)
{
....
if( !pd_policy.multiple_id ) {
// Search the servants identities, to see if it is
// activated in this poa.
omnivector<omniObjTableEntry*>::const_iterator i, last;
i = p_servant->_activations().begin();
last = p_servant->_activations().end();
for (; i != last; i++) {
/***/ if ((*i)->adapter() == this) {
omniObjTableEntry* entry = *i;
OMNIORB_ASSERT(pd_poaIdSize == 0 ||
omni::ptrStrMatch(pd_poaId, (const char*)entry->key()));
omniObjRef* objref =
omni::createLocalObjRef(p_servant->_mostDerivedRepoId(),
CORBA::Object::_PD_repoId, entry);
OMNIORB_ASSERT(objref);
return (CORBA::Object_ptr) objref->_ptrToObjRef(CORBA::Object
::_PD_repoId);
}
}
}
.....
}
My platform:
Red Hat Enterprise Linux AS release 3 (Taroon Update 5)
# uname -a
Linux 2.4.21-32.ELsmp #1 SMP Fri Apr 15 21:17:59 EDT 2005 i686 i686
i386 GNU/Linux
# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-52)
Can anybody help , how to resolve the problem with Segmentation fault?
Regards
Radek
More information about the omniORB-list
mailing list