[Crash-utility] disk_dump_header status value
HAGIO KAZUHITO(萩尾 一仁)
k-hagio-ab at nec.com
Wed Mar 10 01:51:39 UTC 2021
-----Original Message-----
> Hello,
>
>
>
> I have a dump file produced by makedumpfile with following command:
>
>
>
> /sbin/makedumpfile -d 0 -c --message-level 7 /proc/vmcore /tmpd/crashdump-`date +"%Y%m%d-%H%M"`
>
>
>
> When I edit the raw binary, it seems that the first bytes could be mapped to a disk_dump_header structure.
>
> Is that correct ?
Correct.
>
>
>
> When doing this, all seems to match: signature (KDUMP), header version (6), utsname content, timestamp.
>
> But not the status: I get 1 (INCOMPLETED), tough I’m able to analyze it with ‘crash’.
>
> I was expecting 0 or at least 8, because it should be zlib-compressed.
The INCOMPLETED status value you're saying is a diskdump one,
makedumpfile doesn't use those values. Please see "help -D"
crash> help -D
...
status: 1 (DUMP_DH_COMPRESSED_ZLIB)
and crash's __diskdump_memory_dump():
fprintf(fp, " status: %x (", dh->status);
switch (dd->flags & (DISKDUMP_LOCAL|KDUMP_CMPRS_LOCAL))
{
case DISKDUMP_LOCAL:
if (dh->status == DUMP_HEADER_COMPLETED)
fprintf(fp, "DUMP_HEADER_COMPLETED");
else if (dh->status == DUMP_HEADER_INCOMPLETED)
fprintf(fp, "DUMP_HEADER_INCOMPLETED");
else if (dh->status == DUMP_HEADER_COMPRESSED)
fprintf(fp, "DUMP_HEADER_COMPRESSED");
break;
case KDUMP_CMPRS_LOCAL:
if (dh->status & DUMP_DH_COMPRESSED_ZLIB)
fprintf(fp, "DUMP_DH_COMPRESSED_ZLIB");
if (dh->status & DUMP_DH_COMPRESSED_LZO)
fprintf(fp, "DUMP_DH_COMPRESSED_LZO");
if (dh->status & DUMP_DH_COMPRESSED_SNAPPY)
fprintf(fp, "DUMP_DH_COMPRESSED_SNAPPY");
if (dh->status & DUMP_DH_COMPRESSED_INCOMPLETE)
fprintf(fp, "DUMP_DH_COMPRESSED_INCOMPLETE");
if (dh->status & DUMP_DH_EXCLUDED_VMEMMAP)
fprintf(fp, "DUMP_DH_EXCLUDED_VMEMMAP");
break;
}
Thanks,
Kazu
More information about the Crash-utility
mailing list