下活動env的程序,有段時間分段錯誤,我嘗試gdb的coredump文件,但是找不到導致coredump的代碼行。coredump at __correctly_grouped_prefixwc
Program terminated with signal 11, Segmentation fault.
#0 0x00000038f3a41bf5 in __correctly_grouped_prefixwc() from /lib64/libc.so.6
(gdb) bt
#0 0x00000038f3a41bf5 in __correctly_grouped_prefixwc() from /lib64/libc.so.6
#1 0x0000000000000000 in ??()
(gdb) info r
rax 0x1ac1b108 448901384
rbx 0x2add423b4ff0 47129787322352
rcx 0x2add48128640 47129885312576
rdx 0x0 0
rsi 0x1 1
rdi 0x2add48000020 47129884098592
rbp 0x2add3f1aef50 0x2add3f1aef50
rsp 0x2add423b4ff0 0x2add423b4ff0
r8 0x2 2
r9 0x2 2
r10 0x0 0
r11 0x0 0
r12 0x0 0
r13 0x3 3
r14 0x1000 4096
r15 0x2add3f1b0000 47129734873088
rip 0x38f3a41bf5 0x38f3a41bf5 <__correctly_grouped_prefixwc+165>
eflags 0x10246 [ PF ZF IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
fctrl 0x37f 895
fstat 0x0 0
ftag 0xffff 65535
fiseg 0x0 0
fioff 0xc54f06 12930822
foseg 0x2add 10973
fooff 0x423b3f00 1111179008
fop 0x0 0
mxcsr 0x1fa1 [ IE PE IM DM ZM OM UM PM ]
cat /etc/redhat-release
CentOS release 5.5 (Final)
,我想在源代碼級調試的glibc,運行yum install yum-utils
安裝debuginfo軟安裝程序。 然後運行sudo debuginfo-install glibc
,結果如下
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.ustc.edu.cn
* base: mirror.bit.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Checking for new repos for mirrors
Could not find debuginfo for main pkg: glibc-2.5-123.x86_64
Could not find debuginfo for main pkg: glibc-2.5-123.i686
No debuginfo packages available to install
,然後我嘗試運行yum search glibc-debuginfo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.ustc.edu.cn
* base: mirrors.163.com
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Warning: No matches found for: glibc-debuginfo
No Matches found
再沒有發現匹配。
我嘗試運行yum search glibc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.ustc.edu.cn
* base: mirrors.163.com
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
================================================================================ Matched: glibc =================================================================================
compat-glibc.i386 : Compatibility C library
compat-glibc.x86_64 : Compatibility C library
compat-glibc-headers.x86_64 : Header files for development using standard C libraries.
glibc.i686 : The GNU libc libraries.
glibc.x86_64 : The GNU libc libraries.
glibc-common.x86_64 : Common binaries and locale data for glibc
glibc-devel.i386 : Object files for development using standard C libraries.
glibc-devel.x86_64 : Object files for development using standard C libraries.
glibc-headers.x86_64 : Header files for development using standard C libraries.
glibc-utils.x86_64 : Development utilities from GNU C library
kernel-headers.x86_64 : Header files for the Linux kernel for use by glibc
nss_db.i386 : An NSS library for the Berkeley DB.
nss_db.x86_64 : An NSS library for the Berkeley DB.
yp-tools.x86_64 : NIS (or YP) client programs.
yum-protect-packages.noarch : Yum plugin to prevents Yum from removing itself and other protected packages
我嘗試運行sudo yum install glibc-devel.x86_64
,並再次用gdb的核心轉儲文件, 但它顯示以下
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
我怎麼能找到的代碼行的原因核心轉儲?我嘗試谷歌,但沒有找到任何想法?
我們確切的問題是什麼? – tristan 2014-11-24 02:29:44
_「任何想法?」 - 使用調試器。 – 2014-11-24 02:39:17
我如何找到代碼行導致coredump? – Sleepwom 2014-11-24 02:47:09