From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from [59.151.112.132] (helo=heian.cn.fujitsu.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XK1fk-0007H5-PN for kexec@lists.infradead.org; Wed, 20 Aug 2014 08:55:14 +0000 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s7K8s72S031642 for ; Wed, 20 Aug 2014 16:54:07 +0800 Message-ID: <53F46231.2020008@cn.fujitsu.com> Date: Wed, 20 Aug 2014 16:54:09 +0800 From: "Wang, Xiao/Wang Xiao" MIME-Version: 1.0 Subject: makedumpfile: regenerate the incomplete vmcore generated by ENOSPC error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: kexec@lists.infradead.org Hello, Sometimes when the dump device doesn't have enough space to store a vmcore, makedumpfile will report an ENOSPC error and leave an incomplete vmcore in the dump device, but this file can't be analyzed by crash utility. Since this file may contains important informations for debugging, in order to use it we came up with an approach to deal with it, which described as follow: Add an option to makedumpfile to make it can analyze incomplete vmcore and generate an usable vmcore(can be analyzed by crash utility). Since there are two formats of a vmcore, the analysis of an incomplete vmcore are different in each condition. 1.kdump-compressed format: If the 'page data' are written but not complete, then we can modify the header(main header and sub header) and the bitmap(1st-bitmap and 2nd-bitmap) to make the core act as if the missing page data were filtered. Otherwise if there's no 'page data' written to the core file, this core file couldn't become usable in any case. 2.elf format: If the PT_LOAD segments in a vmcore are written but not complete, then we can modify the associated values in the 'Program segment header' to correctly reflect the existing memory of the vmcore. Otherwise if the PT_LOAD segments doesn't exist, this core file can't become usable in any case. We are trying to implement this approach now and are sincerely expecting any comments or discussions, thanks. -- Regards Wang Xiao _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec