LKML Archive mirror
 help / color / mirror / Atom feed
From: Sam Sun <samsun1006219@gmail.com>
To: Hillf Danton <hdanton@sina.com>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	axboe@kernel.dk,
	 Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	syzkaller-bugs@googlegroups.com,  xrivendell7@gmail.com
Subject: Re: [Linux kernel bug] INFO: task hung in blk_mq_get_tag
Date: Mon, 13 May 2024 20:57:44 +0800	[thread overview]
Message-ID: <CAEkJfYPxWBfEnuKeCGEsscVTYy8MrNxCJwdbxS=c2-B0H+HfTA@mail.gmail.com> (raw)
In-Reply-To: <20240513105413.2951-1-hdanton@sina.com>

On Mon, May 13, 2024 at 6:54 PM Hillf Danton <hdanton@sina.com> wrote:
>
> On Mon, 13 May 2024 10:38:34 +0800 Sam Sun <samsun1006219@gmail.com>
> > Dear developers and maintainers,
> >
> > We encountered a task hung in function blk_mq_get_tag. It was tested
> > against the latest upstream kernel which was compiled by clang 14.
>
> BTW make it clear if repro is available and if you could test patches
> in reply.
>

Thanks for pointing this out! I am happy to help testing patches. As
for repro, I have a C repro available, but it is too long so that I
attached it to the first email. Should I just paste repro with bug
report?

> Thanks for your report. See if the below low-hang pear is sweet, I
> mean see if it could survive your repro.
>
> --- x/block/blk-mq-tag.c
> +++ y/block/blk-mq-tag.c
> @@ -180,8 +180,10 @@ unsigned int blk_mq_get_tag(struct blk_m
>                 sbitmap_prepare_to_wait(bt, ws, &wait, TASK_UNINTERRUPTIBLE);
>
>                 tag = __blk_mq_get_tag(data, bt);
> -               if (tag != BLK_MQ_NO_TAG)
> +               if (tag != BLK_MQ_NO_TAG) {
> +                       sbitmap_finish_wait(bt, ws, &wait);
>                         break;
> +               }
>
>                 bt_prev = bt;
>                 io_schedule();
> @@ -208,8 +210,6 @@ unsigned int blk_mq_get_tag(struct blk_m
>                 ws = bt_wait_ptr(bt, data->hctx);
>         } while (1);
>
> -       sbitmap_finish_wait(bt, ws, &wait);
> -
>  found_tag:
>         /*
>          * Give up this allocation if the hctx is inactive.  The caller will
> --

I applied this patch and tried using the C repro, but it still crashed
with the same task hang kernel dump log.

Best Regards,
Yue

  reply	other threads:[~2024-05-13 12:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13  2:38 [Linux kernel bug] INFO: task hung in blk_mq_get_tag Sam Sun
2024-05-13 10:54 ` Hillf Danton
2024-05-13 12:57   ` Sam Sun [this message]
2024-05-13 14:16     ` Tetsuo Handa
2024-05-13 14:49       ` Sam Sun
2024-05-13 22:54     ` Hillf Danton
2024-05-14  2:05       ` Sam Sun
2024-05-14  7:39         ` Tetsuo Handa
2024-05-14 10:37         ` Hillf Danton
2024-05-14 12:07           ` Sam Sun
2024-05-14 14:45             ` Tetsuo Handa
2024-05-15 12:46               ` Sam Sun
2024-05-15 13:12                 ` Tetsuo Handa
2024-05-14 22:41             ` Hillf Danton
2024-05-15 10:13               ` Tetsuo Handa

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='CAEkJfYPxWBfEnuKeCGEsscVTYy8MrNxCJwdbxS=c2-B0H+HfTA@mail.gmail.com' \
    --to=samsun1006219@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=hdanton@sina.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=xrivendell7@gmail.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).