Regressions List Tracking
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Kalle Valo <kvalo@kernel.org>
Cc: Dave Hansen <dave.hansen@intel.com>,
	Borislav Petkov <bp@alien8.de>,
	 Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	 Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	 "Rafael J. Wysocki" <rafael@kernel.org>,
	x86@kernel.org, linux-pm@vger.kernel.org,
	 linux-kernel@vger.kernel.org, regressions@lists.linux.dev,
	 Jeff Johnson <quic_jjohnson@quicinc.com>
Subject: Re: [regression] suspend stress test stalls within 30 minutes
Date: Fri, 17 May 2024 21:08:40 +0200	[thread overview]
Message-ID: <CAJZ5v0hJnXPMq5cjEs=yPrSU1hpJ3H3cMce8fOGQCripYfbeGQ@mail.gmail.com> (raw)
In-Reply-To: <87eda0cljg.fsf@kernel.org>

On Fri, May 17, 2024 at 8:59 PM Kalle Valo <kvalo@kernel.org> wrote:
>
> Dave Hansen <dave.hansen@intel.com> writes:
>
> > On 5/17/24 11:37, Kalle Valo wrote:
> >> While writing this email I found another way to continue the suspend
> >> after a stall: terminate rtcwake with CTRL-C in the ssh session running
> >> the for loop. That explains why 'sudo shutdown -h now' makes the suspend
> >> go forward, it most likely kills the stalled rtcwake process.
> >
> > Could we try and figure out what rtcwake is doing during its stall?  A
> > couple of ideas:
> >
> > You could strace it to see if it's hung in the kernel:
> >
> >       strace -o strace.log rtcwake ... <args here>
> >
> > You could look at its stack in /proc, like this:
> >
> > # cat /proc/`pidof sleep`/stack
> > [<0>] hrtimer_nanosleep+0xb5/0x190
> > [<0>] common_nsleep+0x44/0x50
> > [<0>] __x64_sys_clock_nanosleep+0xcb/0x140
> > [<0>] do_syscall_64+0x65/0x140
> > [<0>] entry_SYSCALL_64_after_hwframe+0x6e/0x76
> >
> > Or you can use sysrq:
> >
> >       echo t > /proc/sysrq-trigger
> >
> > to get *all* tasks' stacks dumped out to dmesg.
> >
> > I'd probably do all three in that order.
> >
> > Getting a function-graph trace of rtcwake during the stall would also be
> > nice, but that's a lot of data so let's try the easier things first.
>
> I can do all that but most probably not this week. Luckily it's quite
> easy to reproduce the bug, one time I even saw it in the first iteration
> and usually within 15 minutes or so.
>
> And do let me know if there's anything else I should try.

My somewhat educated guess is that pm_notifier_call_chain_robust()
blocks for you, so you can add debug printk()s around the call to this
in suspend_prepare().

It is also possible that pm_prepare_console() does something weird and
your description of the problem indicates that it doesn't get to user
space freezing.

  reply	other threads:[~2024-05-17 19:08 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-11 18:22 [regression] suspend stress test stalls within 30 minutes Kalle Valo
2024-05-11 18:48 ` Borislav Petkov
2024-05-11 18:49   ` Borislav Petkov
2024-05-11 20:26     ` Kalle Valo
2024-05-13 19:58       ` Kalle Valo
2024-05-14 13:17         ` Kalle Valo
2024-05-14 16:05           ` Borislav Petkov
2024-05-14 17:36             ` Pawan Gupta
2024-05-17 17:15             ` Kalle Valo
2024-05-17 17:22               ` Dave Hansen
2024-05-17 18:37                 ` Kalle Valo
2024-05-17 18:48                   ` Dave Hansen
2024-05-17 18:58                     ` Kalle Valo
2024-05-17 19:08                       ` Rafael J. Wysocki [this message]
2024-05-17 19:00                   ` Rafael J. Wysocki
2024-05-22  1:52                     ` Len Brown
2024-05-17 17:26               ` Borislav Petkov
2024-05-17 18:22                 ` Kalle Valo
2024-05-14 16:10           ` Dave Hansen
2024-05-15  7:22             ` Pawan Gupta
2024-05-15  7:44               ` Borislav Petkov
2024-05-15 16:27                 ` Pawan Gupta
2024-05-15 16:47                   ` Kalle Valo
2024-05-16  7:03                     ` Pawan Gupta
2024-05-16 14:25                       ` Pawan Gupta
2024-05-16 14:32                         ` Dave Hansen
2024-05-16 15:41                           ` Pawan Gupta
2024-05-17 17:41                         ` Kalle Valo
2024-05-17 18:31                           ` Pawan Gupta
2024-05-17 17:23                   ` Kalle Valo
2024-05-17 17:19               ` Kalle Valo

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='CAJZ5v0hJnXPMq5cjEs=yPrSU1hpJ3H3cMce8fOGQCripYfbeGQ@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=quic_jjohnson@quicinc.com \
    --cc=regressions@lists.linux.dev \
    --cc=tglx@linutronix.de \
    --cc=x86@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).