为什么这里没有生成 Coredump 文件? [英] Why Coredump files is not generating here?

查看:41
本文介绍了为什么这里没有生成 Coredump 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里有一个情况,几天前我能够在我的目标板上看到核心文件,我通过向我的/etc/profile 添加ulimit -c unlimited"来提供核心转储生成支持.但是后来有人告诉我

I have a sitution here,few days back I was able to see core dumbed file on my target board,I have provided the coredump generation support by adding "ulimit -c unlimited" to my /etc/profile.But then someone told me

这只会对从登录 shell 启动的程序有效,对由 systemd 启动的进程/服务无效,etc/limits 是设置这些默认值的正确位置.

This will only take affect for program launched from a login shell, not for processes/services started by systemd,etc/limits would the the proper location for settings these defaults.

所以我更改了/etc/limits 文件并添加了ulimit -c unlimited"行.但现在我看不到 Coredumped 文件

So I changed /etc/limits file and added "ulimit -c unlimited" line.but now I could not see Coredumped file

我正在运行 kill -9 $$ 以生成分段错误,然后它会像之前一样生成核心转储文件.

I am running kill -9 $$ to generate segmentation fault and it in turn will generate coredump file as it was doing earlier.

我们尝试更改/proc/sys/kernel/core_pattern"文件并显式运行 ulimit -c unlimited ,但它也不起作用

We tried changing "/proc/sys/kernel/core_pattern" file and running ulimit -c unlimited explicitly also but its not working out too

我们哪里做错了??

推荐答案

kill -9 不会生成 core 文件.命令 kill -l 给出了支持的信号列表.kill -6kill -SIGABRT 应该生成一个核心文件.以及大多数其他信号,例如kill -BUSkill -SEGV

kill -9 will not generate a core file. The command kill -l gives a list of supported signals. kill -6 or kill -SIGABRT should produce a core file. As well as most other signals such as kill -BUS, kill -SEGV, etc.

这篇关于为什么这里没有生成 Coredump 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆