Repository navigation
ZTS: add regression test for #17180 - #18109
Merged
Merged
Conversation
Contributor
Author
original repro, as quiz user program#!/usr/bin/env bash
# QUIZ_KERNEL_VERSION=6.12.44
# QUIZ_MEM=24G
# QUIZ_BLOCKDEV_COUNT=2
# QUIZ_BLOCKDEV_SIZE=5G
set -euvx
free -h
zpool create -o ashift=16 foo /dev/quizb0 /dev/quizb1
zfs create foo/home
dd if=/dev/urandom of=/foo/home/DSC0001.JPG bs=1M count=32
dd if=/dev/urandom of=/foo/home/DSC0002.JPG bs=1M count=32
snap0=$(date -u +\%TZ); zfs snapshot -r foo@$snap0; sleep 1
zfs create foo/photos
cp -av /foo/home/* /foo/photos/
snap1=$(date -u +\%TZ); zfs snapshot -r foo@$snap1; sleep 1
zpool remove -w foo /dev/quizb0
zfs send -Rv foo@$snap1 > /dev/null
dd if=/dev/urandom of=/foo/photos/DSC0002.JPG bs=1M count=33
snap2=$(date -u +\%TZ); zfs snapshot -r foo@$snap2; sleep 1
zfs send -Rv foo@$snap2 > /dev/null
rm -v /foo/home/*
snap3=$(date -u +\%TZ); zfs snapshot -r foo@$snap3; sleep 1
zfs destroy -vn foo/home@$snap0\%$snap2
zfs destroy -v foo/home@$snap0\%$snap2
zfs send -Rv foo@$snap2 > /dev/null || :
zfs send -Rv foo/photos@$snap2 > /dev/null
for i in {3..9}; do dd if=/dev/urandom of=/foo/photos/DSC000$i.JPG bs=1M count=129; done
zpool add foo /dev/quizb0
for i in {0..9}; do dd if=/dev/urandom of=/foo/photos/DSC001$i.JPG bs=1M count=129; done
snap4=$(date -u +\%TZ); zfs snapshot -r foo@$snap4; sleep 1
for i in {1..9}; do dd if=/dev/urandom of=/foo/photos/DSC000$i.JPG.xmp bs=1k count=129; done
for i in {0..9}; do dd if=/dev/urandom of=/foo/photos/DSC001$i.JPG.xmp bs=1k count=129; done
snap5=$(date -u +\%TZ); zfs snapshot -r foo@$snap5; sleep 1
zfs create foo/photos2
cp -av /foo/photos/* /foo/photos2/
snap6=$(date -u +\%TZ); zfs snapshot -r foo@$snap6; sleep 1
zpool remove -w foo /dev/quizb1
zfs create foo/photos/2024
zfs create foo/photos/2025
strace cp -a /foo/photos/DSC000* /foo/photos/2024/
cp -a /foo/photos/DSC001* /foo/photos/2025/
for i in {0..9}; do dd if=/dev/urandom of=/foo/photos/2025/DSC001$i.JPG.xmp bs=1k count=65 conv=notrunc; done
# this one needs a couple of tries, because it initially fails with “out of space”
snap7=$(date -u +\%TZ); while ! zfs snapshot -r foo@$snap7; do sleep 1; done; sleep 1
rm /foo/photos/DSC*
snap8=$(date -u +\%TZ); zfs snapshot -r foo@$snap8; sleep 1
zfs destroy foo/home@\%
zfs destroy -vn foo/photos@$snap1\%$snap7
zfs destroy -v foo/photos@$snap1\%$snap7
zfs send -Rv foo/photos2@$snap8 > /dev/null
zfs send -Rv foo/photos@$snap8 > /dev/null
zfs send -Rv foo@$snap8 > /dev/null || :
zfs snapshot foo/home@$snap8
zfs send -Rv foo@$snap8 > /dev/null
zfs send -Rv foo@$snap8 > /dev/null
zpool add foo /dev/quizb1
zfs destroy -vn foo/photos2 || :
zfs destroy -rvn foo/photos2
zfs destroy -rv foo/photos2
zpool remove -w foo /dev/quizb0
zfs send -Rv foo@$snap8 > /dev/null
zfs create foo/photos2
cp -a /foo/photos/202?/* /foo/photos2
# this one needs a couple of tries, because it initially fails with “out of space”
while ! zfs create foo/photos3; do sleep 1; done
cp -a /foo/photos/202?/* /foo/photos3
zpool add foo /dev/quizb0
zfs create foo/photos4
cp -a /foo/photos/202?/* /foo/photos4
zfs create foo/photos5
cp -a /foo/photos/202?/* /foo/photos5
zfs create foo/photos6
cp -a /foo/photos/202?/* /foo/photos6
snap9=$(date -u +\%TZ); zfs snapshot -r foo@$snap9; sleep 1
for i in {0..9}; do dd if=/dev/urandom of=/foo/photos3/DSC001$i.JPG bs=1M count=33 conv=notrunc; done
for i in {0..9}; do dd if=/dev/urandom of=/foo/photos5/DSC001$i.JPG bs=1M count=33 conv=notrunc; done
snap10=$(date -u +\%TZ); zfs snapshot -r foo@$snap10; sleep 1
zpool remove -w foo /dev/quizb1
for i in {0..9}; do dd if=/dev/urandom of=/foo/photos2/DSC001$i.JPG bs=1M count=33 conv=notrunc; done
for i in {0..9}; do dd if=/dev/urandom of=/foo/photos4/DSC001$i.JPG bs=1M count=33 conv=notrunc; done
snap11=$(date -u +\%TZ); zfs snapshot -r foo@$snap11 || :; sleep 1
zfs destroy -r foo/photos6
zfs destroy -r foo/photos5
zfs destroy -r foo/photos4minimised repro, as quiz user program#!/usr/bin/env bash
# QUIZ_KERNEL_VERSION=6.12.44
# QUIZ_BLOCKDEV_COUNT=2
# QUIZ_BLOCKDEV_SIZE=200M
set -euvx
zpool create foo /dev/quizb0 /dev/quizb1
dd if=/dev/urandom of=/foo/file bs=16M count=2
zpool remove -w foo /dev/quizb1
zfs create foo/d
cp /foo/file /foo/d
dd if=/dev/urandom of=/foo/file bs=16M count=2
zfs destroy -r foo/d |
delan
force-pushed
the
regression-test-for-17180
branch
from
January 4, 2026 12:14
32e6106 to
8ba2869
Compare
adamdmoss
approved these changes
Jan 4, 2026
adamdmoss
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. Glad to have a regression test for this.
behlendorf
reviewed
Jan 5, 2026
behlendorf
left a comment
Contributor
There was a problem hiding this comment.
Thanks for adding a test case for this. Just a couple of comments.
amotin
reviewed
Jan 5, 2026
in openzfs#17180, we fixed an interesting bug that i believe i hit in one of my pools, but as far as i can tell, there was no test for it. this patch adds a regression test for openzfs#17180, minimised from my attempts to reproduce the bug in a way that resembled the history of my pool. Signed-off-by: delan azabani
delan
force-pushed
the
regression-test-for-17180
branch
from
January 6, 2026 02:56
e80efd8 to
b08dbb7
Compare
amotin
approved these changes
Jan 6, 2026
amotin
left a comment
Member
There was a problem hiding this comment.
If you say without the patch this test causes a panic, then I have no objections.
behlendorf
approved these changes
Jan 6, 2026
amotin
pushed a commit
to amotin/zfs
that referenced
this pull request
Jan 29, 2026
In openzfs#17180, we fixed an interesting bug that i believe i hit in one of my pools, but as far as i can tell, there was no test for it. this patch adds a regression test for openzfs#17180, minimised from my attempts to reproduce the bug in a way that resembled the history of my pool. Reviewed-by: Alexander MotinReviewed-by: Brian Behlendorf Reviewed-by: Adam Moss Signed-off-by: delan azabani Closes openzfs#18109
mcmilk
pushed a commit
to mcmilk/zfs
that referenced
this pull request
Jan 31, 2026
In openzfs#17180, we fixed an interesting bug that i believe i hit in one of my pools, but as far as i can tell, there was no test for it. this patch adds a regression test for openzfs#17180, minimised from my attempts to reproduce the bug in a way that resembled the history of my pool. Reviewed-by: Alexander MotinReviewed-by: Brian Behlendorf Reviewed-by: Adam Moss Signed-off-by: delan azabani Closes openzfs#18109
amotin
pushed a commit
to amotin/zfs
that referenced
this pull request
Feb 3, 2026
In openzfs#17180, we fixed an interesting bug that i believe i hit in one of my pools, but as far as i can tell, there was no test for it. this patch adds a regression test for openzfs#17180, minimised from my attempts to reproduce the bug in a way that resembled the history of my pool. Reviewed-by: Alexander MotinReviewed-by: Brian Behlendorf Reviewed-by: Adam Moss Signed-off-by: delan azabani Closes openzfs#18109
lundman
pushed a commit
to openzfsonosx/openzfs-fork
that referenced
this pull request
Feb 5, 2026
In openzfs#17180, we fixed an interesting bug that i believe i hit in one of my pools, but as far as i can tell, there was no test for it. this patch adds a regression test for openzfs#17180, minimised from my attempts to reproduce the bug in a way that resembled the history of my pool. Reviewed-by: Alexander MotinReviewed-by: Brian Behlendorf Reviewed-by: Adam Moss Signed-off-by: delan azabani Closes openzfs#18109
tonyhutter
pushed a commit
that referenced
this pull request
Feb 5, 2026
In #17180, we fixed an interesting bug that i believe i hit in one of my pools, but as far as i can tell, there was no test for it. this patch adds a regression test for #17180, minimised from my attempts to reproduce the bug in a way that resembled the history of my pool. Reviewed-by: Alexander MotinReviewed-by: Brian Behlendorf Reviewed-by: Adam Moss Signed-off-by: delan azabani Closes #18109
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this pull request
Feb 23, 2026
In openzfs#17180, we fixed an interesting bug that i believe i hit in one of my pools, but as far as i can tell, there was no test for it. this patch adds a regression test for openzfs#17180, minimised from my attempts to reproduce the bug in a way that resembled the history of my pool. Reviewed-by: Alexander MotinReviewed-by: Brian Behlendorf Reviewed-by: Adam Moss Signed-off-by: delan azabani Closes openzfs#18109
lundman
pushed a commit
to openzfsonwindows/openzfs
that referenced
this pull request
Feb 23, 2026
In openzfs#17180, we fixed an interesting bug that i believe i hit in one of my pools, but as far as i can tell, there was no test for it. this patch adds a regression test for openzfs#17180, minimised from my attempts to reproduce the bug in a way that resembled the history of my pool. Reviewed-by: Alexander MotinReviewed-by: Brian Behlendorf Reviewed-by: Adam Moss Signed-off-by: delan azabani Closes openzfs#18109
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
Apr 23, 2026
In openzfs#17180, we fixed an interesting bug that i believe i hit in one of my pools, but as far as i can tell, there was no test for it. this patch adds a regression test for openzfs#17180, minimised from my attempts to reproduce the bug in a way that resembled the history of my pool. Reviewed-by: Alexander MotinReviewed-by: Brian Behlendorf Reviewed-by: Adam Moss Signed-off-by: delan azabani Closes openzfs#18109
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this pull request
May 6, 2026
In openzfs#17180, we fixed an interesting bug that i believe i hit in one of my pools, but as far as i can tell, there was no test for it. this patch adds a regression test for openzfs#17180, minimised from my attempts to reproduce the bug in a way that resembled the history of my pool. Reviewed-by: Alexander MotinReviewed-by: Brian Behlendorf Reviewed-by: Adam Moss Signed-off-by: delan azabani Closes openzfs#18109
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
#17180 fixed an interesting bug that i believe i hit in one of my pools, but as far as i can tell, there was no test for it.
Description
this patch adds a regression test for #17180, minimised from my attempts to reproduce the bug in a way that resembled the history of my pool.
How Has This Been Tested?
tested using quiz, on linux 6.12.44 and zfs 2.3.1, with and without #17180 applied. without the patch, it kernel panics every time. with the patch, it passes every time. similarly on the latest zfs, it passes every time, but if the reverse patch is applied, it kernel panics every time.
Types of changes
Checklist:
Signed-off-by.