vmcore cant be generated under kernel 4.7.9
Atsushi Kumagai
ats-kumagai at wm.jp.nec.com
Sun Nov 13 20:29:05 PST 2016
Hello,
>Hello,
>
>I updated my fedora23 from 4.5.7-202 to 4.7.9-100 recently, and found out kdump
>could not generate vmcore when crashed, but its ok with
>vmcore-dmesg.txt. i traced
>it for a while and find out its because of a change in the page struct
>which _count renamed to _refcount committed as 0139aa7b7f in kernel.
>
>Below is my patch to fix this problem
Thanks for your report, this problem is going to be fixed in v1.6.1
by the patch below, it can be found in the devel branch.
https://sourceforge.net/p/makedumpfile/code/ci/devel/tree/
commit ed46b6ad90d71ca98aced9e82b67333ce1962ebf
Author: Vitaly Kuznetsov <vkuznets at redhat.com>
Date: Fri Jun 17 18:41:26 2016 +0900
[PATCH v2] Support _count -> _refcount rename in struct page
* Required for kernel 4.7
_count member was renamed to _refcount in linux commit 0139aa7b7fa12
("mm: rename _count, field of the struct page, to _refcount") and this
broke makedumpfile. The reason for making the change was to find all users
accessing it directly and not through the recommended API. I tried
suggesting to revert the change but failed, I see no other choice than to
start supporting both _count and _refcount in makedumpfile.
Signed-off-by: Vitaly Kuznetsov <vkuznets at redhat.com>
I'll try to release the next version in this month, please wait for a while.
Thanks,
Atsushi Kumagai
>diff --git a/makedumpfile.c b/makedumpfile.c
>index 853b999..1bfafb7 100644
>--- a/makedumpfile.c
>+++ b/makedumpfile.c
>@@ -2492,6 +2492,13 @@ read_vmcoreinfo(void)
>
> READ_MEMBER_OFFSET("page.flags", page.flags);
> READ_MEMBER_OFFSET("page._count", page._count);
>+ /*
>+ * _count, field of struct page, renamed to _refcount according to
>+ * commit 0139aa7b7f in kernel. so just try page._refcount if
>+ * page._count does not work
>+ */
>+ if (OFFSET(page._count) == NOT_FOUND_STRUCTURE)
>+ READ_MEMBER_OFFSET("page._refcount", page._count);
> READ_MEMBER_OFFSET("page.mapping", page.mapping);
> READ_MEMBER_OFFSET("page.lru", page.lru);
> READ_MEMBER_OFFSET("page._mapcount", page._mapcount);
More information about the kexec
mailing list