From: Dave Anderson <anderson@redhat.com>
To: Xiao Wang/Wang Xiao <wangx.fnst@cn.fujitsu.com>
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH 2/2] makedumpfile: make the incomplete vmcore generated by ENOSPC error analyzable
Date: Wed, 17 Sep 2014 09:55:44 -0400 (EDT) [thread overview]
Message-ID: <56999675.16763362.1410962144335.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <5418F4D8.2070301@cn.fujitsu.com>
----- Original Message -----
> Hello Dave,
>
> Thanks for your reply.
>
> We can use two methods to indicate that the incomplete vmcore is a "fixed" one,
> 1. Use a flag in elf/kdump dumpfile(like "e_flags" in ELF header and "status"
> in disk_dump_header) to indicate it has been "fixed". But actually the
> kdump-compressed file needn't to use such a flag, for we just change the
> data write order of this format.
I don't understand.
First, let's stop using the "fixed" description. It is definitely *not* fixed, but
rather it is still a bogus, incomplete, dumpfile, and the user should be made aware
of that fact.
For compressed kdumps, the disk_dump_header.status field currently uses these
three bits:
#define DUMP_DH_COMPRESSED_ZLIB 0x1 /* page is compressed with zlib */
#define DUMP_DH_COMPRESSED_LZO 0x2 /* page is compressed with lzo */
#define DUMP_DH_COMPRESSED_SNAPPY 0x4 /* page is compressed with snappy */
Can you please simply add a DUMP_DH_COMPRESSED_INCOMPLETE flag?
With respect to ELF vmcores, the processor-specific e_flags field is unused by the
crash utility, and it appears that makedumpfile always sets it to zero. But
I'm not sure what the kernel does when /proc/vmcore is created? Could there
be e_flags bits set there that a direct-copy of /proc/vmcore might contain?
That's why I suggested a unique ELF note.
Then, if the flag is set, the crash utility can display "[INCOMPLETE]" next
to the dumpfile file name in the initial system banner and by the "sys" command.
And in the highly-likely event where the vmcore fails to initialize -- in that
case "crash -d1" can display the header contents immediately during invocation.
That way, instead of users complaining about the crash utility, the blame can be
placed where it belongs.
> 2. We can just let makedumpfile change the "fixed" dumpfile's filename automatically.
> Such as add a "-truncated" flag after those dumpfiles.
You probably should do that -- in *addition* to setting a flag in the header.
Since there's no way to prevent a user from re-naming the file, without a flag,
there would be no way of confirming that it was a bogus dumpfile to begin with.
Thanks,
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2014-09-17 13:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.12983.1410860958.22890.kexec@lists.infradead.org>
2014-09-16 13:20 ` [PATCH 2/2] makedumpfile: make the incomplete vmcore generated by ENOSPC error analyzable Dave Anderson
2014-09-17 2:41 ` Wang, Xiao/Wang Xiao
2014-09-17 13:55 ` Dave Anderson [this message]
2014-09-18 7:19 ` Wang, Xiao/Wang Xiao
2014-09-18 13:56 ` Dave Anderson
2014-09-16 9:48 Wang, Xiao/Wang Xiao
2014-09-17 6:47 ` Petr Tesarik
2014-09-18 7:26 ` Wang, Xiao/Wang Xiao
2014-09-18 11:18 ` HATAYAMA, Daisuke
2014-09-18 12:29 ` HATAYAMA, Daisuke
2014-09-19 9:16 ` Wang, Xiao/Wang Xiao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56999675.16763362.1410962144335.JavaMail.zimbra@redhat.com \
--to=anderson@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=wangx.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox