Hi Steve,

What is the status regarding the bug 1577 mentioned below. Do you have
already plan to include it in the next version? If so, what is the time
frame .

Do you have any version which contains this fix which we can use it as
labdrop? If yes, we are interested in knowing this version.

Currently this is a blocking problem for us in Java.

Regards
Ramesh


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 15, 2007 11:45 AM
To: Hegde, Ramesh (STSD)
Subject: [Bug 1577] New: saEvtDispatch crashes with Segmentation fault 

http://www.osdl.org/developer_bugzilla/show_bug.cgi?id=1577

           Summary: saEvtDispatch crashes with Segmentation fault
           Product: OpenAIS
           Version: trunk
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: event service
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Ramesh,

Thank you for the bug report.  I will have to think about how to resolve
this problem effectively.  The reason res_overlay is allocated on the
stack is to prevent having to allocate that large memory block at
saAmfInitialize time and keep it initialized.  Instead it is allocated
on the stack during run time.

Another option is to allocate it in saAmfDispatch using malloc instead
of using the stack.  The reason this is not in the current code is
because SA_AIS_ERR_NO_MEMORY is not a valid return code from
saAmfDispatch according to the AMF specification.  We will just have to
violate the specifications here, since allocating on the stack is
somewhat suboptimal.

Regards
-steve

On Tue, 2007-04-10 at 09:45 +0530, Hegde, Ramesh (STSD) wrote:
> Hi Steve,
> 
> Thank you for your quick response. We are able to figure out the 
> problem.
> 
> In saEvtDispatch, there is a local variable "dispatch_data" defined on

> the stack of type "res_overlay". This is very huge (1024*1024). In 
> Java the default stack size for each thread is 254k. Hence there was 
> segmentation fault when it tries to allocate this memory on the stack.
> You can increase this during runtime by using "java -Xss2m
<classname>".
> This will increase the stack size to 2 MB and resulting no crash.
> 
> Any particular reason why this huge memory is allocated on stack? Any 
> plans to fix this?
> 
> Let us know once the 0.80.2-1 is available on FC6.
> 
> Regards
> Ramesh
> 
> -----Original Message-----
> From: Steven Dake [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 10, 2007 2:29 AM
> To: Hegde, Ramesh (STSD)
> Cc: [EMAIL PROTECTED]
> Subject: Re: saEvtDispatch crashes with Segmentation fault (core
> dumped)
> 
> On Mon, 2007-04-09 at 10:40 +0530, Hegde, Ramesh (STSD) wrote:
> > Hello,
> >  
> > I am using openais-0.80.1-3. I have written a wrapper for Event 
> > Service in Java which uses C Event Service APIs using JNI.
> >  
> > This works perfectly fine with Java Subscriber receiving events when

> > Java publisher publishes the event. However if the Java subscriber 
> > is
> 
> > a separate thread(Extends Thread class), then the subscriber crashes

> > with "Segmentation Fault" when the event is received. The crash is 
> > inside saEvtDispatch.
> 
> Which vendor's operating system are you using?
> 
> An exact backtrace would help debug the problem.  I would suggest 
> upgrading to openais-0.80.2-1 which has several bug fixes but hasn't 
> made it into FC6 yet.  I'll make sure an update makes its way through 
> the FC6 system.
> 
> To retrieve a backtrace on FC6, install the openais-debug package, run

> your program with a debugger such as gdb, and use the where command.
> It will indicate the exact line number that results in the segfault, 
> which should be helpful.
> 
> Since you are using JNI, I'm not sure how this can be done from within

> java but if you figure it out, please let us know and I'll add it to 
> the FAQs.
> 
> If you send me a sample that duplicates the issue I could also find 
> whatever problem there might be.
> 
> >  
> > Anybody has any clue on this problem?  Also when I check the log of 
> > ais , the following error is visible whenever there is a crash.
> >  
> > Apr  9 10:34:40.350837 [MAIN ] Received message has invalid
digest...
> > ignoring.
> > Apr  9 10:34:40.350851 [MAIN ] Invalid packet data Apr  9
> > 10:34:40.713775 [MAIN ] Received message has invalid digest...
> > ignoring.
> > Apr  9 10:34:40.713789 [MAIN ] Invalid packet data
> > 
> 
> Which architecture, bit size, and endianness?  You should never see 
> this message unless your keys on each machine don't match or you are 
> running multiple clusters on the same multicast address and port
address.
> 
> Regards
> -steve
> 
> > Let me know if any of you have come across such problem. I am 
> > struggling to find a solution from last one week.
> >  
> > Regards



------- You are receiving this mail because: ------- You reported the
bug, or are watching the reporter.
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to