[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [BUG] Sporadic boot of Xen Kernel 4.12.0, hangs at random EXTInt




On 3/15/2019 2:30 PM, Andrew Cooper wrote:
On 15/03/2019 20:49, Andrew Cooper wrote:
On 15/03/2019 18:35, John L. Poole wrote:
I have a Supermicro Intel Atom based server with UEFI.  I purchased the
server in November 2016 intending to run Xen server.  I was able
to overcome some problem in 2016 with help from the Xen Project and
I was able to load a xen kernel built in Gentoo for Gentoo VMs manually
using the EFI command.  At that time, I was told grub2 was not UEFI
ready.

Now I have been trying to integrate grub2 with Xen using kernel version
4.19.23-gentoo.  I am witnessing boot attempts that fail at different
points just after calls to setup_local_APIC in apic.c. Sometimes I am
successful in loading the Xen Kernel and then everything goes smoothly
loading the DOM0 session.  I can then load the VMs and everything
seems okay.  But most of the time, the boot up hangs in
between calls to the function setup_local_APIC in apic.c.

I had posted to the XEN Users list and had little, if any, response.
I have created two bugs within Gentoo's system, differentiated by
xen kernels:

4.11.1       at  https://bugs.gentoo.org/679826
4.12.0_rc4   at  https://bugs.gentoo.org/680472

What is really vexing is the randomness of results.  For instance, here
a log from this morning of success vs. failures:

9:17 AM 3/15/2019   2   (XEN) [2019-03-15 16:17:33] Adding cpu 2 to
runqueue 0
9:18 AM 3/15/2019   5   (XEN) [2019-03-15 16:18:53] Adding cpu 5 to
runqueue 0
9:19 AM 3/15/2019   SUCCESS!!
after * key in serial port for "diagnostics all", shutdown by watchdog.
9:30 AM 3/15/2019   SUCCESS!!
(XEN) [2019-03-15 16:32:54] Hardware Dom0 shutdown: watchdog rebooting
machine
9:34 AM 3/15/2019   Before 1: (XEN) [2019-03-15 16:34:14] HVM: HAP
page sizes: 4kB, 2MB
9:35 AM 3/15/2019   3
9:36 AM 3/15/2019   4   (XEN) [2019-03-15 16:37:21] Adding cpu 4 to
runqueue 0
9:37 AM 3/15/2019   Before 1: (XEN) [2019-03-15 16:38:33] HVM: HAP
page sizes: 4kB, 2MB
9:39 AM 3/15/2019   SUCCESS!!

My attempt to isolate the failure point has been unsuccessful. I'm
prepared
to patch 4.12.0_rc4 if that will help, my previous attempt in 4.11.1 only
allowed me to conclude that the problem is not within apic.c.
You have a floating serial line, which is simulating you typing characters.

The '*' key is "run all diagnostic keyhandlers", and later it passes an
'R' which instructs Xen to reboot.

The keyhandlers start functioning as soon as we can possibly make them
after enabling interrupts, which is why you see it shortly after
setup_local_APIC()

Right - I've done some trawling through your bug tickets.

Please please please always start with a full and complete serial log showing all of Xen's boot up until the point things go wrong.

Using the log from https://bugs.gentoo.org/679826#c6 , we get the following things:

(XEN) Xen version 4.11.1 (@[unknown]) (x86_64-pc-linux-gnu-gcc (Gentoo 7.3.0-r3 p1.4) 7.3.0) debug=n  Wed Mar  6 19:34:00 PST 2019
(XEN) Latest ChangeSet:

Not directly related to your issue, but something is missing the changeset information in your build, and you typically want to be using a debug build of Xen for investigations like this.

(XEN) Bootloader: GRUB 2.02

but

(XEN) ACPI Error (tbxfroot-0217): A valid RSDP was not found [20070126]

So the first problem is that there aren't any APCI tables to be found.  You're presumably booting in EFI mode, but either Grub hasn't handed the SystemTable/etc to Xen, or Xen wasn't built with an EFI-capable toolchain and isn't capable of receiving them via the extended multiboot2 protocol.  One way or another, this is the root of the problem.

Xen did however find:

(XEN) Intel MultiProcessor Specification v1.4
(XEN)     Virtual Wire compatibility mode.

Which is the pre-APCI standard for multi-processor systems.  This is also why we start masking ExtINT, because that is how such systems were supposed to be set up.  However, it is almost certainly interfering with some kind of BMC activity, probably an SMI.  I don't think it is worth investigating, because it is an obsolete mode these days which the system firmware won't be designed to cope with.


For other areas of interest, I see:

(XEN) Unrecognised CPU model 0x4d - assuming not reptpoline safe

This particular server is Avaton/Rangely which is an Atom based microserver.  It is almost certainly retpoline-safe, because it was only Skylake generation systems which weren't, but I'll try and follow up on this.

Anyway - the root of your problem is that Xen can't find the ACPI tables, which is either going to be a grub or a Xen build misconfiguration.

~Andrew

Thank you, thank you Andrew.  Your analysis is great news.  I'll work with the Xen Team at Gentoo and see what can be determined about the APCI tables.

-John
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.