?
Solved

Get the stack trace when a process craches

Posted on 2002-05-28
3
Medium Priority
?
888 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
2 Comments
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 320 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

840 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