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
Solved

Get the stack trace when a process craches

Posted on 2002-05-28
3
878 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
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

861 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