Solved

Get the stack trace when a process craches

Posted on 2002-05-28
3
879 Views
Last Modified: 2013-12-26
Hi,
I want to get the stack trace updated to a log when a running process crashes due to an exception.
It is a C process runnung on unix. After some search, I came thro U_STACK_TRACE(), which in cordination with signal() call, solves my problem in HP unix. But this(U_STACK_TRACE) is not there in SUN and DIGITAL servers.
In SUN I was able to solve the same using pstack utility.
But DIGITAL is still out of my reach.
I am now in look for something which works identical in all the three servers. Is there any way(using some system calls or something) by which I can print the stack, when the process crashes, which works identically in all the three(HP. SUN & DIGI) servers.

Thanks,
Sai
0
Comment
Question by:sai_pradeep
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 80 total points
ID: 7042373
Unless your process is setuid or cd'd into a directory it can't write in, you'll get a core dump on all three systems when the process crashes.  You can use a debugger to get a full stack trace from the core file.
0
 
LVL 18

Expert Comment

by:liddler
ID: 9644272
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by chris_calabrese

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
viewing source code from eclipse 13 110
Window placement 17 95
child constructor and parent constructor, overriding and overloading 6 93
EvenOdd challenge 10 144
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question