From: Igor Pylypiv <ipylypiv@google.com>
To: Damien Le Moal <dlemoal@kernel.org>, Niklas Cassel <cassel@kernel.org>
Cc: linux-ide@vger.kernel.org
Subject: SCSI EH wakeup deadlock from deferred_qc
Date: Wed, 8 Jul 2026 12:36:44 -0700 [thread overview]
Message-ID: <20260708193644.671852-1-ipylypiv@google.com> (raw)
Hi Damien,
I've stumbled upon an issue where SCSI EH didn't run upon command timeout
but ran ~10 or so seconds later. It seems like a recent regression from
the introduction of deffered_qc.
When an active command times out while a non-NCQ command is waiting in
deferred_qc, SCSI EH fails to wake up. Recovery stalls until the deferred
command's own timer expires.
When an NCQ command times out, scsi_timeout() calls scsi_eh_scmd_add(),
incrementing shost->host_failed (1). However, when scsi_eh_wakeup() checks
whether to wake the EH thread, scsi_host_busy(shost) counts 2 active
commands (1 timed-out + 1 in deferred_qc).
Because busy (2) != host_failed (1), scsi_eh_wakeup() refuses to wake
the EH thread, deadlocking error recovery until the deferred command
times out on its own.
Thanks,
Igor
next reply other threads:[~2026-07-08 19:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 19:36 Igor Pylypiv [this message]
2026-07-08 22:54 ` SCSI EH wakeup deadlock from deferred_qc Damien Le Moal
2026-07-08 23:44 ` Damien Le Moal
2026-07-09 1:01 ` Damien Le Moal
2026-07-09 2:24 ` Igor Pylypiv
2026-07-09 3:37 ` Damien Le Moal
2026-07-09 4:36 ` Igor Pylypiv
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=20260708193644.671852-1-ipylypiv@google.com \
--to=ipylypiv@google.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=linux-ide@vger.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