Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Wang Yugui <wangyugui@e16-tech.com>
To: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Cc: Christoph Hellwig <hch@infradead.org>, linux-btrfs@vger.kernel.org
Subject: Re: misc-next and for-next: kernel BUG at fs/btrfs/extent_io.c:2350! during raid5 recovery
Date: Fri, 12 Aug 2022 10:58:15 +0800	[thread overview]
Message-ID: <20220812105814.0B6B.409509F4@e16-tech.com> (raw)
In-Reply-To: <YvK0WPtEVzXwv3p1@hungrycats.org>

Hi,

With a modified script based on this reproducer,
'uncorrectable errors' is easy to reproduce

kernel:
	5.20.0(2022/08/09) + some patches in misc-next
	0*-btrfs-scrub-properly-report-super-block-errors-in-sy.patch
	0*-btrfs-scrub-try-to-fix-super-block-errors.patch
	0*-btrfs-fix-lost-error-handling-when-looking-up-extend.patch

script:
	source ~/xfstests/local.config

	SCRATCH_DEV_ARRAY=($SCRATCH_DEV_POOL)
	umount $SCRATCH_MNT
	set -e
	uname -a

	mkfs.btrfs -f -draid5 -mraid1 ${SCRATCH_DEV_ARRAY[@]}
	mount ${SCRATCH_DEV_ARRAY[0]} $SCRATCH_MNT # -o
	compress=zstd,noatime
	mkdir -p $SCRATCH_MNT/dir1

	/bin/cp -a /usr/hpc-bio $SCRATCH_MNT/dir1/
	sync
	du -sh $SCRATCH_MNT
	cd $SCRATCH_MNT
	while true; do
		find -type f -exec cat {} + > /dev/null
	done &

	for((i=0;i>=0;++i)); do

		sync; sleep 2; sync; sleep 4; sync; sleep 20; # change the
	device to discard in every loop
		j=$(( i % ${#SCRATCH_DEV_ARRAY[@]} ))
		/usr/sbin/blkdiscard -f ${SCRATCH_DEV_ARRAY[$j]} >/dev/null 2>&1

		btrfs scrub start -Bd $SCRATCH_MNT | grep
'summary\|Uncorrectable'
done &
wait

Result:
	'uncorrectable errors' is reported in 2nd loop.

Is this a problem of this test script or btrfs kernel?

Best Regards
Wang Yugui (wangyugui@e16-tech.com)
2022/08/12


> > Any chance you could share a script for your reproducer?
> 
> The simplest reproducer is some variant of:
> 
> 	mkfs.btrfs -draid5 -mraid1 /dev/vdb /dev/vdc /dev/vdd
> 	mount /dev/vdb /mnt -ocompress=zstd,noatime
> 	cd /mnt
> 	cp -a /40gb-test-data .
> 	sync
> 	while true; do
> 		find -type f -exec cat {} + > /dev/null
> 	done &
> 	while true; do
> 		cat /dev/zero > /dev/vdb
> 	done &
> 	while true; do
> 		btrfs scrub start -Bd /mnt
> 	done &
> 	wait
> 
> but it can take a long time to hit a failure with something that gentle.
> I throw on some extra test workload (e.g. lots of rsyncs) to keep the
> page cache full and under memory pressure, which seems to speed up the
> failure rate to once every few hours.





  reply	other threads:[~2022-08-12  2:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09  3:31 misc-next and for-next: kernel BUG at fs/btrfs/extent_io.c:2350! during raid5 recovery Zygo Blaxell
2022-08-09  4:36 ` Qu Wenruo
2022-08-09 19:46   ` Zygo Blaxell
2022-08-10  7:17     ` Qu Wenruo
2022-08-14  4:52     ` Qu Wenruo
2022-08-16  1:01       ` Zygo Blaxell
2022-08-16  1:25         ` Qu Wenruo
2022-08-09  7:35 ` Qu Wenruo
2022-08-09 19:29   ` Zygo Blaxell
2022-08-09 21:50     ` Qu Wenruo
2022-08-10  8:08       ` Goffredo Baroncelli
2022-08-10  8:24         ` Qu Wenruo
2022-08-10  8:45           ` Goffredo Baroncelli
2022-08-10  9:14             ` Qu Wenruo
2022-08-09  8:29 ` Christoph Hellwig
2022-08-09 19:24   ` Zygo Blaxell
2022-08-12  2:58     ` Wang Yugui [this message]
2022-08-12 22:47       ` Wang Yugui
2022-08-13  1:50     ` Qu Wenruo

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=20220812105814.0B6B.409509F4@e16-tech.com \
    --to=wangyugui@e16-tech.com \
    --cc=ce3g8jdj@umail.furryterror.org \
    --cc=hch@infradead.org \
    --cc=linux-btrfs@vger.kernel.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