为什么Coredump文件未在此处生成? [英] Why Coredump files is not generating here?
问题描述
我在这里有个情况,几天前我能够在目标板上看到核心哑文件,我通过在/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"行.但是现在我看不到已简化的文件
So I changed /etc/limits file and added "ulimit -c unlimited" line.but now I could not see Coredumped file
我正在运行kill -9 $$来生成分段错误,它反过来会像以前一样生成coredump文件.
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 -6
或kill -SIGABRT
应该产生一个核心文件.以及大多数其他信号,例如kill -BUS
,kill -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屋!