vmcore cant be generated under kernel 4.7.9

Dave Young dyoung at redhat.com
Sun Nov 13 21:46:28 PST 2016


On 11/12/16 at 11:02am, R Sun wrote:
> 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.

The makedumpfile patch has been in Fedora rawhide and F25 kexec-tools
patckage. I think you can use the rawhide rpm on F23

Thanks
Dave
> 
> Below is my patch to fix this problem
> 
> 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);
> 
> _______________________________________________
> kexec mailing list
> kexec at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec



More information about the kexec mailing list