From: Ming Lei <ming.lei@redhat.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Yi Zhang <yi.zhang@redhat.com>,
linux-nvme@lists.infradead.org, linux-block@vger.kernel.org
Subject: Re: BUG at IP: blk_mq_get_request+0x23e/0x390 on 4.16.0-rc7
Date: Sun, 8 Apr 2018 18:48:08 +0800 [thread overview]
Message-ID: <20180408104801.GC29020@ming.t460p> (raw)
In-Reply-To: <20180408104433.GB29020@ming.t460p>
On Sun, Apr 08, 2018 at 06:44:33PM +0800, Ming Lei wrote:
> On Sun, Apr 08, 2018 at 01:36:27PM +0300, Sagi Grimberg wrote:
> >
> > > Hi Sagi
> > >
> > > Still can reproduce this issue with the change:
> >
> > Thanks for validating Yi,
> >
> > Would it be possible to test the following:
> > --
> > diff --git a/block/blk-mq.c b/block/blk-mq.c
> > index 75336848f7a7..81ced3096433 100644
> > --- a/block/blk-mq.c
> > +++ b/block/blk-mq.c
> > @@ -444,6 +444,10 @@ struct request *blk_mq_alloc_request_hctx(struct
> > request_queue *q,
> > return ERR_PTR(-EXDEV);
> > }
> > cpu = cpumask_first_and(alloc_data.hctx->cpumask, cpu_online_mask);
> > + if (cpu >= nr_cpu_ids) {
> > + pr_warn("no online cpu for hctx %d\n", hctx_idx);
> > + cpu = cpumask_first(alloc_data.hctx->cpumask);
> > + }
> > alloc_data.ctx = __blk_mq_get_ctx(q, cpu);
> >
> > rq = blk_mq_get_request(q, NULL, op, &alloc_data);
> > --
> > ...
> >
> >
> > > [� 153.384977] BUG: unable to handle kernel paging request at
> > > 00003a9ed053bd48
> > > [� 153.393197] IP: blk_mq_get_request+0x23e/0x390
> >
> > Also would it be possible to provide gdb output of:
> >
> > l *(blk_mq_get_request+0x23e)
>
> nvmf_connect_io_queue() is used in this way by asking blk-mq to allocate
> request from one specific hw queue, but there may not be all online CPUs
> mapped to this hw queue.
And the following patchset may fail this kind of allocation and avoid
the kernel oops.
https://marc.info/?l=linux-block&m=152318091025252&w=2
Thanks,
Ming
WARNING: multiple messages have this Message-ID (diff)
From: ming.lei@redhat.com (Ming Lei)
Subject: BUG at IP: blk_mq_get_request+0x23e/0x390 on 4.16.0-rc7
Date: Sun, 8 Apr 2018 18:48:08 +0800 [thread overview]
Message-ID: <20180408104801.GC29020@ming.t460p> (raw)
In-Reply-To: <20180408104433.GB29020@ming.t460p>
On Sun, Apr 08, 2018@06:44:33PM +0800, Ming Lei wrote:
> On Sun, Apr 08, 2018@01:36:27PM +0300, Sagi Grimberg wrote:
> >
> > > Hi Sagi
> > >
> > > Still can reproduce this issue with the change:
> >
> > Thanks for validating Yi,
> >
> > Would it be possible to test the following:
> > --
> > diff --git a/block/blk-mq.c b/block/blk-mq.c
> > index 75336848f7a7..81ced3096433 100644
> > --- a/block/blk-mq.c
> > +++ b/block/blk-mq.c
> > @@ -444,6 +444,10 @@ struct request *blk_mq_alloc_request_hctx(struct
> > request_queue *q,
> > return ERR_PTR(-EXDEV);
> > }
> > cpu = cpumask_first_and(alloc_data.hctx->cpumask, cpu_online_mask);
> > + if (cpu >= nr_cpu_ids) {
> > + pr_warn("no online cpu for hctx %d\n", hctx_idx);
> > + cpu = cpumask_first(alloc_data.hctx->cpumask);
> > + }
> > alloc_data.ctx = __blk_mq_get_ctx(q, cpu);
> >
> > rq = blk_mq_get_request(q, NULL, op, &alloc_data);
> > --
> > ...
> >
> >
> > > [? 153.384977] BUG: unable to handle kernel paging request at
> > > 00003a9ed053bd48
> > > [? 153.393197] IP: blk_mq_get_request+0x23e/0x390
> >
> > Also would it be possible to provide gdb output of:
> >
> > l *(blk_mq_get_request+0x23e)
>
> nvmf_connect_io_queue() is used in this way by asking blk-mq to allocate
> request from one specific hw queue, but there may not be all online CPUs
> mapped to this hw queue.
And the following patchset may fail this kind of allocation and avoid
the kernel oops.
https://marc.info/?l=linux-block&m=152318091025252&w=2
Thanks,
Ming
next prev parent reply other threads:[~2018-04-08 10:48 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1912441239.17517737.1522396297270.JavaMail.zimbra@redhat.com>
2018-03-30 9:32 ` BUG at IP: blk_mq_get_request+0x23e/0x390 on 4.16.0-rc7 Yi Zhang
2018-03-30 9:32 ` Yi Zhang
2018-04-04 13:22 ` Sagi Grimberg
2018-04-04 13:22 ` Sagi Grimberg
2018-04-05 16:35 ` Yi Zhang
2018-04-05 16:35 ` Yi Zhang
2018-04-08 10:36 ` Sagi Grimberg
2018-04-08 10:36 ` Sagi Grimberg
2018-04-08 10:44 ` Ming Lei
2018-04-08 10:44 ` Ming Lei
2018-04-08 10:48 ` Ming Lei [this message]
2018-04-08 10:48 ` Ming Lei
2018-04-08 10:58 ` Sagi Grimberg
2018-04-08 10:58 ` Sagi Grimberg
2018-04-08 11:04 ` Ming Lei
2018-04-08 11:04 ` Ming Lei
2018-04-08 11:53 ` Sagi Grimberg
2018-04-08 11:53 ` Sagi Grimberg
2018-04-08 12:57 ` Ming Lei
2018-04-08 12:57 ` Ming Lei
2018-04-08 13:35 ` Sagi Grimberg
2018-04-08 13:35 ` Sagi Grimberg
2018-04-09 2:47 ` Ming Lei
2018-04-09 2:47 ` Ming Lei
2018-04-09 8:31 ` Sagi Grimberg
2018-04-09 8:31 ` Sagi Grimberg
2018-04-09 8:54 ` Yi Zhang
2018-04-09 8:54 ` Yi Zhang
2018-04-09 9:05 ` Yi Zhang
2018-04-09 9:05 ` Yi Zhang
2018-04-09 9:13 ` Sagi Grimberg
2018-04-09 9:13 ` Sagi Grimberg
2018-04-09 12:15 ` Ming Lei
2018-04-09 12:15 ` Ming Lei
2018-04-11 13:24 ` Sagi Grimberg
2018-04-11 13:24 ` Sagi Grimberg
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=20180408104801.GC29020@ming.t460p \
--to=ming.lei@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=yi.zhang@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.