All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Ed Swierk <eswierk@skyportsystems.com>, xen-devel@lists.xensource.com
Subject: Re: Linux 4.4 boot crash on xen 4.5.3 with dom0_mem == max
Date: Tue, 17 May 2016 09:43:00 +0200	[thread overview]
Message-ID: <573ACB84.30607@suse.com> (raw)
In-Reply-To: <1463459324-48332-1-git-send-email-eswierk@skyportsystems.com>

On 17/05/16 06:28, Ed Swierk wrote:
> I'm trying to figure out a crash when booting a Linux 4.4 dom0 on
> a recent stable xen 4.5. I'm capping the dom0 memory by setting
> dom0_mem=18432M,max:18432M on the xen command line, and the kernel
> config has CONFIG_XEN_BALLOON unset.
> 
> The crash seems dependent on the contents of the e820 table; identical
> hardware with a different BIOS version does not crash.
> 
> I instrumented various functions arch/x86/xen/setup.c, and isolated
> the problem to the final call to xen_del_extra_mem() in
> xen_remap_memory(). The BUG_ON(n_pfns > size_r) assertion is triggered
> in the "Start of region" block.

Hmm, weird.

Could you please add some more instrumentation? I'd be interested in all
calls to xen_add_extra_mem() and xen_del_extra_mem() with the parameters
Something like:

printk("%s(%lx, %lx)\n", __func__, start_pfn, n_pfns);

at the beginning of both functions.

This should help in finding the bug.

...

> [    0.000000] Xen: [mem 0x0000000100000000-0x0000000505de9fff] usable
...
> [    0.000000] final xen_del_extra_mem pfn_s=0x480000 len=0x85deb
> [    0.000000] xen_del_extra_mem i=0
> [    0.000000] xen_del_extra_mem i=0 start_r=0x480000 size_r=0x85dea n_pfns=0x85deb
...
> Any idea what is causing the BUG_ON()?

There seems to be an off by one error. n_pfns on the last call is
wrong, IMO.

> (Incidentally, such assertions would be far easier to debug if
> BUG_ON() printed clues like the condition, line number, and filename,
> before crashing.)

Indeed.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-05-17  7:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-17  4:28 Linux 4.4 boot crash on xen 4.5.3 with dom0_mem == max Ed Swierk
2016-05-17  7:43 ` Juergen Gross [this message]
2016-05-17 13:37   ` Ed Swierk
2016-05-17 20:50     ` Ed Swierk
2016-05-18  8:30       ` Juergen Gross
2016-05-18 11:44       ` Juergen Gross
2016-05-18 14:39         ` Ed Swierk
2016-05-18 14:45           ` Juergen Gross

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=573ACB84.30607@suse.com \
    --to=jgross@suse.com \
    --cc=eswierk@skyportsystems.com \
    --cc=xen-devel@lists.xensource.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 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.