mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: paulmck@kernel.org
Cc: Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>,
	Petr Mladek <pmladek@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-kernel@vger.kernel.org, rcu@vger.kernel.org
Subject: Re: [BUG] workqueues and printk not playing nice since next-20240130
Date: Fri, 02 Feb 2024 18:08:25 +0106	[thread overview]
Message-ID: <87zfwibxzy.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <7b5a386e-2dcf-49f1-a8e9-c46d2a9f8800@paulmck-laptop>

On 2024-02-02, "Paul E. McKenney" <paulmck@kernel.org> wrote:
>> The printk ringbuffer contents would certainly be interesting.
>> 
>> If you build the GDB scripts (CONFIG_GDB_SCRIPTS) then you will have:
>> 
>> (gdb) lx-dmesg
>
> This says no such command even though I do have CONFIG_GDB_SCRIPTS=y
> in my .config.

You actually need to build them as well. The target is "scripts_gdb"

And you probably need to add:

add-auto-load-safe-path /path/to/your/kernel/build/directory

to your .gdbinit

(This is documented in Documentation/dev-tools/gdb-kernel-debugging.rst)

>> As an alternative, you could copy the contents of
>> Documentation/admin-guide/kdump/gdbmacros.txt into your .gdbinit and
>> then will have:
>> 
>> (gdb) dmesg
>
> This one hangs.

:-/ I will look into this.

> On the other hand, next-20240202 doesn't show the problem.  No idea
> what might have changed.  :-/

Did you check the backtrace on all the "threads"? I would expect one of
them has tty in it and is probably deadlocked. There are known problems
that if a WARN or lockdep triggers while holding the port lock, that CPU
will deadlock itself. That has the effect that no output is generated,
but all the other CPUs will run fine. And even printk() calls will
happily store into the ringbuffer because they use trylock for printing
and the deadlocked CPU will be holding the lock.

John

  reply	other threads:[~2024-02-02 17:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-02 13:04 Paul E. McKenney
2024-02-02 14:12 ` John Ogness
2024-02-02 15:58   ` Paul E. McKenney
2024-02-02 17:02     ` John Ogness [this message]
2024-02-02 17:35       ` Paul E. McKenney
2024-02-02 14:26 ` Jonas Oberhauser
2024-02-02 16:35   ` Paul E. McKenney
2024-02-02 16:56     ` Tejun Heo
2024-02-02 17:40       ` Paul E. McKenney
2024-02-05 13:07         ` Petr Mladek
2024-02-05 13:25           ` Sergey Senozhatsky
2024-02-05 17:45             ` Paul E. McKenney
2024-02-05 17:46               ` Tejun Heo
2024-02-05 19:41                 ` Paul E. McKenney
2024-02-05 20:30                   ` Tejun Heo
2024-02-05 21:17                     ` Paul E. McKenney
2024-02-02 14:35 ` Petr Mladek
2024-02-02 16:07   ` Paul E. McKenney

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=87zfwibxzy.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=pmladek@suse.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tj@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

Powered by JetHome