linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: power-off delay/hang due to commit 6d25be57 (mainline)
Date: Wed, 6 May 2020 23:57:13 +0200	[thread overview]
Message-ID: <20200506215713.qoo4enq32ckcjmz7@linutronix.de> (raw)
In-Reply-To: <87bln7ves7.fsf@gmx.net>

On 2020-05-01 17:46:48 [+0200], Stephen Berman wrote:
> I'm experiencing a delay or hang in powering off my computer after `halt
> -d -f -i -p' and I've bisected it to this commit in the mainline tree:

You refer to a normal "poweroff" or is this some kind of "shutdown now"
kind of thing? Unless I'm mistaken, the `halt' command above will turn
off the machine without stopping user tasks (as in "reaching shutdown
level").

…
> The delays have varied in length from ~20 seconds to seeminingly
> indefinitely long (the longest I've waited before pressing the start
> button on the machine is 6 minutes).  With kernels prior to this commit,
> my machine powers off within 4 seconds after the halt invocation.

So you say that normally the machine shuts down immediately but now it
takes 20secs+ if it shuts down at all?

…
>   sr 5:0:0:0: tag#21 timing out command, waited 120s

The CD-drive is polled regularly so it notices when a CD us inserted /
removed. It seems that one of the requests wasn't answered and it ended
up in timeout.

…
> minutes.  But after running emacs in a tty (and then killing it), the
> delay was seemingly indefinite, as it is with my usual workflow with X,
> emacs, firefox, etc. running (but I always kill them before invoking
> `shutdown -h now' from a tty).  During the bisection I tested each
> kernel build by running startx, emacs, firefox, killing these, then
> `shutdown -h now'.  I've attached the git log of the bisection augmented
> with power-off timing notes.  (FWIW, when I reboot the machine with
> `shutdown -r now' there is no delay with the problematic kernels.)

So reboot is not affected, just the halt. Could you please check if the
"poweroff" variant is also affected?

…
> Another pointer I got was to the recent commit 62849a96, which fixes a
> bug due to the commit that causes my problem.  I applied 62849a96 to
> 5.6.4, but it did not prevent the delay/hang.

You should see a warning if you were facing the problem described in the
commit.

…
>                                     Please let me know if there's any
> other information I can provide or anything else I can do to help with
> debugging this issue.  I hope you can fix it.

Can you send dmesg output of the system / lspci -k? I'm mainly
interested what drivers are bound to storage devices (you can send it
offlist if you want).

Can you log the output on the serial console?

If the commit you cited is really the problem then it would mean that a
worker isn't scheduled for some reason. Could you please enable
CONFIG_WQ_WATCHDOG to see if workqueue core code notices that a worker
isn't making progress?

> Thanks,
> Steve Berman

Sebastian

  reply	other threads:[~2020-05-06 21:57 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 15:46 power-off delay/hang due to commit 6d25be57 (mainline) Stephen Berman
2020-05-06 21:57 ` Sebastian Andrzej Siewior [this message]
2020-05-08 21:30   ` Stephen Berman
2020-05-13 22:04     ` Sebastian Andrzej Siewior
2020-05-14 21:39       ` Stephen Berman
2020-05-22 16:40         ` Sebastian Andrzej Siewior
2020-06-09 10:06           ` Stephen Berman
2020-06-09 20:23             ` Sebastian Andrzej Siewior
2020-06-10  8:21               ` Stephen Berman
2020-06-10 10:25                 ` Sebastian Andrzej Siewior
2020-06-10 22:49                   ` Stephen Berman
2020-06-11 15:39                     ` Stephen Berman
2020-06-12 11:01                       ` Sebastian Andrzej Siewior
2020-06-14 12:12                         ` Stephen Berman
2020-06-14 17:10                           ` Sebastian Andrzej Siewior
2020-06-15  7:58                             ` Stephen Berman
2020-06-15 14:51                               ` Sebastian Andrzej Siewior
2020-06-15 15:41                                 ` Stephen Berman
2020-06-15 15:58                                   ` Sebastian Andrzej Siewior
2020-06-15 16:19                                     ` Stephen Berman
2020-06-15 16:32                                       ` Sebastian Andrzej Siewior
2020-06-16  7:14                                 ` Stephen Berman
2020-06-16  7:38                                   ` Sebastian Andrzej Siewior
2020-06-16  8:13                                     ` Stephen Berman
2020-06-16 15:55                                       ` Sebastian Andrzej Siewior
2020-06-16 20:28                                         ` Stephen Berman
2020-06-17 14:27                                           ` Sebastian Andrzej Siewior
2020-06-17 21:09                                             ` Stephen Berman
2020-06-24 20:11                                               ` Sebastian Andrzej Siewior
2020-06-24 21:49                                                 ` Stephen Berman
2020-07-14 13:44                                                   ` Sebastian Andrzej Siewior
2020-07-14 13:54                                                     ` Rafael J. Wysocki
2020-07-14 14:11                                                       ` Sebastian Andrzej Siewior
2020-07-14 15:53                                                         ` Rafael J. Wysocki
2020-07-14 16:10                                                           ` Sebastian Andrzej Siewior
2020-08-11 10:27                                                           ` Sebastian Andrzej Siewior
2020-08-11 14:02                                                             ` Rafael J. Wysocki
2020-07-19 10:07                                                         ` Stephen Berman
2020-08-11 11:58                                                           ` Stephen Berman
2020-08-11 13:29                                                             ` Sebastian Andrzej Siewior
2020-08-11 14:34                                                               ` Rafael J. Wysocki
2020-08-11 15:25                                                                 ` Sebastian Andrzej Siewior
2020-08-11 17:22                                                                   ` Stephen Berman
2020-08-11 18:49                                                                     ` Sebastian Andrzej Siewior
2020-10-06 21:49                                                                       ` Sebastian Andrzej Siewior
2020-10-07 16:18                                                                         ` Rafael J. Wysocki
2020-10-26 17:20                                                                           ` Sebastian Andrzej Siewior
2020-12-02 18:03                                                                             ` Sebastian Andrzej Siewior
2020-12-02 18:31                                                                               ` Rafael J. Wysocki
2020-12-02 19:13                                                                                 ` Rafael J. Wysocki
2020-12-31 20:46                                                                                   ` Rafael J. Wysocki
2021-01-02 11:03                                                                                     ` Rafael J. Wysocki
2021-01-04 15:38                                                                                     ` Stephen Berman
2021-01-24 13:49                                                                                       ` Stephen Berman
2021-01-25 16:25                                                                                         ` Rafael J. Wysocki
2020-06-20 19:08               ` [PATCH] SCSI: Disable CD-ROM poll on shutdown kernel test robot
2020-06-09 21:26             ` power-off delay/hang due to commit 6d25be57 (mainline) Stephen Berman

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=20200506215713.qoo4enq32ckcjmz7@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=stephen.berman@gmx.net \
    --cc=tglx@linutronix.de \
    /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).