Hello Kazu,

Thanks for the explanation. It's now clear.
I was mixing DISKDUMP_LOCAL and KDUMP_COMPRESSED_LOCAL dumpfiles.

Best regards,
Patrick Agrain

-----Message d'origine-----
De : HAGIO KAZUHITO(萩尾 一仁) [mailto:k-hagio...@nec.com] 
Envoyé : mercredi 10 mars 2021 02:52
À : Agrain Patrick <patrick.agr...@al-enterprise.com>
Cc : Discussion list for crash utility usage, maintenance and development 
<crash-utility@redhat.com>
Objet : EXT: RE: disk_dump_header status value


** External email - Please consider with caution **


-----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



--
Crash-utility mailing list
Crash-utility@redhat.com
https://listman.redhat.com/mailman/listinfo/crash-utility

Reply via email to