On 08.09.2023 09:52, Martin Matuska wrote:
I digged a little and was able to reproduce the panic without poudriere
with a shell 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
Thank you, Martin. I was able to reproduce the issue with your script
and found the cause.
I first though the issue is triggered by the `cp`, but it appeared to be
triggered by `cat`. It also got copy_file_range() support, but later
than `cp`. That is probably why it slipped through testing. This patch
fixes it for me: https://github.com/openzfs/zfs/pull/15251 .
Mark, could you please try the patch?
--
Alexander Motin