如何从 Ubuntu Precise 上的 xinetd 启动的服务获取核心转储

问题描述 投票:0回答:1

我想调试一个失败并显示

SIGPIPE
的服务。因此,我为
SIGPIPE
安装了一个信号处理程序,并在其中调用
abort()
来获取核心转储。

但我什么也没得到。我已设置

sysctl -w kernel.core_pattern=/tmp/core
将核心转储放入
tmp
,并且我设置了
/etc/security/limits.conf
ulimit -c unlimited

那么,如何获得核心转储?

我的 xinetd-service 文件如下所示:

service netmaumau
{
    socket_type = stream
    protocol    = tcp
    port        = 8899
    type        = UNLISTED
    flags       = KEEPALIVE
    disable     = no
    wait        = yes
    user        = heiko
    instances   = 1
    cps         = 1 10
    server      = /long/path/to/nmm-server
    server_args = -a
    log_on_success = PID HOST EXIT
    log_on_failure = HOST
}
ubuntu-12.04 coredump xinetd
1个回答
0
投票

添加

struct rlimit rl = { RLIM_INFINITY, RLIM_INFINITY }; 
setrlimit(RLIMIT_CORE, &rl);

问题解决了

© www.soinside.com 2019 - 2024. All rights reserved.