All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
To: Daniel Kiper <daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	olaf-QOLJcTWqO2uzQB+pC5nmwQ@public.gmane.org,
	xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org,
	Petr Tesarik <ptesarik-AlSwsSmVLrQ@public.gmane.org>,
	konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH] kexec-tools: Read always one vmcoreinfo file
Date: Thu, 2 Aug 2012 12:06:15 +0900	[thread overview]
Message-ID: <20120802030615.GA20262@verge.net.au> (raw)
In-Reply-To: <20120724135410.GA2230-UojuW/CpjwpdUOLzJiIvSsFoITBeLw/klGfBN0aaEZ+lPcVs/6D9LQ@public.gmane.org>

On Tue, Jul 24, 2012 at 03:54:10PM +0200, Daniel Kiper wrote:
> On Tue, Jul 24, 2012 at 10:18:34AM +0200, Petr Tesarik wrote:
> > Dne Po 23. ??ervence 2012 22:10:59 Daniel Kiper napsal(a):
> > > Hi Petr,
> > >
> > > On Mon, Jul 23, 2012 at 03:30:55PM +0200, Petr Tesarik wrote:
> > > > Dne Po 23. ??ervence 2012 14:56:07 Petr Tesarik napsal(a):
> > > > > Dne ??t 5. ??ervence 2012 14:16:35 Daniel Kiper napsal(a):
> > > > > > vmcoreinfo file could exists under /sys/kernel (valid on baremetal
> > > > > > only) and/or under /sys/hypervisor (valid when Xen dom0 is running).
> > > > > > Read only one of them. It means that only one PT_NOTE will be always
> > > > > > created. Remove extra code for second PT_NOTE creation.
> > > > >
> > > > > Hi Daniel,
> > > > >
> > > > > are you absolutely sure this is the right thing to do? IIUC these two
> > > > > VMCORINFO notes are very different. The one from /sys/kernel/vmcoreinfo
> > > > > describes the Dom0 kernel (type 'VMCOREINFO'), while the one from
> > > > > /sys/hypervisor describes the Xen hypervisor (type 'XEN_VMCOREINFO').
> > > > > If you keep only the hypervisor note, then e.g. makedumpfile won't be
> > > > > able to use dumplevel greater than 1, nor will it be able to extract
> > > > > the log buffer.
> > > >
> > > > I've just verified this, and I'm confident we have to keep both notes in
> > > > the dump file. Simon, please revert Daniel's patch to avoid regressions.
> > > >
> > > > I'm attaching a sample VMCOREINFO_XEN and VMCOREINFO to demonstrate the
> > > > difference. Note that the VMCOREINFO_XEN note is actually too big,
> > > > because Xen doesn't bother to maintain the correct note size in the note
> > > > header, so it always spans a complete page minus sizeof(Elf64_Nhdr)...
> > >
> > > [...]
> > >
> > > The problem with /sys/kernel/vmcoreinfo under Xen is that it expose invalid
> > > physical address. It breaks /proc/vmcore in crash kernel. That is why I
> > > proposed that fix. Additionally, /sys/kernel/vmcoreinfo is not available
> > > under Xen Linux Ver. 2.6.18. However, I did not do any makedumpfile tests.
> > > If you discovered any issues with my patch please drop me more details
> > > about your tests (Xen version, Linux Kernel version, makedumpfile version,
> > > command lines, config files, logs, etc.). I will be more then happy to
> > > fix/improve kexec-tools and makedumpfile.
> >
> > Hi Daniel,
> >
> > well, Linux v2.6.18 does not have /sys/kernel/vmcoreinfo, simply because the
> > VMCOREINFO infrastructure was not present in 2.6.18. It was added later with
> 
> Yep.
> 
> > commit fd59d231f81cb02870b9cf15f456a897f3669b4e, which went into 2.6.24.
> 
> Hmmm... As I know 2.6.24 does not support kexec/kdump under Xen dom0. Correct?
> 
> > I tested with the following combinations:
> >
> > * xen-3.3.1 + kernel-xen-2.6.27.54 + kexec-tools-2.0.0 + makedumpfile-1.3.1
> > * xen-4.0.3 + kernel-xen-2.6.32.59 + kexec-tools-2.0.0 + makedumpfile-1.3.1
> > * xen-4.1.2 + kernel-xen-3.0.34 + kexec-tools-2.0.0 + makedumpfile-1.4.0
> >
> > These versions correspond to SLES11-GA, SLES11-SP1 and SLES11-SP2,
> > respectively. All of them work just fine and save both ELF notes into the
> > dump.
> 
> Could you test current kexec-tools development version and
> latest makedumpfile version on latest SLES version?
> 
> > What do you mean by "invalid physical address"? I'm getting the correct
> > physical address under Xen. Obviously, it must be translated to machine
> > addresses if you need them from the secondary kernel.
> 
> Correct vmcoreinfo address should be established by calling
> HYPERVISOR_kexec_op(KEXEC_CMD_kexec_get_range, KEXEC_RANGE_MA_VMCOREINFO).
> Address exposed by /sys/kernel/vmcoreinfo is calculated in other way.
> /sys/hypervisor/vmcoreinfo does it correctly (in older implementations
> and in my new upstream implementation which I am going to post shortly).
> 
> > Anyway, let me re-install my test system and send all the necessary
> > information. What kind of log files are you interested in?
> 
> If you spot any error in any logfile which in your opinion
> is relevent to our testes please send me it.

Hi,

is there any consensus on what to do here?

WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@verge.net.au>
To: Daniel Kiper <daniel.kiper@oracle.com>
Cc: kexec@lists.infradead.org, olaf@aepfle.de,
	xen-devel@lists.xensource.com, Petr Tesarik <ptesarik@suse.cz>,
	konrad.wilk@oracle.com
Subject: Re: [PATCH] kexec-tools: Read always one vmcoreinfo file
Date: Thu, 2 Aug 2012 12:06:15 +0900	[thread overview]
Message-ID: <20120802030615.GA20262@verge.net.au> (raw)
In-Reply-To: <20120724135410.GA2230@host-192-168-1-59.local.net-space.pl>

On Tue, Jul 24, 2012 at 03:54:10PM +0200, Daniel Kiper wrote:
> On Tue, Jul 24, 2012 at 10:18:34AM +0200, Petr Tesarik wrote:
> > Dne Po 23. ??ervence 2012 22:10:59 Daniel Kiper napsal(a):
> > > Hi Petr,
> > >
> > > On Mon, Jul 23, 2012 at 03:30:55PM +0200, Petr Tesarik wrote:
> > > > Dne Po 23. ??ervence 2012 14:56:07 Petr Tesarik napsal(a):
> > > > > Dne ??t 5. ??ervence 2012 14:16:35 Daniel Kiper napsal(a):
> > > > > > vmcoreinfo file could exists under /sys/kernel (valid on baremetal
> > > > > > only) and/or under /sys/hypervisor (valid when Xen dom0 is running).
> > > > > > Read only one of them. It means that only one PT_NOTE will be always
> > > > > > created. Remove extra code for second PT_NOTE creation.
> > > > >
> > > > > Hi Daniel,
> > > > >
> > > > > are you absolutely sure this is the right thing to do? IIUC these two
> > > > > VMCORINFO notes are very different. The one from /sys/kernel/vmcoreinfo
> > > > > describes the Dom0 kernel (type 'VMCOREINFO'), while the one from
> > > > > /sys/hypervisor describes the Xen hypervisor (type 'XEN_VMCOREINFO').
> > > > > If you keep only the hypervisor note, then e.g. makedumpfile won't be
> > > > > able to use dumplevel greater than 1, nor will it be able to extract
> > > > > the log buffer.
> > > >
> > > > I've just verified this, and I'm confident we have to keep both notes in
> > > > the dump file. Simon, please revert Daniel's patch to avoid regressions.
> > > >
> > > > I'm attaching a sample VMCOREINFO_XEN and VMCOREINFO to demonstrate the
> > > > difference. Note that the VMCOREINFO_XEN note is actually too big,
> > > > because Xen doesn't bother to maintain the correct note size in the note
> > > > header, so it always spans a complete page minus sizeof(Elf64_Nhdr)...
> > >
> > > [...]
> > >
> > > The problem with /sys/kernel/vmcoreinfo under Xen is that it expose invalid
> > > physical address. It breaks /proc/vmcore in crash kernel. That is why I
> > > proposed that fix. Additionally, /sys/kernel/vmcoreinfo is not available
> > > under Xen Linux Ver. 2.6.18. However, I did not do any makedumpfile tests.
> > > If you discovered any issues with my patch please drop me more details
> > > about your tests (Xen version, Linux Kernel version, makedumpfile version,
> > > command lines, config files, logs, etc.). I will be more then happy to
> > > fix/improve kexec-tools and makedumpfile.
> >
> > Hi Daniel,
> >
> > well, Linux v2.6.18 does not have /sys/kernel/vmcoreinfo, simply because the
> > VMCOREINFO infrastructure was not present in 2.6.18. It was added later with
> 
> Yep.
> 
> > commit fd59d231f81cb02870b9cf15f456a897f3669b4e, which went into 2.6.24.
> 
> Hmmm... As I know 2.6.24 does not support kexec/kdump under Xen dom0. Correct?
> 
> > I tested with the following combinations:
> >
> > * xen-3.3.1 + kernel-xen-2.6.27.54 + kexec-tools-2.0.0 + makedumpfile-1.3.1
> > * xen-4.0.3 + kernel-xen-2.6.32.59 + kexec-tools-2.0.0 + makedumpfile-1.3.1
> > * xen-4.1.2 + kernel-xen-3.0.34 + kexec-tools-2.0.0 + makedumpfile-1.4.0
> >
> > These versions correspond to SLES11-GA, SLES11-SP1 and SLES11-SP2,
> > respectively. All of them work just fine and save both ELF notes into the
> > dump.
> 
> Could you test current kexec-tools development version and
> latest makedumpfile version on latest SLES version?
> 
> > What do you mean by "invalid physical address"? I'm getting the correct
> > physical address under Xen. Obviously, it must be translated to machine
> > addresses if you need them from the secondary kernel.
> 
> Correct vmcoreinfo address should be established by calling
> HYPERVISOR_kexec_op(KEXEC_CMD_kexec_get_range, KEXEC_RANGE_MA_VMCOREINFO).
> Address exposed by /sys/kernel/vmcoreinfo is calculated in other way.
> /sys/hypervisor/vmcoreinfo does it correctly (in older implementations
> and in my new upstream implementation which I am going to post shortly).
> 
> > Anyway, let me re-install my test system and send all the necessary
> > information. What kind of log files are you interested in?
> 
> If you spot any error in any logfile which in your opinion
> is relevent to our testes please send me it.

Hi,

is there any consensus on what to do here?


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

  parent reply	other threads:[~2012-08-02  3:06 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 12:16 [PATCH] kexec-tools: Read always one vmcoreinfo file Daniel Kiper
2012-07-05 12:16 ` Daniel Kiper
     [not found] ` <20120705121635.GA2007-UojuW/CpjwpdUOLzJiIvSsFoITBeLw/klGfBN0aaEZ+lPcVs/6D9LQ@public.gmane.org>
2012-07-06 13:49   ` Simon Horman
2012-07-06 13:49     ` Simon Horman
2012-07-23 12:56   ` Petr Tesarik
2012-07-23 12:56     ` Petr Tesarik
2012-07-23 13:30     ` Petr Tesarik
2012-07-23 13:30       ` Petr Tesarik
     [not found]       ` <201207231530.55871.ptesarik-AlSwsSmVLrQ@public.gmane.org>
2012-07-23 20:10         ` Daniel Kiper
2012-07-23 20:10           ` Daniel Kiper
2012-07-24  8:18           ` Petr Tesarik
2012-07-24  8:18             ` Petr Tesarik
     [not found]             ` <201207241018.35292.ptesarik-AlSwsSmVLrQ@public.gmane.org>
2012-07-24 13:54               ` Daniel Kiper
2012-07-24 13:54                 ` Daniel Kiper
     [not found]                 ` <20120724135410.GA2230-UojuW/CpjwpdUOLzJiIvSsFoITBeLw/klGfBN0aaEZ+lPcVs/6D9LQ@public.gmane.org>
2012-08-02  3:06                   ` Simon Horman [this message]
2012-08-02  3:06                     ` Simon Horman
2014-11-13 15:51                   ` Petr Tesarik
2014-11-13 15:51                     ` Petr Tesarik
     [not found]                     ` <20141113165148.4343b45e-7L324ngwNA8VI8jrpt9EEQ@public.gmane.org>
2014-11-13 17:22                       ` Daniel Kiper
2014-11-13 17:22                         ` Daniel Kiper
     [not found]                         ` <20141113172217.GD6522-fJNZiO034lp9pOct4yEdx/3oZC3j2Omk@public.gmane.org>
2014-11-13 18:14                           ` Petr Tesarik
2014-11-13 18:14                             ` Petr Tesarik
2014-12-19 20:21                       ` Daniel Kiper
2014-12-19 20:21                         ` Daniel Kiper
2012-08-02 13:18 Daniel Kiper
2012-08-02 13:18 ` Daniel Kiper
2012-08-02 13:27 Daniel Kiper
2012-08-02 13:27 ` Daniel Kiper
2012-08-06  8:27 ` Simon Horman
2012-08-06  8:27   ` Simon Horman
2012-08-06  9:32 Daniel Kiper
2012-08-06  9:32 ` Daniel Kiper
2012-09-10 12:06 Daniel Kiper
2012-09-10 12:06 ` Daniel Kiper

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=20120802030615.GA20262@verge.net.au \
    --to=horms-/r6kz+ddxgppr4jqbcensq@public.gmane.org \
    --cc=daniel.kiper-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=olaf-QOLJcTWqO2uzQB+pC5nmwQ@public.gmane.org \
    --cc=ptesarik-AlSwsSmVLrQ@public.gmane.org \
    --cc=xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.