Re: stalling IO regression since linux 5.12, through 5.18

Ming Lei
2022-08-18T03:25:10Z

On Wed, Aug 17, 2022 at 10:30:39PM -0400, Chris Murphy wrote:
>
>
> On Wed, Aug 17, 2022, at 9:03 PM, Ming Lei wrote:
> > On Wed, Aug 17, 2022 at 12:34:42PM -0400, Chris Murphy wrote:
> >>
> >>
> >> On Wed, Aug 17, 2022, at 11:34 AM, Ming Lei wrote:
> >>
> >> > From the 2nd log of blockdebugfs-all.txt, still not see any in-flight IO on
> >> > request based block devices, but sda is _not_ included in this log, and
> >> > only sdi, sdg and sdf are collected, is that expected?
> >>
> >> While the problem was happening I did
> >>
> >> cd /sys/kernel/debug/block
> >> find . -type f -exec grep -aH . {} \;
> >>
> >> The file has the nodes out of order, but I don't know enough about the interface to see if there are things that are missing, or what it means.
> >>
> >>
> >> > BTW, all request based block devices should be observed in blk-mq debugfs.
> >>
> >> /sys/kernel/debug/block contains
> >>
> >> drwxr-xr-x. 2 root root 0 Aug 17 15:20 md0
> >> drwxr-xr-x. 51 root root 0 Aug 17 15:20 sda
> >> drwxr-xr-x. 51 root root 0 Aug 17 15:20 sdb
> >> drwxr-xr-x. 51 root root 0 Aug 17 15:20 sdc
> >> drwxr-xr-x. 51 root root 0 Aug 17 15:20 sdd
> >> drwxr-xr-x. 51 root root 0 Aug 17 15:20 sde
> >> drwxr-xr-x. 51 root root 0 Aug 17 15:20 sdf
> >> drwxr-xr-x. 51 root root 0 Aug 17 15:20 sdg
> >> drwxr-xr-x. 51 root root 0 Aug 17 15:20 sdh
> >> drwxr-xr-x. 4 root root 0 Aug 17 15:20 sdi
> >> drwxr-xr-x. 2 root root 0 Aug 17 15:20 zram0
> >
> > OK, so lots of devices are missed in your log, and the following command
> > is supposed to work for collecting log from all block device's debugfs:
> >
> > (cd /sys/kernel/debug/block/ && find . -type f -exec grep -aH . {} \;)
>
> OK here it is:
>
> https://drive.google.com/file/d/18nEOx2Ghsqx8uII6nzWpCFuYENHuQd-f/view?usp=sharing

The above log shows that the io stall happens on sdd, where:

1) 616 requests pending from scheduler queue

grep "busy=" blockdebugfs-all2.txt | grep sdd | grep sched | awk -F "=" '{s+=$2} END {print s}'
616

2) 11 requests pending from ./sdd/hctx2/dispatch for more than 300 seconds

Recently we seldom observe io hang from dispatch list, except for the
following two:

https://lore.kernel.org/linux-block/20220803023355.3687360-1-yuyufen@huaweicloud.com/
https://lore.kernel.org/linux-block/20220726122224.1790882-1-yukuai1@huaweicloud.com/

BTW, what is the output of the following log?

(cd /sys/block/sdd/device && find . -type f -exec grep -aH . {} \;)

Also the above log shows that host_tagset_enable support is still
crippled on v5.12, I guess the issue may not be triggered(or pretty hard)
after you update to d97e594c5166 ("blk-mq: Use request queue-wide tags for
tagset-wide sbitmap"), or v5.14.

thanks,
Ming