linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Ryo Takakura <ryotkkr98@gmail.com>, pmladek@suse.com
Cc: ryotkkr98@gmail.com, Jason@zx2c4.com, gregkh@linuxfoundation.org,
	linux-serial@vger.kernel.org, lkp@intel.com,
	oe-lkp@lists.linux.dev, oliver.sang@intel.com
Subject: Re: [linux-next:master] [serial]  b63e6f60ea: BUG:soft_lockup-CPU##stuck_for#s![modprobe:#]
Date: Wed, 30 Apr 2025 17:47:01 +0206	[thread overview]
Message-ID: <84y0vhodwy.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <20250430091520.80111-1-ryotkkr98@gmail.com>

On 2025-04-30, Ryo Takakura <ryotkkr98@gmail.com> wrote:
>>> The touch_nmi_watchdog() resets the softlockup watchdog. It might
>>> hide that the CPU did not schedule for a long time.
>
> To test the above, I run the rslib test using legacy console(without
> the John's series) with the touch_nmi_watchdog()s removed as
> following.
>
> The result is that it triggered the softlockup as expected. So I guess
> we can say that the legacy console was indeed hiding the softlockup
> scenario as suggested by Petr.

Excellent.

>> With the John's series appied, I guess the kthread were running on a
>> cpu other than the one running the rslib test as John said[0], and
>> neither of touch_nmi_watchdog() nor cond_resched() were called that
>> could prevent the softlockup.
>
> To test the above, I removed the touch_nmi_watchdog() mentioned by John[0]
> on top of the John's series with the printing forced to be done on the same
> cpu running the rslib test by marking emergency section(below change applied).
>
> The result is that it triggered the softlockup as expected. Similar to
> the first test, the touch_nmi_watchdog() was preventing the softlockup
> when its marked with emergency section.

Excellent.

> And I believe this implies that the kthread was running on some other cpu
> as stated above as it should also be calling the touch_nmi_watchdog()
> when it does printing.

Agreed.

> If sounds good, I will prepare a fix adding cond_resched() to the
> rslib test later on.

Yes, please add a cond_resched() to the rslib test.

> I tested with Linus' master on x86 qemu. I was able to see the rslib
> tests prone to softlockup and the John's series exaggerating it, same
> as raspberry pi.
>
> But I couldn't see the softlockup go away by marking the emergency
> section around the printk call within the rslib test. Looks like it
> never calls the touch_nmi_watchdog() in wait_for_lsr(). Maybe because
> trasmission gets immediatly completed on qemu board?

qemu does not emulate a baudrate, so indeed transmission completes
immediately. It would need to be tested on real hardware. But I am
certain we found the cause and explanation. Thank you for digging into
this!

John

  reply	other threads:[~2025-04-30 15:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22  2:28 [linux-next:master] [serial] b63e6f60ea: BUG:soft_lockup-CPU##stuck_for#s![modprobe:#] kernel test robot
2025-01-22  8:41 ` John Ogness
2025-01-22  9:37   ` Greg Kroah-Hartman
2025-01-24 16:10 ` Petr Mladek
2025-01-24 16:39   ` Petr Mladek
2025-03-15  3:38   ` Ryo Takakura
2025-03-17  8:45     ` John Ogness
2025-03-17 14:42       ` Ryo Takakura
2025-04-21  3:41         ` Ryo Takakura
2025-04-22 12:15           ` Petr Mladek
2025-04-22 14:03             ` John Ogness
2025-04-24  8:11             ` Ryo Takakura
2025-04-24  9:00               ` John Ogness
2025-04-24 14:13                 ` Ryo Takakura
2025-04-24  9:02               ` Petr Mladek
2025-04-24 14:17                 ` Ryo Takakura
2025-04-30  9:15               ` Ryo Takakura
2025-04-30 15:41                 ` John Ogness [this message]
2025-05-01  4:10                   ` Ryo Takakura
2025-06-16 15:15                     ` Florian Bezdeka
2025-06-18  4:42                       ` John Ogness

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=84y0vhodwy.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=Jason@zx2c4.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=pmladek@suse.com \
    --cc=ryotkkr98@gmail.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;
as well as URLs for NNTP newsgroup(s).