From: NeilBrown <neilb@suse.de>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org,
device-mapper development <dm-devel@redhat.com>
Subject: Re: raid1d crash at boot
Date: Tue, 22 Nov 2011 12:26:57 +1100 [thread overview]
Message-ID: <20111122122657.69b14108@notabene.brown> (raw)
In-Reply-To: <20111122005037.GA7801@rere.qmqm.pl>
[-- Attachment #1: Type: text/plain, Size: 2869 bytes --]
On Tue, 22 Nov 2011 01:50:37 +0100 Michał Mirosław <mirq-linux@rere.qmqm.pl>
wrote:
> On Mon, Nov 21, 2011 at 07:27:45PM +1100, NeilBrown wrote:
> > On Mon, 21 Nov 2011 08:04:30 +0100 James Bottomley
> > <James.Bottomley@HansenPartnership.com> wrote:
> > > On Mon, 2011-11-21 at 12:37 +1100, NeilBrown wrote:
> > > > Thank for the report.
> > > > However as this crash is clearly in the SCSI layer it makes sense to reported
> > > > it to linux-scsi - so I have cc:ed this reply there.
> > > >
> > > > On Sat, 19 Nov 2011 14:41:39 +0100 Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > > > wrote:
> > > > > I get following BUG_ON tripped while booting, before rootfs is mounted by
> > > > > Debian's initrd. This started to happen for kernels since sometime
> > > > > during 3.1-rcX.
> > > > >
> > > > > [ 6.246170] ------------[ cut here ]------------
> > > > > [ 6.246246] kernel BUG at /mnt/src-tmp/jaja/git/qmqm/drivers/scsi/scsi_lib.c:1153!
> > >
> > > I can tell you what it is:
> > >
> > > /*
> > > * Filesystem requests must transfer data.
> > > */
> > > BUG_ON(!req->nr_phys_segments);
> > >
> > > But the fault is in the layer above SCSI. It means something sent a
> > > request with REQ_TYPE_FS but no actual data attached ... this is
> > > supposed to be impossible, hence the bug on.
> >
> > Thanks.... that sounds strangely familiar, but I cannot be sure and google
> > doesn't help.
> >
> > Michał: what are you using on the RAID1 - some filesystem (which one)or swap or something else?
>
> The whole stack is: ext4 over lvm over dm-crypt over md-raid1 over SATA
> drives. The boot doesn't survive to the point where the initrd script asks
> for md-crypt's key password.
>
That gives us lots of room for pointing the finger of blame, doesn't it?
I think it is -> his problem. :-)
From the md part of the stack trace it looks most like a write request. It
could be a retried read, but that is extremely unlike that early in boot.
So presumably it is some sort of zero-length REQ_FLUSH or something like that.
md/raid1 will just pass those unchanged down.
My guess is that ext4 is generating this and something in the stack is
stripping the REQ_FLUSH .... though why it even tries before asking for a
password is beyond me.
Maybe someone of dm-devel can help?
If not we might need to try a debugging patch like this:
diff --git a/block/blk-core.c b/block/blk-core.c
index f43c8a5..59cb2ad 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1560,7 +1560,7 @@ generic_make_request_checks(struct bio *bio)
goto end_io;
}
}
-
+ WARN_ON(((bio->bi_rw & (REQ_FLUSH | REQ_FUA)) && nr_sectors == 0);
if ((bio->bi_rw & REQ_DISCARD) &&
(!blk_queue_discard(q) ||
((bio->bi_rw & REQ_SECURE) &&
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2011-11-22 1:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20111119134139.GA30570@rere.qmqm.pl>
2011-11-21 1:37 ` raid1d crash at boot NeilBrown
2011-11-21 7:04 ` James Bottomley
2011-11-21 8:27 ` NeilBrown
2011-11-22 0:50 ` Michał Mirosław
2011-11-22 1:26 ` NeilBrown [this message]
2011-11-22 12:03 ` Michał Mirosław
2011-11-22 12:10 ` Michał Mirosław
2012-01-07 12:53 ` Michał Mirosław
2012-01-09 1:35 ` NeilBrown
2012-01-09 20:30 ` Michał Mirosław
2012-01-05 21:30 raid 1 bug with write-mostly and administrative failed disk Art -kwaak- van Breemen
2012-01-05 21:39 ` Art -kwaak- van Breemen
2012-01-06 21:41 ` Art -kwaak- van Breemen
2012-01-09 1:34 ` NeilBrown
2012-01-09 13:25 ` Art -kwaak- van Breemen
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=20111122122657.69b14108@notabene.brown \
--to=neilb@suse.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dm-devel@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mirq-linux@rere.qmqm.pl \
/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).