From: Mel Gorman <mgorman@techsingularity.net>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
linux-rtc@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: Intermittent boot failure after 6492fed7d8c9 (v6.0-rc1)
Date: Mon, 10 Oct 2022 18:45:26 +0100 [thread overview]
Message-ID: <20221010174526.3yi7nziokwwpr63s@techsingularity.net> (raw)
In-Reply-To: <CAJZ5v0j9JyDZupNnQUsTUVv0WapGjK7b5S-4ewZ8-b=HOret2Q@mail.gmail.com>
On Mon, Oct 10, 2022 at 04:47:50PM +0200, Rafael J. Wysocki wrote:
> Hi Mel,
>
> Thanks for the report!
>
> On Mon, Oct 10, 2022 at 4:25 PM Mel Gorman <mgorman@techsingularity.net> wrote:
> >
> > Hi Rafael,
> >
> > I'm seeing intermittent boot failures after 6492fed7d8c9 ("rtc: rtc-cmos:
> > Do not check ACPI_FADT_LOW_POWER_S0") due to a NULL pointer exception
> > early in boot. It fails to boot 5 times after 10 boot attempts and I've
> > only observed it on one machine so far. Either a revert or the patch below
> > fixes it but it's unlikely it is the correct fix.
> >
> > --- drivers/rtc/rtc-cmos.c.orig 2022-10-10 15:11:50.335756567 +0200
> > +++ drivers/rtc/rtc-cmos.c 2022-10-10 15:11:53.211756691 +0200
> > @@ -1209,7 +1209,7 @@
> > * Or else, ACPI SCI is enabled during suspend/resume only,
> > * update rtc irq in that case.
> > */
> > - if (cmos_use_acpi_alarm())
> > + if (cmos_use_acpi_alarm() && cmos)
> > cmos_interrupt(0, (void *)cmos->rtc);
> > else {
> > /* Fix me: can we use cmos_interrupt() here as well? */
>
> It looks like I've exposed a race condition there.
>
> Generally speaking, it is misguided to install an event handler that
> is not ready to handle the event at that time before making sure that
> the event is disabled.
>
> Does the attached patch help?
>
It failed 3/10 times. That's less than the previous 5/10 failures but I
cannot be certain it helped without running a lot more boot tests. The
failure happens in the same function as before.
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2022-10-10 17:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 14:16 Intermittent boot failure after 6492fed7d8c9 (v6.0-rc1) Mel Gorman
2022-10-10 14:47 ` Rafael J. Wysocki
2022-10-10 17:45 ` Mel Gorman [this message]
2022-10-10 18:29 ` Rafael J. Wysocki
2022-10-11 9:20 ` Mel Gorman
2022-12-12 18:24 ` Mathieu Chouquet-Stringer
2022-12-12 18:34 ` Rafael J. Wysocki
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=20221010174526.3yi7nziokwwpr63s@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox