Re: [taste-users] SIGSEGV in Application

[ Thread Index | Date Index | More lists.tuxfamily.org/taste-users Archives ]



To be fair:

Stack usage profiling is always a challenge - especially for safety critical software. To assist towards that end, we have already implemented a small tool that helps: try building your app with debug info (add the "-g" argument in the build script) and then invoke

    $ checkStackUsage.py /path/to/generatedBinary

The stack usage results are printed, sorted from smallest to largest - so you can then see if the last line's results are larger than the thread stack you used, and if so, pass the appropriate number via the "-s" param (e.g. "-s 500" would give 500K stack per thread).

If you want more details about how it works, I wrote an article (sort of a mini "paper") about this tool on my web page:

    http://users.softlab.ntua.gr/~ttsiod/stackusage.html

Note that the tool makes an estimate on total stack usage per function, by disassembling the binary and trying to detect the complete function call tree (as well as the stack usage per function). The latest GCC comes with the -fstack-usage feature (which does this officially, not via disassembly heuristics) but we haven't switched to that - yet.

Kind regards,
Thanassis.


On 06/12/12 12:52, Gert Caspersen wrote:
 

P.S. Couldn’t we run into problems again when I define even more complex data structures? No matter what, I will always be able to exceed the fixed stack size that you defined ;-)

 


Gert Caspersen
Senior Engineer, Project Manager
Space Projects (DK)
Terma A/S

 

From: Maxime Perrotin [mailto:Maxime.Perrotin@xxxxxxx]
Sent: 11 June 2012 10:06
To: taste-users@xxxxxxxxxxxxxxxxxxx; Gert Caspersen
Subject: Re: [taste-users] SIGSEGV in Application

 

Hi Gert,

 

Found and fixed. The crash was due to a stack overflow related to the size of the messages sent by your application to the ground GUI.

 

The --stack option has no effect on GUI theads - it only affect the threads of the main (embedded) application, this is why increasing it did not solve the issue.

 

If you update TASTE, we fixed this issue by setting a higher stack size for GUI threads. Note that these threads ALWAYS run on native platform (Linux, Windows), so setting a high value is not an issue for an embedded application.

 

Best regards,

Maxime

PS: Many thanks to Jerome and Thanassis for helping on this one.

 

 

 

 

 

On Wed, 06 Jun 2012 13:51:18 +0200, Gert Caspersen <gec@xxxxxxxxx> wrote:

 

                Dear Taste Users,

 

I now have ended up with an application that terminates due to a segmentation violation (see enclosed extract from our problem tracking system).

 

Any suggestions are highly appreciated….

 

                Regards,

 

                                Gert

 


Gert Caspersen
Senior Engineer, Project Manager
Space Projects (DK)
Space

Terma A/S
Vasekær 12
2730 Herlev
Denmark

T +45 8743 6000
T +45 4594 9653 (direct)
F +45 8743 6001
E gec@xxxxxxxxx
W www.terma.com


Attention:
This e-mail (and attachment(s), if any) - intended for the addressee(s) only - may contain confidential, copyright, or legally privileged information or material, and no one else is authorized to read, print, store, copy, forward, or otherwise use or disclose any part of its contents or attachment(s) in any form. If you have received this e-mail in error, please notify me by telephone or return e-mail, and delete this e-mail and attachment(s). Thank you.



--

ESA - European Space Agency

 

Maxime Perrotin

TASTE Project manager

PROBA V - PROBA 3 Software engineer

 

System, Software and Technology Department

 

ESTEC

Keplerlaan 1, PO Box 299

NL-2200 AG Noordiwjk, The Netherlands

+31 (0)71 565 4923 | Fax +31 (0)71 565 5420

 

This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender.
 
Please consider the environment before printing this email.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/