打开与崩溃的Linux崩溃转储转储?

所以我一直在试图debugging运行Ubuntu-Server 16.04的服务器的一个奇怪的间歇性的内核崩溃,这让我难以忍受,所以我按照Ubuntu维基崩溃转储配方安装并设置了linux-crashdump

在等待这个问题重新抬头之后, linux-crashdump完成了它的工作并生成了一个崩溃转储,但是现在我不知道如何使用它!

Ubuntu指南提供了两种查看它们的方法,可以使用crashapport-retrace ,但是这两种方法都不能像描述的那样工作。

apport-retrace只是返回:

 ERROR: report file does not contain the required fields 

同时对于crash ,在运行以下命令之前,我已经使用apt-get install linux-image-$(uname -r)-dbgsym下载了带有debugging信息的相应映像:

 crash /usr/lib/debug/boot/vmlinux-4.4.0-93-generic /var/crash/linux-image-4.4.0-93-generic-201709131146.crash 

但是这会导致以下错误:

 crash: linux-image-4.4.0-93-generic-201709131146.crash: not a supported file format 

现在查看linux-crashdump转储的正确方法是什么? 我是否缺less不在指南中的步骤?

你需要使用apport-unpack。 然后gdb和回溯。 网上有很多关于如何使用apport-unpack的例子。

所以我明白了 看起来,崩溃转储的实际肉根本不在.crash文件中,而是在一个文件夹中。

我的/var/crash文件夹的相关内容如下所示:

 /var/crash/ 201709131146/ dmesg.201709131146 dump.201709131146 linux-image-4.4.0-93-generic-201709131146.crash 

所以我需要运行的是:

 crash /usr/lib/debug/boot/vmlinux-4.4.0-93-generic /var/crash/201709131146/dump.201709131146 

这(最终)给了我一个有用的堆栈跟踪和其他细节问题。