From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: Yu Kuai <yukuai1@huaweicloud.com>
Cc: linux-raid@vger.kernel.org, jes@trained-monkey.org,
pmenzel@molgen.mpg.de, logang@deltatee.com, song@kernel.org,
yukuai3@huawei.com, yangerkun@huawei.com
Subject: Re: [PATCH tests 4/5] tests: add a regression test for raid10 deadlock
Date: Wed, 24 May 2023 10:48:28 +0200 [thread overview]
Message-ID: <20230524104828.000070bf@linux.intel.com> (raw)
In-Reply-To: <20230523133900.3149123-5-yukuai1@huaweicloud.com>
On Tue, 23 May 2023 21:38:59 +0800
Yu Kuai <yukuai1@huaweicloud.com> wrote:
> From: Yu Kuai <yukuai3@huawei.com>
>
> The deadlock is described in [1], it's fixed first by [2], however,
> it turns out this commit will trigger other problems[3], hence this
> commit will be reverted and the deadlock is supposed to be fixed by [1].
>
> [1]
> https://lore.kernel.org/linux-raid/20230322064122.2384589-5-yukuai1@huaweicloud.com/
> [2]
> https://lore.kernel.org/linux-raid/20220621031129.24778-1-guoqing.jiang@linux.dev/
> [3]
> https://lore.kernel.org/linux-raid/20230322064122.2384589-2-yukuai1@huaweicloud.com/
>
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> ---
> tests/24raid10deadlock | 85 +++++++++++++++++++++++++++++
> tests/24raid10deadlock.inject_error | 0
> 2 files changed, 85 insertions(+)
> create mode 100644 tests/24raid10deadlock
> create mode 100644 tests/24raid10deadlock.inject_error
>
> diff --git a/tests/24raid10deadlock b/tests/24raid10deadlock
> new file mode 100644
> index 00000000..27869840
> --- /dev/null
> +++ b/tests/24raid10deadlock
> @@ -0,0 +1,85 @@
> +devs="$dev0 $dev1 $dev2 $dev3"
> +runtime=120
> +pid=""
> +
> +set_up_injection()
> +{
> + echo -1 > /sys/kernel/debug/fail_make_request/times
> + echo 1 > /sys/kernel/debug/fail_make_request/probability
> + echo 0 > /sys/kernel/debug/fail_make_request/verbose
> + echo 1 > /sys/block/${1##*/}/make-it-fail
> +}
> +
> +clean_up_injection()
> +{
> + echo 0 > /sys/block/${1##*/}/make-it-fail
> + echo 0 > /sys/kernel/debug/fail_make_request/times
> + echo 0 > /sys/kernel/debug/fail_make_request/probability
> + echo 2 > /sys/kernel/debug/fail_make_request/verbose
> +}
> +
> +test_rdev()
> +{
> + while true; do
> + mdadm -f $md0 $1 &> /dev/null
> + mdadm -r $md0 $1 &> /dev/null
> + mdadm --zero-superblock $1 &> /dev/null
> + mdadm -a $md0 $1 &> /dev/null
> + sleep $2
> + done
> +}
> +
> +test_write_action()
> +{
> + while true; do
> + echo frozen > /sys/block/md0/md/sync_action
> + echo idle > /sys/block/md0/md/sync_action
> + sleep 0.1
> + done
> +}
> +
> +set_up_test()
> +{
> + fio -h &> /dev/null || die "fio not found"
> +
> + # create a simple raid10
> + mdadm -Cv -R -n 4 -l10 $md0 $devs || die "create raid10 failed"
> +}
> +
> +clean_up_test()
> +{
> + clean_up_injection $dev0
> + kill -9 $pid
> + pkill -9 fio
> +
> + sleep 1
> +
> + if ! mdadm -S $md0; then
> + die "can't stop array, deadlock is probably triggered"
> + fi
stop may fail from different reasons I see it as too big to be marker of
"deadlock". I know that --stop still fails because md is unable to clear sysfs
attrs in expected time (or a least it was a problem few years ago). Is there a
better way to check that? I would prefer, different less complicated action to
exclude false positives.
In my IMSM environment I still see that md stop stress test is failing
sporadically (1/100).
Thanks,
Mariusz
next prev parent reply other threads:[~2023-05-24 8:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 13:38 [PATCH tests 0/5] tests: add some regression tests Yu Kuai
2023-05-23 13:38 ` [PATCH tests 1/5] tests: add a new test to check if pluged bio is unlimited for raid10 Yu Kuai
2023-05-24 7:53 ` Mariusz Tkaczyk
2023-05-24 8:26 ` Yu Kuai
2023-05-24 9:00 ` Mariusz Tkaczyk
2023-05-24 9:09 ` Yu Kuai
2023-05-23 13:38 ` [PATCH tests 2/5] tests: add a new test for rdev lifetime Yu Kuai
2023-05-24 8:33 ` Mariusz Tkaczyk
2023-05-24 9:05 ` Yu Kuai
2023-05-24 10:38 ` Mariusz Tkaczyk
2023-05-23 13:38 ` [PATCH tests 3/5] tests: support to skip checking dmesg Yu Kuai
2023-05-24 8:40 ` Mariusz Tkaczyk
2023-05-23 13:38 ` [PATCH tests 4/5] tests: add a regression test for raid10 deadlock Yu Kuai
2023-05-24 8:48 ` Mariusz Tkaczyk [this message]
2023-05-24 9:07 ` Yu Kuai
2023-05-23 13:39 ` [PATCH tests 5/5] tests: add a regression test for raid456 deadlock Yu Kuai
2023-05-24 9:09 ` Mariusz Tkaczyk
2023-05-24 7:56 ` [PATCH tests 0/5] tests: add some regression tests Paul Menzel
2023-05-24 9:11 ` Yu Kuai
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=20230524104828.000070bf@linux.intel.com \
--to=mariusz.tkaczyk@linux.intel.com \
--cc=jes@trained-monkey.org \
--cc=linux-raid@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=pmenzel@molgen.mpg.de \
--cc=song@kernel.org \
--cc=yangerkun@huawei.com \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@huawei.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.