[omniORB] eg3: crash on exit on LynxOS

Mason,Neil Neil.Mason@marconicomms.com
Fri, 21 May 1999 15:41:16 +0000 (GMT)


----------
From: owner-omniorb-list@uk.research.att.com
To: omniorb-list@uk.research.att.com
Subject: [omniORB] eg3: crash on exit on LynxOS
Date: 19 May 1999 13:27

Hello,

I build omniORB for LynxOS 2.5.0 on Motorola 68040 (libaries+examples)
using gcc version 2.7-96q1 configured as cross-compiler on an AIX 4.2
workstation. When I run the eg3 example, the client prints out the echo 
message, but then crashes on exit with Break (core dumped).

Here is the execution trace (all IORs truncated) and back trace from
the core dump.

-------------------------------------------------------------------

> eg3_clt -ORBtraceLevel 20
omniORB2 gateKeeper is not installed. All incoming are accepted.
Rope::incrRefCount: old value = 0
Rope::incrRefCount: old value = outScavenger: start.0
omniORB: Getting initial object reference for NameService from 'IOR:...
Done CORBA::InitialReferences::get().
Rope::incrRefCount: old value = 0
I said,"Hello!". The Object said,"Hello!"
Rope::decrRefCount: old value = 1
omniORB: WARNING - Proxy object not released.
  IR ID   : IDL:omg.org/CosNaming/NamingContext:1.0
  RefCount: 1
  ObjRef  : IOR:...
omniORB: WARNING - Proxy object not released.
  IR ID   : omg.org/CORBA/InitialReferences:1.0
  RefCount: 1
  ObjRef  : IOR:...
omniORB: Initial references:
  Name  : NameService
  IR ID : IDL:omg.org/CosNaming/NamingContext:1.0
  ObjRef: IOR:...
outScavenger: woken by poke()
outScavenger: exit.
Break (core dumped)

------------------------------------------

(gdb) bt
#0  0x169764 in kill ()
#1  0x16979c in raise ()
#2  0x167542 in abort ()
#3  0x16287c in __unwind_function (ptr=0xa8c1e)
#4  0xa8c58 in global constructors keyed to
StrandScavenger::initInScavenger ()
#5  0x1685e6 in exit ()
#6  0x16350c in runmainthread ()

-------------------------------------------
NJM>	I got very similar errors when proting omniORB 2.5.0 to LynxOS 
 2.5.1 on Intel based hardware.  I think this was due to LynxOS 
 returning the error EINTR from a call to pthread_cond_timed wait.  
 This is not supposed to be a valid return from this function and 
 omniORB does not handle it.  This and other LynxOS bugs and work 
 arounds are explained in document I wrote which is available in plain text at:

www.uk.research.att.com/omniORB/lynxOS_port.txt

NJM>	I have tried porting omniORB 2.7.1 to LynxOS 3.0 with gcc 2.7-97r1 
 but came across a strange error on operator overloading that seemed to 
 be masking an internal compiler error.  We have raised this with 
 LynxOS support, the answer returned has not been very satisfactory .  
 Sorry not to be of more help but I don't have access to a development 
 machine at the moment.  

The eg3_impl works fine on Lynx with an AIX client, but if for some
reason (eg, the name server is down) it gets a fatal exception then 
it crashes in the very similar way:

(gdb) bt
#0  0x1695b0 in kill ()
#1  0x1695e8 in raise ()
#2  0x16738e in abort ()
#3  0x1626c8 in __unwind_function (ptr=0x17ba)
#4  0x17f4 in global constructors keyed to Echo_i::echoString ()

I think, it is somehow related to exceptions handling (not thread
safe?).
Everything was compiled with -frtti -fhandle-exceptions -mthreads

Any suggestions?

Thanks in advance,

   Nikolai Trofimov

NJM>	Try making the changes I found that are LynxOS specific to a POSIX 
 for Motorola build.  Good luck.

Neil Mason, Marconi Communications