RE: [PATCH v2 6/6] x86/mce: Dynamically register default MCE handler

From: Ghannam, Yazen
Date: Thu Jan 09 2020 - 15:40:02 EST


> -----Original Message-----
> From: Borislav Petkov <bp@xxxxxxxxx>
> Sent: Wednesday, January 8, 2020 5:04 AM
> To: Ghannam, Yazen <Yazen.Ghannam@xxxxxxx>
> Cc: Jan H. SchÃnherr <jschoenh@xxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx; linux-edac@xxxxxxxxxxxxxxx; Tony Luck
> <tony.luck@xxxxxxxxx>; Thomas Gleixner <tglx@xxxxxxxxxxxxx>; Ingo Molnar <mingo@xxxxxxxxxx>; H. Peter Anvin <hpa@xxxxxxxxx>;
> x86@xxxxxxxxxx
> Subject: Re: [PATCH v2 6/6] x86/mce: Dynamically register default MCE handler
>
> On Wed, Jan 08, 2020 at 04:24:33AM +0000, Ghannam, Yazen wrote:
> > I've encountered an issue where EDAC didn't load (either due to a
> > bug or missing hardware enablement) and the MCE got swallowed by the
> > mcelog notifier. The mcelog utility wasn't in use, so there was no
> > record of the MCE.
>
> Can you reproduce this using the injector?
>

Yes, I was just able to do it. Here's what I did.

1) Unload EDAC decoder modules.
2) Inject a corrected MCE using mce-inject.
3) Observe "Machine check events logged" message and no other MCE info.
4) Manually load mcelog and find MCE info.

It seems to me that the issue is the mcelog notifier counts toward the number
of notifiers, so the default notifier doesn't print anything.

Of course, this can be avoided if the EDAC modules are loaded, or if mcelog is
disabled in the kernel config, or if rasdaemon is used, etc.

Thanks,
Yazen