[omniORB] omniORB 2.8.0 and CC -compat=4 on Solaris 2.6 => segfaults

Landon Boyd landon@infointeractive.com
Fri, 5 May 2000 16:40:22 -0300


BACKGROUND:

I'd like to link with omniORB and another library for Sun CC 4.2.  I am using
CC 5.0, so I am using the -compat=4 flag.  I am compiling on Solaris 2.6.

To compile omniORB 2.8.0 with CC -compat=4, I have done the following:

config/config.mk:
  platform = sun4_sosV_5.6

mk/platforms/sun4_sosV_5.6.mk:
  CXXOPTIONS = -compat=4

Modified the following files to look for the __SUNPRO_CC_COMPAT macro.
  include/omniORB2/CORBA_sysdep.h
  src/appl/omniNames/log.cc
  src/lib/omniORB2/orbcore/tcpSocketMTfactory.cc
  src/tool/omniidl2/include/ast_decl.hh

For example, a directive like this:

#if (__SUNPRO_CC < 0x500)

was changed to this:

#if (__SUNPRO_CC < 0x500 || __SUNPRO_CC_COMPAT == 4)


PROBLEM:

omniORB compiles fine, but when running the example programs I get segfaults.

For example, if I run eg2_impl and then eg2_clt, eg2_clt runs successfully,
but then the server segfaults.  Trace output is included at the end of this
message.

Has anyone seen this problem, or is there any insight as to how I might
get around it?

Please be sure that I am included as a recipient of any replies as I am not
subscribed to this list.  Any help would be greatly appreciated!


DEBUGGING INFO:

./eg2_impl -ORBtraceLevel 100
gateKeeper is tcpwrapGK 1.0 - based on tcp_wrappers_7.6 
strand Rope::incrRefCount: old value = 0
strand Rope::incrRefCount: old value = 0
strand Ripper: start.
scavenger : start.
'IOR:000000000000000d49444c3a4563686f3a312e3000000000000000010000000000000028000100000000000c3137322e31362e312e353000c3c920200000000c3913137520c3c4ad00000002'
tcpSocketMTfactory Rendezvouser: start.
tcpSocketMTfactory Rendezvouser: block on accept()
scavenger : scanning connections
tcpSocketMTfactory Rendezvouser: unblock from accept()
tcpSocketMTfactory Rendezvouser: accept new strand.
tcpSocketMTfactory Rendezvouser: block on accept()
tcpSocketMTfactory Worker: start.
connect from 172.16.1.50
ll_recv: 32 bytes
4749 4f50 0100 0003 0000 0014 0000 0001 GIOP............
0000 000c 3913 1375 20c3 c4ad 0000 0002 
ll_send: 20 bytes
4749 4f50 0100 0004 0000 0008 0000 0001 GIOP............
0000 0001                               ....
ll_recv: 79 bytes
4749 4f50 0100 0000 0000 0043 0000 0000 GIOP.......C....
0000 0002 0113 1375 0000 000c 3913 1375 .......u....9..u
20c3 c4ad 0000 0002 0000 000b 6563 686f  ...........echo
5374 7269 6e67 0000 0000 0007 6e6f 626f String......nobo
6479 0000 0000 0007 4865 6c6c 6f21 0000 
ll_send: 35 bytes
4749 4f50 0100 0001 0000 0017 0000 0000 GIOP............
0000 0002 0000 0000 0000 0007 4865 6c6c ............Hell
6f21 0000                               o!..
Segmentation Fault



./eg2_clt -ORBtraceLevel 100 'IOR:000000000000000d49444c3a4563686f3a312e3000000000000000010000000000000028000100000000000c3137322e31362e312e353000c3c920200000000c3913137520c3c4ad00000002'
gateKeeper is tcpwrapGK 1.0 - based on tcp_wrappers_7.6 
strand Rope::incrRefCount: old value = 0
strand Rope::incrRefCount: old value = 0
ll_send: 32 bytes
4749 4f50 0100 0003 0000 0014 0000 0001 GIOP............
0000 000c 3913 1375 20c3 c4ad 0000 0002 
ll_recv: 20 bytes
4749 4f50 0100 0004 0000 0008 0000 0001 GIOP............
0000 0001                               ....
ll_send: 79 bytes
4749 4f50 0100 0000 0000 0043 0000 0000 GIOP.......C....
0000 0002 0113 1375 0000 000c 3913 1375 .......u....9..u
20c3 c4ad 0000 0002 0000 000b 6563 686f  ...........echo
5374 7269 6e67 0000 0000 0007 6e6f 626f String......nobo
6479 0000 0000 0007 4865 6c6c 6f21 0000 
ll_recv: 35 bytes
4749 4f50 0100 0001 0000 0017 0000 0000 GIOP............
0000 0002 0000 0000 0000 0007 4865 6c6c ............Hell
6f21 0000                               o!..
I said,"Hello!". The Object said,"Hello!"
strand Rope::decrRefCount: old value = 1
strand Rope::decrRefCount: old value = 1
strand Ripper: start.
scavenger : start.
scavenger : exit.
strand Ripper: exit.


And here is a stack trace from when the server cored:

#0  0xef751964 in __0o5FCORBAJExceptiondtv ()
   from 3rdParty/omniORB_280-2/lib/sun4_sosV_5.6/libomniORB2.so.8
#1  0xef75cfb4 in __0fPtcpSocketStrandHll_recvPvUi ()
   from 3rdParty/omniORB_280-2/lib/sun4_sosV_5.6/libomniORB2.so.8
#2  0xef759298 in __0fUreliableStreamStrandFfetchUl ()
   from 3rdParty/omniORB_280-2/lib/sun4_sosV_5.6/libomniORB2.so.8
#3  0xef758dcc in __0fUreliableStreamStrandHreceiveUiUciTC ()
   from 3rdParty/omniORB_280-2/lib/sun4_sosV_5.6/libomniORB2.so.8
#4  0xef7460d8 in __0fRNetBufferedStreamHreceiveUiUc ()
   from 3rdParty/omniORB_280-2/lib/sun4_sosV_5.6/libomniORB2.so.8
#5  0xef745800 in __0fRNetBufferedStreamOget_char_arrayPUci65EomniLalignment_tUc ()
   from 3rdParty/omniORB_280-2/lib/sun4_sosV_5.6/libomniORB2.so.8
#6  0xef73c5b4 in __0fGGIOP_SKdispatcherP6GStrandT ()
   from 3rdParty/omniORB_280-2/lib/sun4_sosV_5.6/libomniORB2.so.8
#7  0xef75e08c in __0fPtcpSocketWorkerI_realRunPvT ()
   from 3rdParty/omniORB_280-2/lib/sun4_sosV_5.6/libomniORB2.so.8
#8  0xef6e27b4 in omni_thread_wrapper ()
   from 3rdParty/omniORB_280-2/lib/sun4_sosV_5.6/libomnithread.so.2


-- 

==================================================================
Landon Boyd                          landon@interactive.ca
Solutions Developer,                 http://chebucto.ns.ca/~landon
infointeractive                      902-832-5035
==================================================================