Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to ananlyze 'core' file ?

450 views
Skip to first unread message

c8629573

unread,
May 12, 1999, 3:00:00 AM5/12/99
to
What is the command to analyze 'core' file and determine the program
that cause the 'core' file ?

Thanks.


Bob Hablutzel

unread,
May 12, 1999, 3:00:00 AM5/12/99
to
There are really two ways to analyze a core file:

1. Use a debugger, such as dbx, adb, or gdb. These applications
are designed to take a core file and an application file
(the application which corresponds to the core file) and let
you perform debugging activities. See the man pages for
more information.

2. For AIX 4.3.2 and later, you can try my core file analysis
application, coralist. It is currently in beta release. It can
give you a stack trace, complete with variables at the time that
the application failed. It can also be configured to automatically
generate a mail message with the core file analysis in response
to the core file being generated.

If you are interested in coralist, please drop me a note at
bo...@hablutzel.com and I'll get you on the beta list.


Bob


In article <373939F6...@comp.polyu.edu.hk>, c8629573
<c862...@comp.polyu.edu.hk> wrote:

--
bo...@hablutzel.com

Candido Alonso

unread,
May 12, 1999, 3:00:00 AM5/12/99
to

c8629573 escribió:

> What is the command to analyze 'core' file and determine the program
> that cause the 'core' file ?
>

Try with "crash".

Regards,
--
Candido Alonso
D4-006, Campus Nord
can...@KKKtsc.upc.es
93 401 10 67
Dep. Teoria del senyal i Comunicacions, UPC

Shaun Appleby

unread,
May 12, 1999, 3:00:00 AM5/12/99
to
The quickest way to establish which program is causing the core dump is to
run the command:

strings core | grep ^_=

'_=' being the last command that was executed.

Hope this helps

Shaun Appleby


c8629573 <c862...@comp.polyu.edu.hk> wrote in message
news:373939F6...@comp.polyu.edu.hk...


> What is the command to analyze 'core' file and determine the program
> that cause the 'core' file ?
>

> Thanks.
>

Jeff Towers

unread,
May 12, 1999, 3:00:00 AM5/12/99
to
If you dbx core, you should be able to get the name of the executable.
quit, then dbx <exe_name> core.
Now type where, and it should give the program stack (the list
of functions from main to the point of failure, with filenames
and line numbers). The information is considerably better if
the executable was built with the -g option.

--
-------------------- the end -------------

Norman Levin

unread,
May 12, 1999, 3:00:00 AM5/12/99
to


COREFILE.41
---------------------------

This file includes information regarding how to determine where the
"core" file resides and which program caused it.

----------------------------------------------------------------
NOTE: This document is provided as an aid by the Austin AIX Support
Center.

DISCLAIMER: The information contained in this document is distributed
"AS IS" without any warranties of any kind either expressed or implied.
IBM will not be responsible for any direct, incidental, consequential,
special or indirect damages. IBM EXPRESSLY DISCLAIMS ANY IMPLIED
WARRANTY OF MERCHANTABILITY AND ANY IMPLIED WARRANTY OF FITNESS FOR A
PARTICULAR PURPOSE.

Comments about this document may be sent by fax to "Info Feedback" at
(512) 823-5972. IBM representatives can send comments internally to
PSP6000 at AUSVM6.

CONTENTS
--------
02/27/97 Determining Location and Cause of "core" File

__________________________________________________________________________
02/27/97

|
| Determining Location and Cause of "core" File
|
| ABOUT THIS DOCUMENT
|
| This document describes how to determine where the "core"
| file resides and which program caused it. This document is
| applicable to AIX versions 4.1 and 4.2. IF a core file has
| been created on your system, you should have an error log
| entry like the following:
|
| LABEL: CORE_DUMP
| IDENTIFIER: DE0A8DC4
|
| Date/Time: Mon Nov 18 08:15:21
| Sequence Number: 99
| Machine Id: 000003264700
| Node Id: katmai
| Class: S
| Type: PERM
| Resource Name: SYSPROC
|
| Description
| SOFTWARE PROGRAM ABNORMALLY TERMINATED
|
| Probable Causes
| SOFTWARE PROGRAM
|
| User Causes
| USER GENERATED SIGNAL
|
| Recommended Actions
| CORRECT THEN RETRY
|
| Failure Causes
| SOFTWARE PROGRAM
|
| Recommended Actions
| RERUN THE APPLICATION PROGRAM
| IF PROBLEM PERSISTS THEN DO THE FOLLOWING
| CONTACT APPROPRIATE SERVICE REPRESENTATIVE
|
| Detail Data
| SIGNAL NUMBER
| 11
| USER'S PROCESS ID:
| 24010
| FILE SYSTEM SERIAL NUMBER
| 5
| INODE NUMBER
| 2
| PROGRAM NAME
| sleep
|
| In the above error log entry you see that the program that
| dropped the core file is listed under - PROGRAM NAME - in
| this case it was the sleep command.
|
| ANOTHER METHOD FOR DETECTING AND FINDING CORE FILES
|
| 1. You can configure AIX to detect when core files are
| created and have AIX mail a message to root alerting
| root that an application has failed. The instructions
| for setting this up is in a README in the
| /usr/samples/findcore directory - these programs are
| delivered with the bos.sysmgt.serv_aid fileset.
|
| 2. An alternative method of finding core files follows:
|
| a. Log in as root.
|
| find / -name core -ls
|
| b. Now cd to the directory indicated in step 1.
|
| c. To determine what application dropped the core file,
| run the following command:
|
| lquerypv -h core 6b0 64
|
| The program that caused the core dump is listed on
| the "6B0" & "6C0" lines. For example:
|
| 000006B0 00000000 00000000 00000000 736C6565 |....slee|
| 000006C0 70000000 00000000 00000000 00000000 |p.......|
|
| The program that caused the core dump will be listed
| at the right-hand side of the line, between vertical
| bars (pipe symbols). In the example above the core
| file shows the sleep program.
|
| If you recognize the program's name as one of your
| applications, you need to give the "core" file to
| your application supplier for further problem deter-
| mination.
|
| If the program listed is an AIX command, or if you
| are unsure of its origin, you may wish to work with
| AIX support on this problem.
|
| A core file is generated when a program tries to do
| something illegal on the system. The usual cause is
| trying to access memory outside the memory assigned
| to the program by the system. Core files are
| normally caused by a program error or some type of
| data cor- ruption.
|
| Unless the program that caused the core file is a
| special debug version of the program normally the
| only useful information in the core file is the name
| of the module or program that caused a core dump.
|
| Examining the errpt -a log will frequently alert you
| to possible problems with the system that may be the
| cause of the core file.
|
| For information on support available from the AIX
| Support Family and Program Services (IBM's base
| support for code-related problems), request these
| faxes from 1-800-IBM-4FAX:
|
| 1537 Overview of AIX Support
| 1760 Using Program Services
| 2464 The AIX Support Family
|

COREFILE 3.2.0

---------------------------

This file includes information regarding how to determine where the
"core" file resides and which program caused it.

----------------------------------------------------------------
NOTE: This document is provided as an aid by the Austin AIX Support
Center.

DISCLAIMER: The information contained in this document is distributed
"AS IS" without any warranties of any kind either expressed or implied.
IBM will not be responsible for any direct, incidental, consequential,
special or indirect damages. IBM EXPRESSLY DISCLAIMS ANY IMPLIED
WARRANTY OF MERCHANTABILITY AND ANY IMPLIED WARRANTY OF FITNESS FOR A
PARTICULAR PURPOSE.

Comments about this document may be sent by fax to "Info Feedback" at
(512) 823-5972. IBM representatives can send comments internally to
PSP6000 at AUSVM6.

CONTENTS
--------
09/11/96 Determining Location and Cause of "core" File

__________________________________________________________________________
09/11/96

Determining Location and Cause of "core" File

ABOUT THIS DOCUMENT

This document describes how to determine where the "core"
file resides and which program caused it. This document is
applicable to AIX versions 3.2 and 4.1. You should have a
core file if you have an error log entry with the following:

ERROR LABEL: CORE_DUMP
ERROR ID: 0F27AAE5

PROCEDURE

1. Log in as root.

2. Run "errpt -a | pg" and look for the word "CORE_DUMP".
Note the file system Serial Number and the Inode Number
from the CORE_DUMP error log entry. Here is an example:

ERROR LABEL: CORE_DUMP
...
File system Serial Number
8
Inode Number
2049

3. Run "echo vfs | crash > file". Then look at the output
(in "file") to find the file system with the Serial
Number found in step 2. It will be in the column
labeled "NUMBER".

Example lines from "file":

>VFS ADDRESS TYPE OBJECT STUB NUMBER FLAGS PATHS
5 583b4f4 jfs 5843108 58436b8 8 D /dev/hd1 mounted
over /home

Note the directory following "mounted over" in the PATHS
section ("/home" in the example above).

4. Now run the following command, replacing <dir> with the
directory found in step 3. and replacing <inum> with the
Inode Number found in step 2:

find <dir> -xdev -inum <inum> -print

Here is example output from the "find" command:

/home/user_name

The output above is the directory in which the "core"
file resides.

| An alternate method to locate core files is to use the
| find command with:

| find / -name core -ls

| then look for a core file with the same date and time as
| the entry in the errpt.

5. Now cd to the directory indicated in step 4.

6. If you are at AIX 3.2 run the following command:

/usr/sbin/hdf core 730 64

The program that caused the core dump is listed on the
"730" line. For example:

00000730 6D65646C 65790000 00000000 00000000 |tsm.............|

If you are at AIX 4.1 run the following command:

lquerypv -h core 6b0 64

The program that caused the core dump is listed on the
"6B0" & "6C0" lines. For example:

000006B0 00000000 00000000 00000000 736C6565 |....slee|
000006C0 70000000 00000000 00000000 00000000 |p.......|

The program that caused the core dump will be listed at
the right-hand side of the line, between vertical bars
(pipe symbols). In the examples above, the AIX 3.2 core
file shows the tsm program and the AIX 4.1 core file
| show the sleep program.

If you recognize the program's name as one of your
applications, you need to give the "core" file to your
application supplier for further problem determination.

If the program listed is an AIX command, or if you are
unsure of its origin, you may wish to work with AIX
support on this problem.

| A core file is generated when a program tries to do
| something illegal on the system. The usual cause is
| trying to access memory outside the memory assigned to
| the program by the system. Core files are normally
| caused by a program error or some type of data cor-
| ruption.

| Unless the program that caused the core file is a
| special debug version of the program normally the only
| usefull information in the core file is the name of the
| module or program that caused a core dump.

| Examining the errpt -a log will frequently alert you to
| possible problems with the system that may be the cause
| of the core file.

| For information on support available from the AIX
| Support Family and Program Services (IBM's base support
| for code-related problems), request these faxes from
| 1-800-IBM-4FAX:

--
Norman Levin
vm/dynAmIX inc.

0 new messages