02-14-2011
Let the process produce a core file
There are two ways you can deal with this problem.
The first, and most obvious one, is to run the program under the debugger (e.g.: dbx). When it crashes, you'll get the debugger's prompt and you can explore the location and causes of the crash.
Since running under the debugger may change the behavior of the program, you may want to let it run normally. If the program crashes due to certain signals (e.g.: SIGSEGV - indicating accessing a bad address, such as address 0), it can produce a core file, at least under Unix variants, including Linux. You can then use the debugger to look at the state of the program at the time of the crash and analyze the reason for the crash.
For example, if the name of the program is prog, then
use: dbx prog core
to explore the state of the program at the time of the crash.
The core file is not always produced even when the program crashes due to a signal such as SIGSEGV. The reason is that there is a limit on the size of the core file. Often, this limit is 0. You can change this limit to "unlimited" and then the core file will be produced when the need arises.
The command to change the core file size limit is shell dependent.
For example, under bash I am using: ulimit -c unlimited
under tcsh, I use: limit coredumpsize unlimited
10 More Discussions You Might Find Interesting
1. Programming
Hi
I'm currently using C++ on a HP-UX 11i system (upgrading some libraries) and am encountering a problem with the process crashing when allocating memory via a call to new (a rather large array of objects are being created).
Is there a way to find out what the sizes of the stack and heap are?... (1 Reply)
Discussion started by: themezzaman
1 Replies
2. UNIX for Advanced & Expert Users
Hi,
I was logged in on a server, by ssh, with a vim open, when the battery of my laptop got empty.
When I return to the server by ssh, I can see my previous ssh session still open, and the vim process running (ttyp0). Is there a way to attach that vim to my new session (ttyp4)?
Here's part... (2 Replies)
Discussion started by: raphinou
2 Replies
3. UNIX for Advanced & Expert Users
Hi folks,
I would like to know how to hook up an xterm to another process.
Here is a high level view of what I am looking for
1. Main program starts
2. It creates an new xterm window
3. It then forks a second process & passes the xterm handle to it
4. The second process uses the second... (4 Replies)
Discussion started by: RipClaw
4 Replies
4. Solaris
Hi All,
We a critical application running on the Sun Solaris platform. But, for some reasons the process get's killed abnormally in the production environment and not sure what was causing this. I thought i would use the truss command to trace the errors.. so i used the bellow command
truss... (5 Replies)
Discussion started by: sudharma
5 Replies
5. Programming
Hey everyone,
Is there a way to make dbx break on access violations? (2 Replies)
Discussion started by: ctote
2 Replies
6. Programming
Hey everyone,
I'm trying to attach to a process that is crashing so I can debug the source code. I've tried this:
dbx -a PID
stop at "file.cpp":line#
However, nothing ever breaks. The service crashes and restarts, but I never see it hitting the code. I've tried to use a core file, but... (2 Replies)
Discussion started by: ctote
2 Replies
7. Programming
Hi everyone,
I've been struggling with this for a few weeks now. I'm trying to debug a running process with dbx on an AIX box.
The command I'm using is 'dbx -a <pid> core'
There is a function I can perform in my application that crashes this process, but it does not show up as crashed in... (0 Replies)
Discussion started by: ctote
0 Replies
8. UNIX for Dummies Questions & Answers
I'm trying to debug a service crash, and would like to break on an access violation - is this possible? (0 Replies)
Discussion started by: ctote
0 Replies
9. AIX
Hi,
I am trying to debug my project using dbx to understand the code and functionality of modules.
I compiled all my C files using gcc -g flag to enable the debug option.
I was able to get in to the debug mode using dbx.
I was able to create breakpoints using stop at line no.
"stop at... (7 Replies)
Discussion started by: Sachin1987
7 Replies
10. UNIX for Beginners Questions & Answers
Hi Team,
is there any way, I can start any process for e.g. run a shell script (infinite loop) and attach it to port 2222?
I am trying to create a scenario where an application will start running at port 2222 and I will telnet the same to confirm, application port is listening.
So,... (1 Reply)
Discussion started by: vivekpandit7
1 Replies
LEARN ABOUT CENTOS
abrt-auto-reporting
ABRT-AUTO-REPORTIN(1) ABRT Manual ABRT-AUTO-REPORTIN(1)
NAME
abrt-auto-reporting - Get or modify a value of the auto reporting option
SYNOPSIS
abrt-auto-reporting [-v] [ enabled | yes | 1 | disabled | no | 0 ]
DESCRIPTION
Reads the configuration from abrt.conf and saves the changes to the same file.
The changes will take effect immediately without necessity to restart any ABRT process and will be persistent.
disabled
User have to report the detect problems manually
enabled
ABRT uploads an uReport which was generated for a detected problem immediately after the detection phase.
uReport description
ABRT supports uReports for four types of crashes: crashes of C/C++ programs that result in a core dump, uncaught Python exceptions,
uncaught Java exceptions and kernel oopses.
Each uReport generally contains a stack trace, or multiple stack traces in the case of multi-threaded C/C++ and Java programs. The stack
trace only describes the call stack of the program at the time of the crash and does not contain contents of any variables.
Every uReport also contains identification of the operating system, versions of the RPM packages involved in the crash, and whether the
program ran under a root user.
There are also items specific to each crash type:
C/C++ crashes
these are path to the executable and signal delivered to the program,
Python exceptions
there is the type of the exception (without the error message, which may contain sensitive data),
for kernel oopses
these are list of loaded kernel modules, list of taint flags, and full text of the kernel oops.
Warning: The full text of a kernel oops might contain information like the identification of the host hardware type. You should disable the
autoreporting feature if you do not want to share this information with Red Hat.
OPTIONS
-v, --verbose
Be more verbose. Can be given multiple times.
SEE ALSO
abrt.conf(5)
AUTHORS
o ABRT team
abrt 2.1.11 06/18/2014 ABRT-AUTO-REPORTIN(1)