mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "wakko@animx.eu.org" <wakko@animx.eu.org>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"richard.weinberger@gmail.com" <richard.weinberger@gmail.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: 4.15.14 crash with iscsi target and dvd
Date: Tue, 3 Apr 2018 17:03:24 +0000	[thread overview]
Message-ID: <595a10cfb387e6b2ab4d2053b84fed9b3da9e079.camel@wdc.com> (raw)
In-Reply-To: <20180401182723.GA31755@animx.eu.org>

On Sun, 2018-04-01 at 14:27 -0400, Wakko Warner wrote:
> Wakko Warner wrote:
> > Wakko Warner wrote:
> > > I tested 4.14.32 last night with the same oops.  4.9.91 works fine.
> > > From the initiator, if I do cat /dev/sr1 > /dev/null it works.  If I mount
> > > /dev/sr1 and then do find -type f | xargs cat > /dev/null the target
> > > crashes.  I'm using the builtin iscsi target with pscsi.  I can burn from
> > > the initiator with out problems.  I'll test other kernels between 4.9 and
> > > 4.14.
> > 
> > So I've tested 4.x.y where x one of 10 11 12 14 15 and y is the latest patch
> > (except for 4.15 which was 1 behind)
> > Each of these kernels crash within seconds or immediate of doing find -type
> > f | xargs cat > /dev/null from the initiator.
> 
> I tried 4.10.0.  It doesn't completely lockup the system, but the device
> that was used hangs.  So from the initiator, it's /dev/sr1 and from the
> target it's /dev/sr0.  Attempting to read /dev/sr0 after the oops causes the
> process to hang in D state.

Hello Wakko,

Thank you for having narrowed down this further. I think that you encountered
a regression either in the block layer core or in the SCSI core. Unfortunately
the number of changes between kernel versions v4.9 and v4.10 in these two
subsystems is huge. I see two possible ways forward:
- Either that you perform a bisect to identify the patch that introduced this
  regression. However, I'm not sure whether you are familiar with the bisect
  process.
- Or that you identify the command that triggers this crash such that others
  can reproduce this issue without needing access to your setup.

How about reproducing this crash with the below patch applied on top of
kernel v4.15.x? The additional output sent by this patch to the system log
should allow us to reproduce this issue by submitting the same SCSI command
with sg_raw.

Thanks,

Bart.


Subject: [PATCH] Report commands with no physical segments in the system log

---
 drivers/scsi/scsi_lib.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 6b6a6705f6e5..74a39db57d49 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1093,8 +1093,10 @@ int scsi_init_io(struct scsi_cmnd *cmd)
 	bool is_mq = (rq->mq_ctx != NULL);
 	int error = BLKPREP_KILL;
 
-	if (WARN_ON_ONCE(!blk_rq_nr_phys_segments(rq)))
+	if (WARN_ON_ONCE(!blk_rq_nr_phys_segments(rq))) {
+		scsi_print_command(cmd);
 		goto err_exit;
+	}
 
 	error = scsi_init_sgtable(rq, &cmd->sdb);
 	if (error)

  reply	other threads:[~2018-04-03 17:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-31  1:59 Wakko Warner
2018-03-31 20:59 ` Wakko Warner
2018-03-31 21:08 ` Richard Weinberger
2018-03-31 22:12   ` Wakko Warner
2018-04-01  3:40     ` Bart Van Assche
2018-04-01 11:37       ` Wakko Warner
2018-04-01 15:02         ` Bart Van Assche
2018-04-01 16:24           ` Wakko Warner
2018-04-01 16:51             ` Bart Van Assche
2018-04-01 16:36         ` Wakko Warner
2018-04-01 18:27           ` Wakko Warner
2018-04-03 17:03             ` Bart Van Assche [this message]
2018-04-05  0:26               ` Wakko Warner
2018-04-06  1:46               ` Wakko Warner
2018-04-06  2:06                 ` Wakko Warner
2018-04-06  2:20                   ` Bart Van Assche
2018-04-06 23:42                     ` Wakko Warner
2018-04-07  1:03                     ` Wakko Warner
2018-04-07  2:06                       ` Bart Van Assche
2018-04-07 16:53                     ` Wakko Warner
2018-04-07 17:08                       ` Wakko Warner
2018-04-07 17:09                       ` Bart Van Assche
2018-04-08 16:02                         ` Wakko Warner
2018-04-08 16:15                           ` Wakko Warner
2018-04-09 21:30                           ` Bart Van Assche
2018-04-09 23:34                             ` Ming Lei
2018-04-09 23:43                               ` Wakko Warner
2018-04-09 23:51                                 ` Ming Lei
2018-04-11  0:45                               ` Wakko Warner
2018-04-12  0:52                                 ` Wakko Warner
2018-04-12 10:07                                 ` Ming Lei
2018-04-13  1:43                                   ` Wakko Warner
2018-04-13  1:55                                     ` Ming Lei
2018-04-14 21:34                                       ` Wakko Warner

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=595a10cfb387e6b2ab4d2053b84fed9b3da9e079.camel@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=richard.weinberger@gmail.com \
    --cc=wakko@animx.eu.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

all inboxes | Powered by JetHome®