[Bug 237517] ZFS parallel mounting sometimes misses mounting intermediate filesystems

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jul 17 03:37:44 UTC 2019


--- Comment #12 from fullermd at over-yonder.net ---
Now, bad news: I upgraded another system from a late-Dec stable/12 to last
night's stable/12, and it also came up broken.  Whee.

But, good news: I've managed to track down how to reproduce it!  It has to do
with having multiple ZFS FS trees mounted on the same point.  This apparently
happened on several of my systems because I have a lot of pool/usr and
pool/usr/local (mounted in the places you'd expect), but also pool/bsd/src and
pool/bsd/obj mounted on /usr/{src,obj}.

So I grabbed the FreeBSD-12.0-STABLE-amd64-20190711-r349903.raw.xz snapshot and
booted it up in bhyve.  I created a separate ~100 meg scratch zvol and also
attached it in, as the backing disk for a test zpool (two -d's to
/usr/share/examples/vmrun.sh) creatively named 'ztst'.

And then worked up the repro script I'm attaching.  Something like half the
time, it "succeeds" in failing.  It seems that the way in which the zfs
create's write stuff out is what causes the variability.  When it shows up the
failure in a run, repeated `service zfs restart`'s will (almost?) always
continue to show the failure, but in runs where everything shows up fine the
first time, they'll continue to show up fine.

With any luck, this should let somebody familiar with the code quickly pinpoint
the cause of the issues.  I assume you can just run the script 'till it fails,
then start instrumenting the crap out of zfs_foreach_mountpoint().

(obviously, you don't want to try running this on a ZFS root system, or Bad
Things will probably happen the first time it runs "zfs unmount -a"!)

An example "broken" run:

# /try2_zfs.sh


Restarted serially:

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-fs mailing list