public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Andrew Halaney <ahalaney@redhat.com>
Cc: pmladek@suse.com, john.ogness@linutronix.de,
	senozhatsky@chromium.org, debarbos@redhat.com,
	williams@redhat.com, jlelli@redhat.com,
	linux-rt-users@vger.kernel.org
Subject: Re: [BUG] printk/nbcon can use RCU illegally prior to CPU online
Date: Thu, 18 Jul 2024 11:57:04 -0400	[thread overview]
Message-ID: <20240718115704.0cd768bc@rorschach.local.home> (raw)
In-Reply-To: <5x4nejpojrtny37k7l6loewqwuaituq77zc3tkkojvawcuvmml@thwg65fdb3vn>

On Thu, 18 Jul 2024 10:41:25 -0500
Andrew Halaney <ahalaney@redhat.com> wrote:

> Hi,
> 
> Recently I was made aware of an issue when running 6.10.0-rc6-rt11+
> (with a !PREEMPT_RT config, although I'm not sure it matters here).
> 
> Its easy to reproduce, just printk on a CPU that's coming online (I got
> pointed to a real splat, but this suffices to reproduce).

I'm more interested in the real splat. Where was the printk() that
triggered it?

> For example:
> 
>     diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
>     index 0c35207320cb..eb75a7cffe31 100644
>     --- a/arch/x86/kernel/smpboot.c
>     +++ b/arch/x86/kernel/smpboot.c
>     @@ -274,6 +274,10 @@ static void notrace start_secondary(void *unused)
>             cpuhp_ap_sync_alive();
> 
>             cpu_init();
>     +
>     +       /* Let's printk() and see if RCU whines */
>     +       printk(KERN_ERR "RCU, what do you think?!\n");
>     +

prink() is normally OK to use on boot up before SMP starts. That's
because it has nothing to race against. But this is the secondary CPU,
where we are entering SMP. RCU has to be active to use pretty much
anything (printk, tracing, etc).

This is why I'm interested in knowing what the real splat was. It could
be that it is used in an incorrect location.

But if you are just debugging, then you should be safely able to ignore
this.

-- Steve


>             fpu__init_cpu();
>             rcutree_report_cpu_starting(raw_smp_processor_id());
>             x86_cpuinit.early_percpu_clock_init();
> 

  reply	other threads:[~2024-07-18 15:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18 15:41 [BUG] printk/nbcon can use RCU illegally prior to CPU online Andrew Halaney
2024-07-18 15:57 ` Steven Rostedt [this message]
2024-07-18 18:13   ` Andrew Halaney
2024-07-18 19:24     ` Steven Rostedt
2024-07-18 19:34       ` Andrew Halaney
2024-07-18 20:17         ` Steven Rostedt
2024-07-19  7:55     ` John Ogness
2024-07-19 14:09       ` Andrew Halaney
2024-07-19 14:55         ` John Ogness
2024-07-19 15:02           ` Andrew Halaney
2024-07-19  8:26     ` John Ogness
2024-07-19 16:01       ` Andrew Halaney

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=20240718115704.0cd768bc@rorschach.local.home \
    --to=rostedt@goodmis.org \
    --cc=ahalaney@redhat.com \
    --cc=debarbos@redhat.com \
    --cc=jlelli@redhat.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=senozhatsky@chromium.org \
    --cc=williams@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox