[PATCH] makedumpfile: Error on re-filtering the dump file with no free pages
Atsushi Kumagai
ats-kumagai at wm.jp.nec.com
Thu May 18 19:35:40 PDT 2017
>> Hello Zaslonko,
>>
>> > When re-filtering the dump file after the free pages have already been
>> > stripped out we get an error "Can't get necessary symbols for excluding
>> > free pages" if newly specified dump level is below 16 (preserves free
>> > pages).
>> > According to the code, the check for the new dump level is done BEFORE
>> > the new dump level is actually set (based on the dump level specified in
>> > the command and the one from the input dump file).
>> > Moving the new_dump_level calculation ahead would fix the error.
>>
>> Well, I guess the real problem is different.
>> The error you said is printed by exclude_free_page():
>>
>> if ((SYMBOL(node_data) == NOT_FOUND_SYMBOL)
>> && (SYMBOL(pgdat_list) == NOT_FOUND_SYMBOL)
>> && (SYMBOL(contig_page_data) == NOT_FOUND_SYMBOL)) {
>> ERRMSG("Can't get necessary symbols for excluding free pages.\n");
>> return FALSE;
>> }
>>
>> I think the availability of these symbols are not related to free pages.
>> exclude_free_page() is called if info->page_is_buddy is null, I estimate that
>> this situation occurs only if the kernel is older(2.6.16 or before).
>>
>> However, I don't think you use such too old kernel, so I suspect that
>> setup_page_is_buddy() should be updated for newer kernel.
>
>Mikhail is on vacation now - so I try to explain:
Thanks for your explanation, I understand this issue properly.
>The test case is as follows:
>
> 1) We have a -d31 filtered dump "dump.d31"
> 2) We want to compress the dump with "makedumpfile -c dump.31 dump31.compressed"
>
>This fails with:
>
>makedumpfile -c dump.31 dump.31.compressed
>Excluding unnecessary pages : [100.0 %]
>exclude_free_page: Can't get necessary symbols for excluding free pages.
>dump_level is changed to 31, because dump.31 was created by dump_level(31).
>makedumpfile Failed.
>
>The problem is that setup_page_is_buddy() is not called in this case because
>info->dump_level is still 0 since it was not adjusted early enough:
>
> if (info->dump_level & DL_EXCLUDE_FREE)
> setup_page_is_buddy();
>
>Because it is not set info->page_is_buddy is NULL and therefore the following
>if condition gets true:
>
> if ((info->dump_level & DL_EXCLUDE_FREE) && !info->page_is_buddy)
> if (!exclude_free_page(cycle))
> return FALSE;
>
>Since we don't have the symbols in VMCOREINFO (and IMHO don't need it?) the
>exclude_free_page() functions fails with the described error message.
It seems that it's better if I update the condition check of exclude_free_page()
for recent kernels, but those symbols are unnecessary in this case as you thought
anyway. exclude_free_page() shouldn't be called for recent kernels, I don't think
this is an actual problem.
>So our fix is to adjust the info->level before setup_page_is_buddy() is called.
I'm sure this fix is reasonable, I'll merge this into v1.6.2.
Thanks,
Atsushi Kumagai
More information about the kexec
mailing list