日期:2014-05-16  浏览次数:20712 次

Linux 下core文件分析
原文:http://blog.csdn.net/gobitan/article/details/5644151

Linux平台下的core file分析

胡家辉 2010-05-06



第一步:找到core file是由哪个程序产生的

[root@app10 dennis]# file core.11751

core.11751: ELF 64-bit LSB core file AMD x86-64, version 1 (SYSV), SVR4-style, from 'java'

[root@app10 dennis]#

从上面可以看出,该core file是由java产生的。



第二步:用gdb调试器找到问题所在,执行如下命令

[root@app10 dennis]# gdb java core.11751

GNU gdb Fedora (6.8-27.el5)

Copyright (C) 2008 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

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"...

(no debugging symbols found)

Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.

Loaded symbols for /lib64/libpthread.so.0

Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/jli/libjli.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jre1.6.0_19/bin/../lib/amd64/jli/libjli.so

Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.

Loaded symbols for /lib64/libdl.so.2

Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.

Loaded symbols for /lib64/libc.so.6

Reading symbols from /lib64/ld-linux-x86-64.so.2...

(no debugging symbols found)...done.

Loaded symbols for /lib64/ld-linux-x86-64.so.2

Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/server/libjvm.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/server/libjvm.so

Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.

Loaded symbols for /lib64/libm.so.6

Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.

Loaded symbols for /lib64/librt.so.1

Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/libverify.so...

(no debugging symbols found)...done.

Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/libverify.so

Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/libjava.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/libjava.so

Reading symbols from /lib64/libnsl.so.1...(no debugging symbols found)...done.

Loaded symbols for /lib64/libnsl.so.1

Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/native_threads/libhpi.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/native_threads/libhpi.so

Reading symbols from /lib64/libnss_files.so.2...

(no debugging symbols found)...done.

Loaded symbols for /lib64/libnss_files.so.2

Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/libzip.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/libzip.so

Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/libnet.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/libnet.so

Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/librmi.so...(no debugging symbols found)...done.

Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/librmi.so

Reading symbols from /usr/java/jre1.6.0_19/lib/amd64/libnio.so...

(no debugging symbols found)...done.

Loaded symbols for /usr/java/jre1.6.0_19/lib/amd64/libnio.so

Reading symbols from /opt/nawg/lib/libheade