[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
Mon Aug 19 22:02:01 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_01C247C3.ED975D30
Content-Type: text/plain;
	charset="iso-8859-1"

Hi,
 
Do we have to compile the OmniOrb source with a particular version of gcc
???. I have compiled with gcc 2.95.2 (cross compiler) on RedHat Linux 6.2
for PowerPC.
 
However, when I run the server and try to connect from the client, I see
SIGSEGV in different places. This is happening when I integrate the servant
with my application (which is also cross compiled with the same gcc). It
happens in different places. Looks like some threading library issue or
something .
 
Can someone please tell me as to what is the correct version of gcc to use
on Linux/PowerPC.
 
thanks
 
-sheshi

-----Original Message-----
From: Sheshi Sankineni 
Sent: Wednesday, August 14, 2002 11:35 AM
To: 'Duncan Grisby'
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 




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 <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 <http://www.grisby.org>  -- 


------_=_NextPart_001_01C247C3.ED975D30
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>RE: [omniORB] HELP..!!!!client Request hangs on the server (seems to be deadloc ked) running as a task on PowerPC</TITLE>

<META content="MSHTML 5.00.3211.1700" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=864125820-19082002>Hi,</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=864125820-19082002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=864125820-19082002>Do we 
have to compile the OmniOrb source with a particular version of gcc ???. I have 
compiled with gcc 2.95.2 (cross compiler) on RedHat Linux 6.2 for 
PowerPC.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=864125820-19082002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=864125820-19082002>However, when I run the server and try to connect from 
the client, I see SIGSEGV in different places. This is happening when I 
integrate the servant with my application (which is also cross compiled with the 
same gcc). It happens in different places. Looks like some threading library 
issue or something .</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=864125820-19082002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=864125820-19082002>Can 
someone please tell me as to what is the correct version of gcc to use on 
Linux/PowerPC.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=864125820-19082002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=864125820-19082002>thanks</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=864125820-19082002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=864125820-19082002>-sheshi</SPAN></FONT></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Sheshi Sankineni 
  <BR><B>Sent:</B> Wednesday, August 14, 2002 11:35 AM<BR><B>To:</B> 'Duncan 
  Grisby'<BR><B>Cc:</B> 'omniorb-list@realvnc.com'<BR><B>Subject:</B> RE: 
  [omniORB] HELP..!!!!client Request hangs on the server (seems to be deadloc 
  ked) running as a task on PowerPC <BR><BR></DIV></FONT><BR>
  <P><FONT size=2>Hi Duncan,</FONT> </P>
  <P><FONT size=2>Thanks for replying to my email.</FONT> </P>
  <P><FONT size=2>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=2>I am still not sure why making it a stack variable is causing 
  it to SIGSEV. Do you suspect</FONT> <BR><FONT size=2>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=2>Again, thanks for the reply.</FONT> </P>
  <P><FONT size=2>-sheshi</FONT> </P>
  <P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From: 
  Duncan Grisby [<A 
  href="mailto:duncan@grisby.org">mailto:duncan@grisby.org</A>]</FONT> <BR><FONT 
  size=2>Sent: Wednesday, August 14, 2002 6:33 AM</FONT> <BR><FONT size=2>To: 
  Sheshi Sankineni</FONT> <BR><FONT size=2>Cc: 'omniorb-list@realvnc.com'</FONT> 
  <BR><FONT size=2>Subject: Re: [omniORB] HELP..!!!!client Request hangs on the 
  server</FONT> <BR><FONT size=2>(seems to be deadloc ked) running as a task on 
  PowerPC </FONT></P><BR>
  <P><FONT size=2>On Tuesday 13 August, Sheshi Sankineni wrote:</FONT> </P>
  <P><FONT size=2>&gt; This message is in MIME format. Since your mail reader 
  does not understand</FONT> <BR><FONT size=2>&gt; this format, some or all of 
  this message may not be legible.</FONT> </P>
  <P><FONT size=2>Please don't send HTML email to the omniORB mailing 
  list.</FONT> </P>
  <P><FONT size=2>[...]</FONT> <BR><FONT size=2>&gt; In the beginning I ran into 
  SIGSEGV when trying to resolve the RootPoa. I</FONT> <BR><FONT size=2>&gt; was 
  getting SIGSEGV consistently in the omni_tracedmutex::lock()during</FONT> 
  <BR><FONT size=2>&gt; initialization of the ORB.</FONT> <BR><FONT size=2>&gt; 
  </FONT><BR><FONT size=2>&gt; What I noticed was in that method, there is a 
  local variable sync declared</FONT> <BR><FONT size=2>&gt; as follows</FONT> 
  <BR><FONT size=2>&gt; </FONT><BR><FONT size=2>&gt; omni_mutex_lock 
  sync(pd_lock);</FONT> <BR><FONT size=2>&gt; </FONT><BR><FONT size=2>&gt; I 
  changed this to a heap variable as follows</FONT> <BR><FONT size=2>&gt; 
  </FONT><BR><FONT size=2>&gt; omni_mutex_lock* sync = new 
  omni_mutex_lock(pd_lock); // sheshi</FONT> </P>
  <P><FONT size=2>That's why you're getting the hang!&nbsp; omni_mutex_lock has 
  to be created</FONT> <BR><FONT size=2>on the stack -- it's purpose it to 
  acquire the mutex when it is</FONT> <BR><FONT size=2>created, and release it 
  when it goes out of scope. By putting it on</FONT> <BR><FONT size=2>the heap, 
  you've made sure the mutex is never unlocked.</FONT> </P>
  <P><FONT size=2>You need to track down why the segfault is happening in the 
  lock</FONT> <BR><FONT size=2>code. Randomly changing bits of code you don't 
  understand isn't going</FONT> <BR><FONT size=2>to help.</FONT> </P>
  <P><FONT size=2>Cheers,</FONT> </P>
  <P><FONT size=2>Duncan.</FONT> </P>
  <P><FONT size=2>-- </FONT><BR><FONT size=2>&nbsp;-- Duncan 
  Grisby&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --</FONT> <BR><FONT 
  size=2>&nbsp; -- duncan@grisby.org&nbsp;&nbsp;&nbsp;&nbsp; --</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp; -- <A href="http://www.grisby.org" 
  target=_blank>http://www.grisby.org</A> --</FONT> 
</P></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C247C3.ED975D30--