Re: main [and, likely, stable/14]: do not set vfs.zfs.bclone_enabled=1 with that zpool feature enabled because it still leads to panics

From: Mark Millard <marklmi_at_yahoo.com>
Date: Fri, 08 Sep 2023 14:49:25 UTC
On Sep 8, 2023, at 06:52, Martin Matuska <mm@FreeBSD.org> wrote:

> I digged a little and was able to reproduce the panic without poudriere with a shell script.
> 
> You may want to increase "repeats".
> The script causes the panic in dmu_buf_hold_array_by_dnode() on my VirtualBox with the cat command on 9th iteration.
> 
> Here is the script:
> 
> #!/bin/sh
> nl='
> '
> sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
> for ac_i in 1 2 3 4 5 6 7; do
>     sed_script="$sed_script$nl$sed_script"
> done
> echo "$sed_script" 2>/dev/null | sed 99q >conftest.sed
> 
> repeats=8
> count=0
> echo -n 0123456789 >"conftest.in"
> while :
> do
>     cat "conftest.in" "conftest.in" >"conftest.tmp"
>     mv "conftest.tmp" "conftest.in"
>     cp "conftest.in" "conftest.nl"
>     echo '' >> "conftest.nl"
>     sed -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
>     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
>     count=$(($count + 1))
>     echo "count: $count"
>     # 10*(2^10) chars as input seems more than enough
>     test $count -gt $repeats && break
> done
> rm -f conftest.in conftest.tmp conftest.nl conftest.out

. . . (history removed) . . .

# uname -apKU
FreeBSD amd64-ZFS 15.0-CURRENT FreeBSD 15.0-CURRENT amd64 1500000 #0 main-n265205-03a7c36ddbc0: Thu Sep  7 03:10:34 UTC 2023     root@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 amd64 1500000 1500000

In my test environment with yesterday's snapshot kernel
in use and with vfs.zfs.bclone_enabled=1 :

# ~/bclone_panic.sh
count: 1
count: 2
count: 3
count: 4
count: 5
count: 6
count: 7
count: 8

then panic: no 9.


===
Mark Millard
marklmi at yahoo.com