【问题标题】:Asterisk gdb how to debug Crash with gdb and asterisk 11.5.1 but Still Core Dunp not generated why?Asterisk gdb 如何用 gdb 和 asterisk 11.5.1 调试 Crash 但仍然没有生成 Core Dunp 为什么?
【发布时间】:2013-12-23 12:15:58
【问题描述】:

========================== [root@officekam asterisk-11.5.1]# df -h 已使用的文件系统大小可用使用百分比已安装在 /dev/sda2 143G 69G 67G 51% / /dev/sda1 97M 44M 49M 48% /boot tmpfs 1008M 0 1008M 0% /dev/shm

==============

解释每个步骤。

/etc/asterisk/asterisk.conf ---- 目录 astetcdir => /etc/星号 astmoddir => /usr/lib/asterisk/modules astvarlibdir => /var/lib/星号 astdbdir => /var/lib/星号 astkeydir => /var/lib/星号 astdatadir => /var/lib/星号 astagidir => /var/lib/asterisk/agi-bin astspooldir => /var/spool/星号 astrundir => /var/run/星号 astlogdir => /var/log/星号

[options]
;verbose = 3
;debug = 3
;alwaysfork = yes               ; Same as -F at startup.
;nofork = yes                   ; Same as -f at startup.
;quiet = yes                    ; Same as -q at startup.
;timestamp = yes                ; Same as -T at startup.
;execincludes = yes             ; Support #exec in config files.
;console = yes                  ; Run as console (same as -c at startup).
;highpriority = yes             ; Run realtime priority (same as -p at
                                ; startup).
;initcrypto = yes               ; Initialize crypto keys (same as -i at
                                ; startup).
;nocolor = yes                  ; Disable console colors.
;dontwarn = yes                 ; Disable some warnings.
**dumpcore = yes**                  ; Dump core on crash (same as -g at startup).

======================= 我的系统: /usr/src/asterisk-11.5.1/: 我用星号运行星号:星号 -U 星号 -vvvvvvvvvvvvvvvvgc -dddddddddd

注意: gdb 正在安装 ulimit -U 无限制。

但没有生成核心文件。 那么如何使用 $gdb corefile

=======其他设置========

#DAEMON_COREFILE_LIMIT="unlimited" 已添加。 DAEMON_COREFILE_LIMIT="无限制"

==============================

**# /etc/profile**

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

# It's NOT good idea to change this file unless you know what you
# are doing. Much better way is to create custom.sh shell script in
# /etc/profile.d/ to make custom changes to environment. This will
# prevent need for merging in future updates.

ulimit -c 无限制 >/dev/null 2>&1

**

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

**
===================
kernel.core_pattern = '/tmp/core_dump/core'
===================
**lrwxrwxrwx  1 asterisk asterisk 0 Dec 24 11:44 cwd -> /usr/src/asterisk/asterisk-11.5.1**
-r--------  1 asterisk asterisk 0 Dec 24 11:44 environ
lrwxrwxrwx  1 asterisk asterisk 0 Dec 24 11:44 exe -> /usr/sbin/asterisk
======================================

【问题讨论】:

    标签: gdb segmentation-fault asterisk coredump


    【解决方案1】:

    你需要

    1) 用调试符号编译星号

    2) 在 /etc/asterisk/asterisk.conf 中启用核心转储。

    voip-info asterisk debugging page查看更多信息

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-16
      相关资源
      最近更新 更多