Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Feb 2021 18:27:17 -0500
From:      Mark Johnston <markj@freebsd.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Matthew Macy <mmacy@freebsd.org>, Alan Somers <asomers@freebsd.org>, FreeBSD Stable ML <stable@freebsd.org>
Subject:   Re: Page fault in _mca_init during startup
Message-ID:  <YByC1ZXP5sNE6aHj@raichu>
In-Reply-To: <YBx8GmXvmLnwFYql@kib.kiev.ua>
References:  <CAOtMX2imwP3x-8LBKGFvMJ%2BjuD%2BsH_02yzs9XvMcCHY=jJs86A@mail.gmail.com> <CAPrugNofKuCZmdkb41j%2Bu%2BX0BPV-cK8WjgrBu7akuD=XezseMw@mail.gmail.com> <YBx8GmXvmLnwFYql@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 05, 2021 at 12:58:34AM +0200, Konstantin Belousov wrote:
> On Thu, Feb 04, 2021 at 01:34:13PM -0800, Matthew Macy wrote:
> > On Thu, Feb 4, 2021 at 1:31 PM Alan Somers <asomers@freebsd.org> wrote:
> > >
> > > After upgrading a machine to FreeBSD, 12.2, it hit the following panic on
> > > its first reboot.  I suspect that a few other servers have hit this too,
> > > but since it happens before swap is mounted there are no core dumps, and
> > > they usually reboot immediately.  The code in question hasn't changed since
> > > 2018.  The panic happened in cmci_monitor at line 930.  Does anybody have
> > > any suggestions for how I could debug further?  I can't readily reproduce
> > > it, and I can't dump core, but I'd like to investigate it any way I can.
> > > The server in question has dual Xeon Gold 6142 CPUs.
> > >
> Try this.
> 
> I think that there is no other dependencies in the startup order, but
> cannot know it for sure.
> 
> commit 19584e3d3e9606d591fa30999b370ed758960e8c
> Author: Konstantin Belousov <kib@FreeBSD.org>
> Date:   Fri Feb 5 00:56:09 2021 +0200
> 
>     x86: init mca before APs are started

APs only call mca_init() after they have been released by the BSP
though, and that happens later in SI_SUB_SMP.

> diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c
> index 03100e77d455..e2bf2673cf69 100644
> --- a/sys/x86/x86/mca.c
> +++ b/sys/x86/x86/mca.c
> @@ -1371,7 +1371,7 @@ mca_init_bsp(void *arg __unused)
>  
>  	mca_init();
>  }
> -SYSINIT(mca_init_bsp, SI_SUB_CPU, SI_ORDER_ANY, mca_init_bsp, NULL);
> +SYSINIT(mca_init_bsp, SI_SUB_CPU, SI_ORDER_SECOND, mca_init_bsp, NULL);
>  
>  /* Called when a machine check exception fires. */
>  void
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YByC1ZXP5sNE6aHj>