Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Wang, Xiao/Wang Xiao" <wangx.fnst@cn.fujitsu.com>
To: Dave Anderson <anderson@redhat.com>
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH 2/2] makedumpfile: make the incomplete vmcore generated by ENOSPC error analyzable
Date: Thu, 18 Sep 2014 15:19:05 +0800	[thread overview]
Message-ID: <541A8769.1070604@cn.fujitsu.com> (raw)
In-Reply-To: <56999675.16763362.1410962144335.JavaMail.zimbra@redhat.com>

Hello Dave,

On 2014/9/17 21:55, Dave Anderson wrote:
>
>
> ----- 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?

OK, I'll add this 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.

Add a unique ELF note is OK, and I thought it must need to allocate some 
diskspace
first to store this ELF note and its data, for if the dumpfile has been 
modified,
it must write a flag in this place to indicate it's an incomplete 
dumpfile. But
this may waste a bit of diskspace when the dumpfile is generated with no 
error.

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

I thought it will confuse a user when makedumpfile automatically 
modified the
dumpfile name, so I'll keep the dumpfile name unchanged and use the 
above two
flags in the dumpfile to indicate that it has been modified.

>
> Thanks,
>    Dave
>
>
> .
>

-- 
Regards
Wang Xiao

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2014-09-18  7:19 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
2014-09-18  7:19       ` Wang, Xiao/Wang Xiao [this message]
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=541A8769.1070604@cn.fujitsu.com \
    --to=wangx.fnst@cn.fujitsu.com \
    --cc=anderson@redhat.com \
    --cc=kexec@lists.infradead.org \
    /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