Solved

Get the stack trace when a process craches

Posted on 2002-05-28
3
880 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Include multiple hostnames in this command? 3 55
Folder Comparison 12 55
string initialization in java 11 120
Not needed 13 133
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

742 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