[omniORB] HELP..!!!!client Request hangs on the server (seems
to be deadloc ked) running as a task on PowerPC
Sheshi Sankineni
Sheshi.Sankineni@cosinecom.com
Wed Aug 14 19:35:02 2002
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_01C243C1.44994640
Content-Type: text/plain;
charset="iso-8859-1"
Hi Duncan,
Thanks for replying to my email.
I am aware of why 'sync' was made a stack variable. It was my mistake that I
missed a 'delete sync' when I created it on the heap. That was the reason of
the hang. However,
I am still not sure why making it a stack variable is causing it to SIGSEV.
Do you suspect
that that stack is getting corrupted ?? I have increated the stack size of
the thread is 2 meg. It didnt help either. Since you are familiar with the
code, can you please tell me what you think might be the cause of SIGSEGV.
Again, thanks for the reply.
-sheshi
-----Original Message-----
From: Duncan Grisby [mailto:duncan@grisby.org]
Sent: Wednesday, August 14, 2002 6:33 AM
To: Sheshi Sankineni
Cc: 'omniorb-list@realvnc.com'
Subject: Re: [omniORB] HELP..!!!!client Request hangs on the server
(seems to be deadloc ked) running as a task on PowerPC
On Tuesday 13 August, Sheshi Sankineni wrote:
> 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.
Please don't send HTML email to the omniORB mailing list.
[...]
> In the beginning I ran into SIGSEGV when trying to resolve the RootPoa. I
> was getting SIGSEGV consistently in the omni_tracedmutex::lock()during
> initialization of the ORB.
>
> What I noticed was in that method, there is a local variable sync declared
> as follows
>
> omni_mutex_lock sync(pd_lock);
>
> I changed this to a heap variable as follows
>
> omni_mutex_lock* sync = new omni_mutex_lock(pd_lock); // sheshi
That's why you're getting the hang! omni_mutex_lock has to be created
on the stack -- it's purpose it to acquire the mutex when it is
created, and release it when it goes out of scope. By putting it on
the heap, you've made sure the mutex is never unlocked.
You need to track down why the segfault is happening in the lock
code. Randomly changing bits of code you don't understand isn't going
to help.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan@grisby.org --
-- http://www.grisby.org --
------_=_NextPart_001_01C243C1.44994640
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: [omniORB] HELP..!!!!client Request hangs on the server =
(seems to be deadloc ked) running as a task on PowerPC </TITLE>
</HEAD>
<BODY>
<BR>
<P><FONT SIZE=3D2>Hi Duncan,</FONT>
</P>
<P><FONT SIZE=3D2>Thanks for replying to my email.</FONT>
</P>
<P><FONT SIZE=3D2>I am aware of why 'sync' was made a stack variable. =
It was my mistake that I missed a 'delete sync' when I created it on =
the heap. That was the reason of the hang. However,</FONT></P>
<P><FONT SIZE=3D2>I am still not sure why making it a stack variable is =
causing it to SIGSEV. Do you suspect</FONT>
<BR><FONT SIZE=3D2>that that stack is getting corrupted ?? I have =
increated the stack size of the thread is 2 meg. It didnt help either. =
Since you are familiar with the code, can you please tell me what you =
think might be the cause of SIGSEGV.</FONT></P>
<P><FONT SIZE=3D2>Again, thanks for the reply.</FONT>
</P>
<P><FONT SIZE=3D2>-sheshi</FONT>
</P>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Duncan Grisby [<A =
HREF=3D"mailto:duncan@grisby.org">mailto:duncan@grisby.org</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, August 14, 2002 6:33 AM</FONT>
<BR><FONT SIZE=3D2>To: Sheshi Sankineni</FONT>
<BR><FONT SIZE=3D2>Cc: 'omniorb-list@realvnc.com'</FONT>
<BR><FONT SIZE=3D2>Subject: Re: [omniORB] HELP..!!!!client Request =
hangs on the server</FONT>
<BR><FONT SIZE=3D2>(seems to be deadloc ked) running as a task on =
PowerPC </FONT>
</P>
<BR>
<P><FONT SIZE=3D2>On Tuesday 13 August, Sheshi Sankineni wrote:</FONT>
</P>
<P><FONT SIZE=3D2>> This message is in MIME format. Since your mail =
reader does not understand</FONT>
<BR><FONT SIZE=3D2>> this format, some or all of this message may =
not be legible.</FONT>
</P>
<P><FONT SIZE=3D2>Please don't send HTML email to the omniORB mailing =
list.</FONT>
</P>
<P><FONT SIZE=3D2>[...]</FONT>
<BR><FONT SIZE=3D2>> In the beginning I ran into SIGSEGV when trying =
to resolve the RootPoa. I</FONT>
<BR><FONT SIZE=3D2>> was getting SIGSEGV consistently in the =
omni_tracedmutex::lock()during</FONT>
<BR><FONT SIZE=3D2>> initialization of the ORB.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> What I noticed was in that method, there is a =
local variable sync declared</FONT>
<BR><FONT SIZE=3D2>> as follows</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> omni_mutex_lock sync(pd_lock);</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> I changed this to a heap variable as =
follows</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> omni_mutex_lock* sync =3D new =
omni_mutex_lock(pd_lock); // sheshi</FONT>
</P>
<P><FONT SIZE=3D2>That's why you're getting the hang! =
omni_mutex_lock has to be created</FONT>
<BR><FONT SIZE=3D2>on the stack -- it's purpose it to acquire the mutex =
when it is</FONT>
<BR><FONT SIZE=3D2>created, and release it when it goes out of scope. =
By putting it on</FONT>
<BR><FONT SIZE=3D2>the heap, you've made sure the mutex is never =
unlocked.</FONT>
</P>
<P><FONT SIZE=3D2>You need to track down why the segfault is happening =
in the lock</FONT>
<BR><FONT SIZE=3D2>code. Randomly changing bits of code you don't =
understand isn't going</FONT>
<BR><FONT SIZE=3D2>to help.</FONT>
</P>
<P><FONT SIZE=3D2>Cheers,</FONT>
</P>
<P><FONT SIZE=3D2>Duncan.</FONT>
</P>
<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2> -- Duncan =
Grisby --</FONT>
<BR><FONT SIZE=3D2> -- duncan@grisby.org =
--</FONT>
<BR><FONT SIZE=3D2> -- <A HREF=3D"http://www.grisby.org" =
TARGET=3D"_blank">http://www.grisby.org</A> --</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C243C1.44994640--