'zfs recv' hangs when receiving from a FreeBSD zfs

Bug #1733230 reported by Patrick Meyer
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Fix Released
Low
Colin Ian King

Bug Description

When creating a pool snapshot on a freenas/freebsd like this:

```
root@freenas:~ # uname -a
FreeBSD freenas.local 11.0-STABLE FreeBSD 11.0-STABLE #0 r321665+25fe8ba8d06(freenas/11.0-stable): Mon Sep 25 06:24:11 UTC 2017 root@gauntlet:/freenas-11-releng/freenas/_BE/objs/freenas-11-releng/freenas/_BE/os/sys/FreeNAS.amd64 amd64
freenas# zpool create tank gptid/62a26be7-cd4a-11e7-927b-0800278dcda9
freenas# dd if=/dev/zero of=/tank/ur.bin bs=64K count=1
freenas# zfs snap tank@example
```

And trying to `zfs send | zfs recv` it to an ubuntu zfs like this:
```
space@ubuntu:~$ apt-cache policy zfsutils-linux
zfsutils-linux:
  Installed: 0.6.5.11-1ubuntu3
  Candidate: 0.6.5.11-1ubuntu3
  Version table:
 *** 0.6.5.11-1ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu artful/main amd64 Packages
        100 /var/lib/dpkg/status
space@ubuntu:~$ lsb_release -rd
Description: Ubuntu 17.10
Release: 17.10

root@ubuntu:~$ ssh root@freenas zfs send tank@example > freenas11.zfssend
root@ubuntu:~# cat ./freenas11.zfssend | zfs recv tank/something
```

The `zfs recv` process burns 100% CPU and hangs forever. I have attached an example freenas11.zfssend file, though it's easily reproduced.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: zfsutils-linux 0.6.5.11-1ubuntu3
ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
Uname: Linux 4.13.0-16-generic x86_64
NonfreeKernelModules: zfs zunicode zavl zcommon znvpair
ApportVersion: 2.20.7-0ubuntu3
Architecture: amd64
Date: Sun Nov 19 22:10:15 2017
ExecutablePath: /sbin/zfs
InstallationDate: Installed on 2017-11-17 (2 days ago)
InstallationMedia: Ubuntu-Server 17.10 "Artful Aardvark" - Release amd64 (20171017.1)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
 TERM=xterm-256color
 PATH=(custom, no user)
SourcePackage: zfs-linux
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Patrick Meyer (herrspace) wrote :
Revision history for this message
Fabian Grünbichler (f-gruenbichler) wrote :

see https://github.com/zfsonlinux/zfs/pull/6616 for the fix in ZFS on Linux 0.7.3 (on the sender side). not yet backported to Open-ZFS, and thus not in FreeBSDs ZFS either.

this is not really a bug in ZFS on the receiver side, it was an accidental break of backwards compatibility.

Revision history for this message
Fabian Grünbichler (f-gruenbichler) wrote :

but, upgrading ZFS to 0.7.x would fix it on the receiving side, so that might be an option for you ;)

Revision history for this message
Patrick Meyer (herrspace) wrote :

Hmm, using an untested Ubuntu ZOL or even building my own ZOL is not really why I want to use Ubuntu ;) I understand that this is a Problem caused by Open-ZFS, you should consider backporting that ZOL patch to make migration to Ubuntu easier though.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zfs-linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Colin Ian King (colin-king) wrote :

@Fabian, do you have any references to the fix than can backported to pre-0.7.5 (pre-Ubuntu Bionic) releases ZFS so I can easily apply/backport these. I'm a little confused of which exact patch(es) are required.

Thanks. Colin.

Changed in zfs-linux (Ubuntu):
importance: Undecided → Low
assignee: nobody → Colin Ian King (colin-king)
status: Confirmed → In Progress
Changed in zfs-linux (Ubuntu):
status: In Progress → Incomplete
Revision history for this message
Colin Ian King (colin-king) wrote :

Ubuntu 17.10 is now end-of-life. However, this is fixed in Ubuntu 18.04 with ZFS 0.7.5, so please consider using this now.

Changed in zfs-linux (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.