Solved

Get the stack trace when a process craches

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now