核心已转储,但核心文件不在当前目录中? [英] Core dumped, but core file is not in the current directory?

查看:26
本文介绍了核心已转储,但核心文件不在当前目录中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行 C 程序时,它显示 "(core dumped)" 但我在当前路径下看不到任何文件.

While running a C program, It says "(core dumped)" but I can't see any files under the current path.

我已经设置并验证了ulimit:

ulimit -c unlimited 
ulimit -a 

我也试图找到一个名为core"的文件,但没有找到核心转储文件?
任何帮助,我的核心文件在哪里?

I also tried to find a file named "core", but didn't get the core dumped file?
Any help, where is my core file?

推荐答案

阅读 /usr/src/linux/Documentation/sysctl/kernel.txt.

core_pattern 用于指定核心转储文件模式名称.

core_pattern is used to specify a core dumpfile pattern name.

  • 如果模式的第一个字符是|",内核将处理模式的其余部分作为命令运行.核心转储将是写入该程序的标准输入而不是文件.

不是将核心转储写入磁盘,而是将系统配置为将其发送到 abrt(意思是:自动错误报告工具,不是中止")程序代替.自动化错误报告工具可能不像它应该是...

Instead of writing the core dump to disk, your system is configured to send it to the abrt (meaning: Automated Bug Reporting Tool, not "abort") program instead. Automated Bug Reporting Tool is possibly not as documented as it should be...

无论如何,快速的答案是您应该能够在 /var/cache/abrt 中找到您的核心文件,其中 abrt 在被调用后存储它.类似地,其他使用 Apport 的系统可能会在 /var/crash 中松散核心,等等.

In any case, the quick answer is that you should be able to find your core file in /var/cache/abrt, where abrt stores it after being invoked. Similarly, other systems using Apport may squirrel away cores in /var/crash, and so on.

这篇关于核心已转储,但核心文件不在当前目录中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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