[omniORB] Re: Help.!!!!! getting segmentation fault when running omniORB4 server
as a task on linux-powerPC
Dan Kegel
dank@kegel.com
Thu, 28 Mar 2002 12:25:49 -0800
Sheshi Sankineni wrote:
> Actually, I was able to test omniORB on linux-powerpc as a standalone.
> I was able to talk regular IIOP as well as IIOP/SSL.
> Infact I was able to interop with omniORB,OrbixWeb,JOrbacus
> from the client side with my omniORB server running on linux-powerpc.
>
> However, when I run the ORB inside my main program as a task
> thats when the problem happens. As I said my main program is
> compiled with a cross compiler on linux x686 using gcc 2.95.2.
>
> However the omniORB library is compiled using gcc (2.95.3 which
> I downloaded and build after configuring with enable-threads=posix).
> Is there a different between gcc 2.95.2 & gcc 2.95.3.
> Would it help if I use gcc 2.95.2 to compile omniORB4 library ?
It's worth compiling *everything* with the same compiler to rule out
incompatibilities. I recommend trying gcc 3.0.2 or 3.0.3, actually...
> Also, some bug fixes might have gone into the library since I last
> downloaded. Should I take the latest and see if it solves the problem.
I'll let the omniorb people answer this. When did you download?
- Dan
> -----Original Message-----
> From: Dan Kegel [mailto:dank@kegel.com]
> Sent: Thursday, March 28, 2002 9:51 AM
> To: omniorb-list@uk.research.att.com; Sheshi Sankineni
> Subject: Re: Help.!!!!! getting segmentation fault when running omniORB4
> server as a task on linux-powerPC
>
> Sheshi Sankineni <Sheshi.Sankineni@cosinecom.com> wrote:
> > I downloaded omniORB4 and compiled with gcc 2.95.3 on linux-powerpc.
> >
> > (gcc was downloaded gcc 2.95.3 and configured it as follows
> > ./configure --prefix=/dvlp/ssankine/gcc/gcc-2.95.3 --enable-threads=posix
> > - --enable-languages=c,c++,objc --with-newlib --enable-shared=libgcc,libstdc++
> > and built it (doing make bootstrap) on linux-powerpc)
> >
> > I then used this gcc to compile the the omniORB library on linux-powerpc.
> >
> > The actual program where my ORB server (as a task) runs is compiled using
> > the cross compiler
> > (version 2.95.2) and used the newly compiled gcc's libraries from above
> > (libstdc++-libc6.2-2-2.10.0.0.so). When I try to contact this ORB server I
> > get a segmentation fault and my program aborts.
> >
> > Here is the stack trace from dbg
> >
> > omniORB: Server accepted connection from giop:tcp:172.xx.xx.xx:1710
> > [New Thread 107626 (LWP 32151)]
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 107626 (LWP 32151)]
> > 0x0f5dce94 in omni_tracedmutex::lock () from
> > /dvlp/ssankine/omni-ppc/lib/libomniORB4.so.0
> > (gdb) bt
> > #0 0x0f5dce94 in omni_tracedmutex::lock ()
> > from /dvlp/ssankine/omni-ppc/lib/libomniORB4.so.0
> > #1 0x0f680b6c in omniAsyncWorker::run ()
> > from /dvlp/ssankine/omni-ppc/lib/libomniORB4.so.0
> > #2 0x0f47e244 in omni_thread_wrapper ()
> > from /dvlp/ssankine/omni-ppc/lib/libomnithread.so.3
> > #3 0x0f715e84 in pthread_start_thread (arg=0x0) at manager.c:274
> > #4 0x0f715ec8 in pthread_start_thread_event (arg=0x727ffc00) at
> > manager.c:297
> > #5 0x0f3bb11c in clone () at soinit.c:64
> >
> > I would really appreciate if you let me know what is the reason for this
> > segmentation fault.
>
> I had a superficially similar problem (with omniorb3) a while ago; see
> http://www.uk.research.att.com/omniORB/archives/2002-01/0025.html
> for the discussion. Turned out I needed to make sure the powerpc
> had a hostname, and that its hostname was in its /etc/hosts.
> Your problem may be different. Have you run regression tests
> to make sure your compiler generates good programs?
> It's notoriously difficult to generate a good cross-compiler and libraries...
> - Dan