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

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

问题描述

在运行C程序时,它显示((内核已转储)" ),但是我看不到当前路径下的任何文件.

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 .

[/proc/sys/kernel/] core_pattern用于指定核心转储文件模式名称.

[/proc/sys/kernel/]core_pattern is used to specify a core dumpfile pattern name.

  • 如果模式的第一个字符是'|',则内核将处理 模式的其余部分作为要运行的命令.核心转储将是 写入该程序的标准输入,而不是文件.
  • If the first character of the pattern is a '|', the kernel will treat the rest of the pattern as a command to run. The core dump will be written to the standard input of that program instead of to a file.

您无需配置将核心转储写入磁盘,而是将系统配置为将其发送到abrt程序. 自动错误报告工具可能不如

Instead of writing the core dump to disk, your system is configured to send it to the abrt 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天全站免登陆