20101218 linux core dumps - plembo/onemoretech GitHub Wiki

title: Linux core dumps link: https://onemoretech.wordpress.com/2010/12/18/linux-core-dumps/ author: lembobro description: post_id: 102 created: 2010/12/18 00:12:03 created_gmt: 2010/12/18 00:12:03 comment_status: open post_name: linux-core-dumps status: publish post_type: post

Linux core dumps

There are a number of good articles out there on the art of using and interpreting core dumps in Linux. Here are a couple:

Linux software debugging with GDB

A quick overview of Linux kernel crash dump analysis

Even if you’re not interested in the deeper knowledge of the universe that a higher level analysis of core dumps can provide, it’s handy to at least know how to find out what process triggered a particular dump.

There are two tools that can do this for you: the file or gdb (the GNU debugger) commands. Following are examples of each.

First, the file command:

[root@myhost tmp] **file core.4575** core.4575: ELF 64-bit LSB core file AMD x86-64, version 1 (SYSV), SVR4-style, from ‘tar’ [root@myhost tmp]

Next, gdb:

`[root@myhost tmp] gdb -c core.4575
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.2)

Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “x86_64-redhat-linux-gnu”.
For bug reporting instructions, please see:
.
Core was generated by tar rzvf /s1/backup/myhost_var.tgz var/named’. Program terminated with signal 6, Aborted. #0 0×000000385d030265 in ?? () (gdb)

In each case above the name of the core file, found in /var/tmp, is named core.4575. Note that I ran these commands as root, since the core file in question was owned by and only readable by that user.

Copyright 2004-2019 Phil Lembo