[omniORB] sa_family compilation error on Sun 64 bit

Tolar, Richard richard.tolar at cgi.com
Mon Aug 31 14:37:10 BST 2009


Still no luck.  We disabled ipv6  (via  configure --disable-ipv6), and
rebuilt, but omniNames still crashes at startup.

Running it:
omniNames -start 8999

Yields:
omniorb-4.1.0[37]: 24706 Bus Error

Pulling it into dbx:

dbx
/project/tapestry/3p_sandbox/omniORB/omniORB-4.1.4/installnew/bin/omniNa
mes
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.6' in
your .dbxrc
Reading omniNames
Reading ld.so.1
Reading libomniORB4.so.1.4
Reading libomnithread.so.3.4
Reading libpthread.so.1
Reading librt.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading libCstd.so.1
Reading libCrun.so.1
Reading libm.so.2
Reading libthread.so.1
Reading libc.so.1
Reading libaio.so.1
Reading libmd.so.1
(dbx) run -start 8999
Running: omniNames -start 8999
(process id 5662)
Reading libc_psr.so.1
t at 1 (l at 1) signal BUS (invalid address alignment) in operator>>= at line
422 in file "cdrStream.h"
  422       CdrMarshal(s,_CORBA_ULong,omni::ALIGN_4,a);
 (dbx) where
current thread: t at 1
=>[1] operator>>=(a = ???, s = CLASS) (optimized), at 0xffffffff7f305fb4
(line ~422) in "cdrStream.h"
  [2] omni::omni_ior_initialiser::attach(this = ???) (optimized), at
0xffffffff7f32656c (line ~1676) in "ior.cc"
  [3] CORBA::ORB_init(argc = ???, argv = ???, orb_identifier = ???,
options = ???) (optimized), at 0xffffffff7f2fca98 (line ~648) in
"corbaOrb.cc"
  [4] omniNames::omniNames(this = ???, port = ???, logdir = ???, errlog
= ???, ignoreport = ???, nohostname = ???, always = ???, argc = ???,
argv = ???) (optimized), at 0x10000f240 (line ~299) in "omniNames.cc"
  [5] main(argc = ???, argv = ???) (optimized), at 0x10000ee58 (line
~222) in "omniNames.cc"
(dbx)
(dbx)


Looking at the code for cdrStream.h , here's the few lines around line
422.

417    friend inline void operator>>= (_CORBA_ULong a, cdrStream& s) {
   418      if (s.pd_marshal_byte_swap) {
   419        _CORBA_ULong t = Swap32(a);
   420        a = t;
   421      }
   422      CdrMarshal(s,_CORBA_ULong,omni::ALIGN_4,a);
   423    }
   424

It seems curious to me that we are using a Swap32() and ALIGN_4  on an
'unsigned long' - when an unsigned long is 64 bits in a 64-bit compile
(which we doing).

I did a diff between the 4.1.3 version of cdrStream.h and the 4.1.4
version, and there weren't any code differences (just a copyright
change).

-Richard

CONFIDENTIALITY NOTICE: Proprietary/Confidential Information belonging
to CGI Group Inc. and its affiliates may be contained in this message.
If you are not a recipient indicated or intended in this message (or
responsible for delivery of this message to such person), or you think
for any reason this message may have been addressed to you in error, you
may not use or copy or deliver this message to anyone else. In such
case, you should destroy this message, and are asked to notify the
sender by reply email.


-----Original Message-----
From: Mark Zimmerman [mailto:markzimm at frii.com] 
Sent: Thursday, August 27, 2009 11:02 AM
To: Giles, Candy
Cc: Tolar, Richard; omniorb-list at omniorb-support.com
Subject: Re: [omniORB] sa_family compilation error on Sun 64 bit

Candy,

Yeah, me too... It looks like something is broken in ipv6 support. If
you can live without ipv6, then reconfigure with --disable-ipv6 and
rebuild. You can back out the __sun__ -> __sunos__ change since that
stuff will not get used.

-- Mark

On Wed, Aug 26, 2009 at 02:23:04PM -0700, Giles, Candy wrote:
> Mark, 
> 
> Thanks for your input.  I made the change and was able to get a
> successful build.  However, now I am getting a bus error during start
> up. 
> Any help that anyone can provide would be greatly appreciated. 
> 
> 
> The error is 
> 	omniORB: Warning: ioctl SIOCGICONF failed.
> 	Unable to obtain the list of all interface addresses.
> 	Bus Error
> 
> I am starting the app with: 
> 	/project/tapestry/3p_sandbox/omniORB/omniORB-4.1.4/install64/bin
> 
> 		-start 8999
> 
> 
> The config file we are using has had 1 change from the sample.cfg and
> that is to use our port.  Below is the diff between the 2 files:  
> 
> 	diff sample.cfg tapestry.cfg
> 		> InitRef = NameService=corbaname::162.70.15.12:8999
> 		>
> 
> We are point to the following config file: echo $OMNIORB_CONFIG
> /project/tapestry/3p_sandbox/omniORB/omniORB-4.1.4/tapestry.cfg
> 
> The ldd for the executable is as follows: 
> 
> :.../install64/bin > ldd omniNames
>         libomniORB4.so.1 =>
>
/project/tapestry/3p_sandbox/omniORB/omniORB-4.1.4/install64/lib/libomni
> ORB4.so.1
>         libomnithread.so.3 =>
>
/project/tapestry/3p_sandbox/omniORB/omniORB-4.1.4/install64/lib/libomni
> thread.so.3
>         libpthread.so.1 =>       /lib/sparcv9/libpthread.so.1
>         librt.so.1 =>    /lib/sparcv9/librt.so.1
>         libsocket.so.1 =>        /lib/sparcv9/libsocket.so.1
>         libnsl.so.1 =>   /lib/sparcv9/libnsl.so.1
>         libCstd.so.1 =>  /usr/lib/sparcv9/libCstd.so.1
>         libCrun.so.1 =>  /usr/lib/sparcv9/libCrun.so.1
>         libm.so.2 =>     /lib/sparcv9/libm.so.2
>         libthread.so.1 =>        /lib/sparcv9/libthread.so.1
>         libc.so.1 =>     /lib/sparcv9/libc.so.1
>         libaio.so.1 =>   /lib/64/libaio.so.1
>         libmd.so.1 =>    /lib/64/libmd.so.1
>         libmp.so.2 =>    /lib/64/libmp.so.2
>         libscf.so.1 =>   /lib/64/libscf.so.1
>         libdoor.so.1 =>  /lib/64/libdoor.so.1
>         libuutil.so.1 =>         /lib/64/libuutil.so.1
>         libgen.so.1 =>   /lib/64/libgen.so.1
>         /platform/SUNW,T5140/lib/sparcv9/libc_psr.so.1
>         /platform/SUNW,T5140/lib/sparcv9/libmd_psr.so.1
> 
> 
> 
> Thanks
> Candy Giles
> -----Original Message-----
> From: Mark Zimmerman [mailto:markzimm at frii.com] 
> Sent: Wednesday, August 26, 2009 1:41 PM
> To: Tolar, Richard
> Cc: omniorb-list at omniorb-support.com; Giles, Candy
> Subject: Re: [omniORB] sa_family compilation error on Sun 64 bit
> 
> In src/lib/omniORB/orbcore/tcp/tcpTransportImpl.cc, on line 389,
> try changing __sun__ to __sunos__
> 
> 
> On Wed, Aug 26, 2009 at 08:42:38AM -0700, Tolar, Richard wrote:
> > Hello, I'm having compilation problems building OmniOrb 4.1.4 in
> 64-bit
> > mode on Solaris 10.
> > 
> >  
> > 
> > The error:
> > 
> > -------
> > 
> >  
> > 
> > /opt/installs/sun_studio/12/SUNWspro/prod/bin/CC -c -m64 -O2 -g
-I..
> > -I../../../../../src/lib/omniORB/orbcore/..
> > -I../../../../include/omniORB4/internal
> > -I../../../../../include/omniORB4/internal -DUsePthread -D_REENTRANT
> -mt
> > -DUSE_omniORB_logStream -D_OMNIORB_LIBRARY
> > -DOMNIORB_VERSION_STRING='"4.1.4"'
-DOMNIORB_VERSION_HEX='0x040104F1'
> > -DCONFIG_DEFAULT_LOCATION='"/etc/omniORB.cfg"'
> > -DCONFIG_ENV='"OMNIORB_CONFIG"' -DUnixArchitecture -DBSD_COMP    -I.
> > -I../../../../../src/lib/omniORB/orbcore -I../../../../include
> > -I../../../../../include -D__OSVERSION__=5 -D__sunos__ -D__sparc__
-o
> > static/Namingstub.o
> ../../../../../src/lib/omniORB/orbcore/Namingstub.cc
> > 
> > /opt/installs/sun_studio/12/SUNWspro/prod/bin/CC -c -m64 -O2 -g
-I..
> > -I../../../../../src/lib/omniORB/orbcore/..
> > -I../../../../include/omniORB4/internal
> > -I../../../../../include/omniORB4/internal -DUsePthread -D_REENTRANT
> -mt
> > -DUSE_omniORB_logStream -D_OMNIORB_LIBRARY
> > -DOMNIORB_VERSION_STRING='"4.1.4"'
-DOMNIORB_VERSION_HEX='0x040104F1'
> > -DCONFIG_DEFAULT_LOCATION='"/etc/omniORB.cfg"'
> > -DCONFIG_ENV='"OMNIORB_CONFIG"' -DUnixArchitecture -DBSD_COMP    -I.
> > -I../../../../../src/lib/omniORB/orbcore -I../../../../include
> > -I../../../../../include -D__OSVERSION__=5 -D__sunos__ -D__sparc__
-o
> > static/tcpTransportImpl.o
> > ../../../../../src/lib/omniORB/orbcore/tcp/tcpTransportImpl.cc
> > 
> > "../../../../../src/lib/omniORB/orbcore/tcp/tcpTransportImpl.cc",
line
> > 399: Warning (Anachronism): Attempt to redefine ifc_buf without
using
> > #undef.
> > 
> > "../../../../../src/lib/omniORB/orbcore/tcp/tcpTransportImpl.cc",
line
> > 400: Warning (Anachronism): Attempt to redefine ifc_req without
using
> > #undef.
> > 
> > "../../../../../src/lib/omniORB/orbcore/tcp/tcpTransportImpl.cc",
line
> > 401: Warning (Anachronism): Attempt to redefine ifr_addr without
using
> > #undef.
> > 
> > "../../../../../src/lib/omniORB/orbcore/tcp/tcpTransportImpl.cc",
line
> > 460: Error: sa_family is not a member of sockaddr_storage.
> > 
> > "../../../../../src/lib/omniORB/orbcore/tcp/tcpTransportImpl.cc",
line
> > 473: Error: sa_family is not a member of sockaddr_storage.
> > 
> > "../../../../../src/lib/omniORB/orbcore/tcp/tcpTransportImpl.cc",
line
> > 482: Error: sa_family is not a member of sockaddr_storage.
> > 
> > 3 Error(s) and 3 Warning(s) detected.
> > 
> > make[4]: *** [static/tcpTransportImpl.o] Error 3
> > 
> > make[4]: Leaving directory
> >
>
`/project/tapestry/3p_sandbox/omniORB/omniORB-4.1.4/buildtemp/src/lib/om
> > niORB/orbcore'
> > 
> > make[3]: *** [export] Error 2
> > 
> > make[3]: Leaving directory
> >
>
`/project/tapestry/3p_sandbox/omniORB/omniORB-4.1.4/buildtemp/src/lib/om
> > niORB'
> > 
> > make[2]: *** [export] Error 2
> > 
> > make[2]: Leaving directory
> >
`/project/tapestry/3p_sandbox/omniORB/omniORB-4.1.4/buildtemp/src/lib'
> > 
> > make[1]: *** [export] Error 2
> > 
> > make[1]: Leaving directory
> > `/project/tapestry/3p_sandbox/omniORB/omniORB-4.1.4/buildtemp/src'
> > 
> > make: *** [all] Error 2
> > 
> >  
> > 
> > -------
> > 
> >  
> > 
> > We've been successfully using a 64-bit compiles of OmniOrb for
years,
> > including:
> > 
> > OmniOrb 4.0.6
> > 
> > OmniOrb 4.1.0
> > 
> > A month ago I downloaded 4.1.3 and had no problems compiling or
> running
> > in 64-bit mode.
> > 
> > However, 4.1.4 has the above error.
> > 
> >  
> > 
> > Suggestions?
> > 
> >  
> > 
> > Compiler
> > 
> > >/opt/installs/sun_studio/12/SUNWspro/bin/CC -V
> > 
> > CC: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25
> > 
> >  
> > 
> > Box:
> > 
> > >uname -a
> > 
> > SunOS thor 5.10 Generic_137111-08 sun4v sparc SUNW,T5140
> > 
> >  
> > 
> >  
> > 
> > CONFIDENTIALITY NOTICE: Proprietary/Confidential Information
belonging
> > to CGI Group Inc. and its affiliates may be contained in this
message.
> > If you are not a recipient indicated or intended in this message (or
> > responsible for delivery of this message to such person), or you
think
> > for any reason this message may have been addressed to you in error,
> you
> > may not use or copy or deliver this message to anyone else. In such
> > case, you should destroy this message, and are asked to notify the
> > sender by reply email.
> > 
> >  
> > 
> 
> > _______________________________________________
> > omniORB-list mailing list
> > omniORB-list at omniorb-support.com
> > http://www.omniorb-support.com/mailman/listinfo/omniorb-list
> 



More information about the omniORB-list mailing list