0

我正在容器中运行一个进程(服务)。几分钟后,进程停止(或崩溃),但没有生成核心转储。

当我尝试有意创建一个核心转储(例如:在我的程序中划分 10/0)时,它会创建一个核心转储。

但是相同的进程(没有故意崩溃)将停止并且不会创建核心转储。

可能是什么问题呢?

以下是我在 VPS 上的内核的更具体细节:

[root@test101 ~]# sysctl -a |egrep -i "core"
kernel.core_uses_pid = 1
kernel.core_pattern = core.%e.%p
kernel.core_pipe_limit = 4
net.core.somaxconn = 128
net.core.xfrm_aevent_etime = 10
net.core.xfrm_aevent_rseqth = 2
net.core.xfrm_larval_drop = 1
net.core.xfrm_acq_expires = 30
net.core.wmem_max = 131071
net.core.rmem_max = 131071
net.core.wmem_default = 133120
net.core.rmem_default = 133120
net.core.dev_weight = 64
net.core.netdev_max_backlog = 1000
net.core.message_cost = 5
net.core.message_burst = 10
net.core.optmem_max = 20480
net.core.rps_sock_flow_entries = 0
net.core.netdev_budget = 300
net.core.warnings = 1

[root@test101 ~]# ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals                 (-i) 8041
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
4

1 回答 1

0

将以下行添加到您的 /etc/security/limits.conf:

  • 软核无限
  • 硬核无限根 软核无限根 硬核无限
于 2016-12-30T16:28:35.067 回答