[omniORB] RE: Help.!!!!! getting segmentation fault when running omniORB4 s erver as a task on linux-powerPC

Sheshi Sankineni Sheshi.Sankineni@cosinecom.com
Thu, 28 Mar 2002 12:05:04 -0800


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1D693.DA045C60
Content-Type: text/plain;
	charset="iso-8859-1"

Hi Dan,

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 ?

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
really appreciate anyones help on this.

thanks in advance

-sheshi

-----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
############################################################################
########################## This email communication may contain CONFIDENTIAL
INFORMATION and is intended only for the use of the intended recipients
identified above.  If you are not the intended recipient of this
communication, you must not use, disclose, distribute, copy or print this
email. If you have received this communication in error, please immediately
notify the sender by reply email, delete the communication and destroy all
copies.
############################################################################
##########################

------_=_NextPart_001_01C1D693.DA045C60
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: Help.!!!!! getting segmentation fault when running omniORB4 =
server  as a task on linux-powerPC</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi Dan,</FONT>
</P>

<P><FONT SIZE=3D2>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.</FONT></P>

<P><FONT SIZE=3D2>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.</FONT></P>

<P><FONT SIZE=3D2>However the omniORB library is compiled using gcc =
(2.95.3 which I downloaded and build after configuring with =
enable-threads=3Dposix). Is there a different between gcc 2.95.2 &amp; =
gcc 2.95.3. Would it help if I use gcc 2.95.2 to compile omniORB4 =
library ?</FONT></P>

<P><FONT SIZE=3D2>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 really appreciate anyones help on this.</FONT></P>

<P><FONT SIZE=3D2>thanks in advance</FONT>
</P>

<P><FONT SIZE=3D2>-sheshi</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Dan Kegel [<A =
HREF=3D"mailto:dank@kegel.com">mailto:dank@kegel.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Thursday, March 28, 2002 9:51 AM</FONT>
<BR><FONT SIZE=3D2>To: omniorb-list@uk.research.att.com; Sheshi =
Sankineni</FONT>
<BR><FONT SIZE=3D2>Subject: Re: Help.!!!!! getting segmentation fault =
when running omniORB4</FONT>
<BR><FONT SIZE=3D2>server as a task on linux-powerPC</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Sheshi Sankineni =
&lt;Sheshi.Sankineni@cosinecom.com&gt; wrote:</FONT>
<BR><FONT SIZE=3D2>&gt; I downloaded omniORB4 and compiled with gcc =
2.95.3 on linux-powerpc.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; (gcc was downloaded gcc 2.95.3 and configured =
it as follows</FONT>
<BR><FONT SIZE=3D2>&gt; ./configure =
--prefix=3D/dvlp/ssankine/gcc/gcc-2.95.3 =
--enable-threads=3Dposix</FONT>
<BR><FONT SIZE=3D2>&gt; - --enable-languages=3Dc,c++,objc --with-newlib =
--enable-shared=3Dlibgcc,libstdc++</FONT>
<BR><FONT SIZE=3D2>&gt; and built it (doing make bootstrap) on =
linux-powerpc)</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; I then used this gcc to compile the the omniORB =
library on linux-powerpc.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; The actual program where my ORB server (as a =
task) runs is compiled using</FONT>
<BR><FONT SIZE=3D2>&gt; the cross compiler</FONT>
<BR><FONT SIZE=3D2>&gt; (version 2.95.2) and used the newly compiled =
gcc's libraries from above</FONT>
<BR><FONT SIZE=3D2>&gt; (libstdc++-libc6.2-2-2.10.0.0.so). When I try =
to contact this ORB server I</FONT>
<BR><FONT SIZE=3D2>&gt; get a segmentation fault and my program =
aborts.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Here is the stack trace from dbg</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; omniORB: Server accepted connection from =
giop:tcp:172.xx.xx.xx:1710</FONT>
<BR><FONT SIZE=3D2>&gt; [New Thread 107626 (LWP 32151)]</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Program received signal SIGSEGV, Segmentation =
fault.</FONT>
<BR><FONT SIZE=3D2>&gt; [Switching to Thread 107626 (LWP 32151)]</FONT>
<BR><FONT SIZE=3D2>&gt; 0x0f5dce94 in omni_tracedmutex::lock () =
from</FONT>
<BR><FONT SIZE=3D2>&gt; =
/dvlp/ssankine/omni-ppc/lib/libomniORB4.so.0</FONT>
<BR><FONT SIZE=3D2>&gt; (gdb) bt</FONT>
<BR><FONT SIZE=3D2>&gt; #0&nbsp; 0x0f5dce94 in omni_tracedmutex::lock =
()</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; from =
/dvlp/ssankine/omni-ppc/lib/libomniORB4.so.0</FONT>
<BR><FONT SIZE=3D2>&gt; #1&nbsp; 0x0f680b6c in omniAsyncWorker::run =
()</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; from =
/dvlp/ssankine/omni-ppc/lib/libomniORB4.so.0</FONT>
<BR><FONT SIZE=3D2>&gt; #2&nbsp; 0x0f47e244 in omni_thread_wrapper =
()</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; from =
/dvlp/ssankine/omni-ppc/lib/libomnithread.so.3</FONT>
<BR><FONT SIZE=3D2>&gt; #3&nbsp; 0x0f715e84 in pthread_start_thread =
(arg=3D0x0) at manager.c:274</FONT>
<BR><FONT SIZE=3D2>&gt; #4&nbsp; 0x0f715ec8 in =
pthread_start_thread_event (arg=3D0x727ffc00) at</FONT>
<BR><FONT SIZE=3D2>&gt; manager.c:297</FONT>
<BR><FONT SIZE=3D2>&gt; #5&nbsp; 0x0f3bb11c in clone () at =
soinit.c:64</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; I would really appreciate if you let me know =
what is the reason for this</FONT>
<BR><FONT SIZE=3D2>&gt; segmentation fault.</FONT>
</P>

<P><FONT SIZE=3D2>I had a superficially similar problem (with omniorb3) =
a while ago; see</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://www.uk.research.att.com/omniORB/archives/2002-01/0025.htm=
l" =
TARGET=3D"_blank">http://www.uk.research.att.com/omniORB/archives/2002-0=
1/0025.html</A></FONT>
<BR><FONT SIZE=3D2>for the discussion.&nbsp; Turned out I needed to =
make sure the powerpc</FONT>
<BR><FONT SIZE=3D2>had a hostname, and that its hostname was in its =
/etc/hosts.</FONT>
<BR><FONT SIZE=3D2>Your problem may be different.&nbsp; Have you run =
regression tests</FONT>
<BR><FONT SIZE=3D2>to make sure your compiler generates good =
programs?</FONT>
<BR><FONT SIZE=3D2>It's notoriously difficult to generate a good =
cross-compiler and libraries...</FONT>
<BR><FONT SIZE=3D2>- Dan</FONT>
<BR><FONT =
SIZE=3D2>###############################################################=
####################################### This email communication may =
contain CONFIDENTIAL INFORMATION and is intended only for the use of =
the intended recipients identified above.&nbsp; If you are not the =
intended recipient of this communication, you must not use, disclose, =
distribute, copy or print this email. If you have received this =
communication in error, please immediately notify the sender by reply =
email, delete the communication and destroy all copies. =
########################################################################=
##############################</FONT></P>

</BODY>
</HTML>
------_=_NextPart_001_01C1D693.DA045C60--