ZFS hanging with simultaneous "zfs recv" and "zfs umount -f"

From: Luke Marsden <luke-lists_at_hybrid-logic.co.uk>
Date: Tue, 01 Feb 2011 11:27:59 -0500
Hi FreeBSD-{stable,current,fs},

I've reliably been able to cause the ZFS subsystem to hang under FreeBSD
8.1-RELEASE under the following conditions:

Another server is sending the server an incremental snapshot stream
which is in the process of being received with:

        zfs send -I $OLD $FS_at_$NEW |ssh $HOST zfs recv -uF $FILESYSTEM

On the receiving server, we forcibly unmount the filesystem which is
being received into with:

        zfs umount -f $FILESYSTEM
        
        (the filesystem may or may not actually be mounted)

This causes any ZFS file operation (such as "ls") to hang forever and
when attempting to reboot the machine, it goes down and stops responding
to pings, but then hangs somewhere in the reboot process and needs a
hard power cycle. Unfortunately we don't have a remote console on this
machine.

I understand this is a fairly harsh use case but the ideal behaviour
would be for the zfs recv to emit an error message (if necessary) rather
than rendering the entire machine unusable ;-)

Let me know if you need any further information. I appreciate that
providing a script to reliably reproduce the problem, testing on
-CURRENT and 8.2-PRE, and submitting a bug report will help... I will do
this in due course, but don't have time right now -- just wanted to get
this bug report out there first in case there's an obvious fix.

Thank you for supporting ZFS on FreeBSD!!

-- 
Best Regards,
Luke Marsden
CTO, Hybrid Logic Ltd.

Web: http://www.hybrid-cluster.com/
Hybrid Web Cluster - cloud web hosting

Phone: +441172232002 / +16179496062
Received on Tue Feb 01 2011 - 15:28:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:11 UTC