Sponsored Content
Operating Systems Solaris How to create core through program at the time of crash by handling signals? Post 302740833 by rajeev_ks on Friday 7th of December 2012 12:04:56 AM
Old 12-07-2012
Quote:
Originally Posted by jim mcnamara
The simple way to get a core that "starts" at the fault is not to block signals. Obviously this has some very bad downsides.

Otherwise with what you have done you have to traverse stack frames back to the problem, in gdb this is the
Code:
backtrace

command. Signal receipt when blocked causes an immediate interrupt to the executing code, pushing the state of the process and kernel onto the interrupt stack. Working backwards can be fun.

Some example code for gaddr2line():

Note that you should consider libelf instead of the python library.
I am using dbx for debugging core and the corresponding command for backtrace is where in dbx. But as I said earlier I am getting the stack of signal handler routine through backtrace and not the location of faulty code.
 

10 More Discussions You Might Find Interesting

1. Programming

handling-create new SIGNALS

Hi, i cannot find in which file and function the signals are handled by default.Can anyone help me? How can i create a 33th signal? Thanks (3 Replies)
Discussion started by: Panos
3 Replies

2. UNIX for Dummies Questions & Answers

Smart Crash Handling

Hi, Is there anything you can do to a *nix (SuSE Linux actually) which allows it to *try* to do a reboot if something crashes the system? I know they have something at work (but I don't work with the servers myself) which makes the server reboot if it crashes/locks (works about 80% of the... (0 Replies)
Discussion started by: d11wtq
0 Replies

3. Shell Programming and Scripting

Shel program file handling

Hi, Iam having the file as follows: QWASEDRF1234567890098765 abc@quebex.com 000000000-932333 678394-56=3 9033894 QWASEDRF1234567890098765 abc@quebex.com 000000000-932333 678394-56=3 9033894 OPIUYTREE0986666544443322 dcsx@olivaa.net ... (14 Replies)
Discussion started by: nivas
14 Replies

4. Filesystems, Disks and Memory

/dev/core "link to program crash data"

Hi there, I found a link to a file /dev/core of 17 GB Is it ok??? I couldn't find many information about it. Any suggestion would be appreciated!!! Thanks in advance, Giordano Bruno PS: I'm working with FEDORA 6 (2 Replies)
Discussion started by: Giordano Bruno
2 Replies

5. Programming

detached thread is causing program crash

Hi All, I have scenario where my callback function data_update() can be called anytime. I have written the function data_update() such that it will create detached thread for processing the data sent to this function. data_update() { pthread_attr_t attr_thread; ... (1 Reply)
Discussion started by: wonderman
1 Replies

6. Programming

Memory Fault (core dumped) in ttpy program

I´m writing this program in QNX , I`m kinda new to UNIX and programing in general, and when I try to run it it gives me the Memory Fault error. Can anyone help? #include <stdio.h> #include <fcntl.h> void main(void) {int a,ter; char buf; printf("a="); scanf("%d",a); ter=open... (6 Replies)
Discussion started by: GiganteAsesino
6 Replies

7. Programming

Please help:program hang stuck there signal handling on POSIX Message Queue UNIX C programming

in a single main() function,so need signal handling. Use Posix Message Queue IPC mechanism , can ignore the priority and other linked list message,to implement the scenario: client:Knock Knock server:who's there client: Eric Server:Eric,Welcome. client:exit all process terminated ... (1 Reply)
Discussion started by: ouou
1 Replies

8. UNIX for Dummies Questions & Answers

handling signals without race conditions

Greetings, I am writing a small program in C on UNIX, in which I am using (POSIX reliable) signals. 1. Suppose I have a signal : SIGX, and the corresponding signal handler : sigx_handler. It is possible to receive SIGX in my process, and, while executing sigx_handler, to receive again... (0 Replies)
Discussion started by: aigoia
0 Replies

9. AIX

How to create core through program at the time of crash by handling signals?

I am in process of writing a library which can make any application of my product capable of creating core in the application's log folder with a product friendly core file name programatically. In my library I am registering for certain signals e.g. SIGILL, SIGFPE, SIGBUS, SIGSEGV, SIGSYS, SIGABRT... (1 Reply)
Discussion started by: rajeev_ks
1 Replies

10. UNIX for Advanced & Expert Users

Handling Signals in System Calls

What will happen if signal comes while a system call is being executed? How it will be handled? (1 Reply)
Discussion started by: rupeshkp728
1 Replies
ABRT-ACTION-GENERA(1)						    ABRT Manual 					     ABRT-ACTION-GENERA(1)

NAME
abrt-action-generate-core-backtrace - Generates coredump-level backtrace SYNOPSIS
abrt-action-generate-core-backtrace [-v] [-r] [-d DIR] DESCRIPTION
This tool uses coredump from the file coredump and binary at the path stored in file executable in the problem directory to generate coredump-level backtrace. Coredump-level backtrace resembles ordinary backtrace in that it contains information about call frames present on the stack at the time of the crash. However, it only contains information that can be obtained from the coredump without debugging symbols available - mainly relative addresses of the stored instruction pointers. Such backtrace can still be useful for reporting and reproducing the bug and does not require debugging information files to be installed. The result is saved in the problem directory in a file named core_backtrace. Integration with libreport events abrt-action-generate-core-backtrace can be used as an analyzer for application crashes which dump core. Example usage in report_event.conf: EVENT=analyze analyzer=CCpp abrt-action-generate-core-backtrace OPTIONS
-d DIR Path to problem directory. -r Do not hash function fingerprints. Useful for debugging. -v Be more verbose. Can be given multiple times. AUTHORS
o ABRT team abrt 2.1.11 06/18/2014 ABRT-ACTION-GENERA(1)
All times are GMT -4. The time now is 07:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy