linux 挂死问题定位分析

本文通过生成的coredump文件,使用gdb工具进行分析,详细描述了如何定位Linux程序挂死的原因。通过`info sharedlibrary`命令查看库链接情况,`bt`命令查找挂死位置,并通过设置`solib-absolute-prefix`加载运行环境,进一步通过`where`命令显示挂死的详细位置,最终定位到问题出现在`BcmLnxMutexSemaphore::Lock`函数调用中。
摘要由CSDN通过智能技术生成

1.生成coredump 文件

根据生成的coredump文件,下载到编译环境中,结合gdb查找符号位,定位挂死位置

/opt/toolchains/gcc-4.7.3-cmc-201308-20140423/bin/mips-linux-uclibc-gdb ./linux_cmts_sym coredump
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 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 "--host=x86_64-unknown-linux-gnu --target=mips-linux-uclibc".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/heshuanglai/project/CMC3219/linux_cmts_sym...done.


warning: core file may not match specified executable file.
[New LWP 231]


warning: Could not load shared library symbols for 9 libraries, e.g. /lib/libdl.so.0.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `./linux_cmts -cmd -app'.
Program terminated with signal 6, Aborted.
#0  0x2ac81dd0 in ?? ()
(gdb) info sharedlibrary  查看lib连接库
From        To          Syms Read   Shared Object Library
                        No          /lib/libdl.so.0
                        No          /lib/librt.so.0
                        No          /lib/libpthread.so.0
                        No          /lib/libstdc++.so.6
                   

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值