2011-04-03 08:52:14     BOA Question

Document created by Aaronwu Employee on Aug 26, 2013
Version 1Show Document
  • View in full screen mode

2011-04-03 08:52:14     BOA Question

Frank Gill (UNITED STATES)

Message: 99549   

 

Hey guys,

 

I'm having some trouble with BOA. I'm using 2010Rc5.

 

I've written a cgi application that executes fine on the command line. I've run it with valgrind and verified that there are no memory leaks. I've tested it on desktop and bf537. On desktop it works fine (running boa as the server). On my bf537 I'm getting Misaligned data access. Basically it jumps to reserved memory and is trying to access a location there.

 

The cgi application is only using 2713 bytes of memory via 195 malloc /free calls. I've run it like twenty times in a row on my linux desktop with boa and it runs fine. Anyone have any ideas? I was thinking it might have to do with a stack issue. The stack size is the default (i got it from looking at the wiki related to stack size and increasing stack sizes).

 

Has anyone encountered any similar issues? Any resolutions?

 

Thanks.

QuoteReplyEditDelete

 

 

2011-04-03 10:09:45     Re: BOA Question

Mike Frysinger (UNITED STATES)

Message: 99550   

 

does it only crash under boa ?  or does it crash when running from the command line on the bf537 too ?

QuoteReplyEditDelete

 

 

2011-04-03 11:15:09     Re: BOA Question

Frank Gill (UNITED STATES)

Message: 99551   

 

It only crashes in boa. It runs ten out of ten times on the command line. I analyzed the stack trace and it's definitely due to a reserved memory access, but i don't understand what's causing this behavior.

QuoteReplyEditDelete

 

 

2011-04-03 12:14:46     Re: BOA Question

Frank Gill (UNITED STATES)

Message: 99552   

 

I also wrote another app that allocates 2713 bytes by looping around just to check if the number of bytes was the problem but that cgi app works fine so i'm assuming it's not a memory issue.

 

My suspicion is that perhaps my code is looping around and calling too many functions within functions, although I'd be surprised if that was it since boa on my linux host runs fine. The cgi app returns right away. My cgi app basically goes in a loop and reads a few conf files with name value pairs and stores them in dynamic link lists.

 

Just trying to add more information to give more context.

QuoteReplyEditDelete

 

 

2011-04-03 13:36:06     Re: BOA Question

Mike Frysinger (UNITED STATES)

Message: 99554   

 

did you try increasing the stack a lot ?  or building the app with the stack checking flags ?

QuoteReplyEditDelete

 

 

2011-04-04 07:18:20     Re: BOA Question

Frank Gill (UNITED STATES)

Message: 99565   

 

I built with the stack overflow options from the Build Options in the make menuconfig. I didnt make any change to the Makefile of my parser.

 

I also tried increasing the stack size of boa. Boa has a FLTFLAGS line with -s 64K. I changed that to CCFLAGS += the stacksize line from the wiki but that didnt help either. It still crashed.

 

It's probably a stack issue cuz if I just break the file into two parts and run my code for each respective part, it works fine with boa. But having said that, the stacksize test failed when I incorporated it with boa and my app.

QuoteReplyEditDelete

 

 

2011-04-04 11:12:41     Re: BOA Question

Mike Frysinger (UNITED STATES)

Message: 99569   

 

i was referring to your app, not boa.  the stack of an app is blown away as soon as you exec().

Attachments

    Outcomes