Description
Describe the problem you're observing
$ sudo zfs create -o encryption=on -o keyformat=passphrase testpool/source
Enter passphrase:
Re-enter passphrase:
$ sudo zfs snap testpool/source@base
$ sudo zfs snap testpool/source@s1
$ sudo zfs umount testpool/source
$ sudo zfs send -w testpool/source@base | sudo zfs receive testpool/target
$ sudo zfs send -w -i @base testpool/source@s1 | sudo zfs receive testpool/target
$ sudo zfs destroy testpool/source@s1
$ sudo zfs send -w -i @base testpool/target@s1 | sudo zfs receive testpool/source
$ sudo zfs mount testpool/source
filesystem 'testpool/source' can not be mounted: Input/output error
cannot mount 'testpool/source': Invalid argument
$
With --enable-debug
the example already crashes at the zfs receive testpool/source
. This produces the following kernel log:
[ 2516.835681] VERIFY3(0 == os->os_flags & OBJSET_FLAG_USERACCOUNTING_COMPLETE) failed (0 == 1)
[ 2516.835819] PANIC at dsl_crypt.c:2019:dsl_crypto_recv_raw_objset_check()
[ 2516.835889] Showing stack for process 305588
[ 2516.835897] CPU: 0 PID: 305588 Comm: zfs Tainted: P OE 5.4.0-33-generic #37-Ubuntu
[ 2516.835898] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
[ 2516.835899] Call Trace:
[ 2516.835980] dump_stack+0x6d/0x9a
[ 2516.836043] spl_dumpstack+0x29/0x2b [spl]
[ 2516.836049] spl_panic+0xd4/0xfc [spl]
[ 2516.836425] ? dnode_rele_and_unlock+0x6c/0x150 [zfs]
[ 2516.836468] ? dmu_buf_get_user+0x17/0x30 [zfs]
[ 2516.836474] ? tsd_hash_search.isra.0+0x71/0xa0 [spl]
[ 2516.836480] ? tsd_get+0x49/0x90 [spl]
[ 2516.836535] ? rrn_find+0x29/0x50 [zfs]
[ 2516.836592] ? rrw_held+0x79/0xe0 [zfs]
[ 2516.836602] ? _cond_resched+0x19/0x30
[ 2516.836605] ? mutex_lock+0x13/0x40
[ 2516.836650] ? dmu_objset_from_ds+0xbb/0x280 [zfs]
[ 2516.836699] dsl_crypto_recv_key_check+0x5b4/0x6e0 [zfs]
[ 2516.836755] ? zfs_refcount_add_many+0xab/0x110 [zfs]
[ 2516.836810] dsl_sync_task_common+0x13d/0x2a0 [zfs]
[ 2516.836859] ? dsl_crypto_recv_raw_key_check+0x430/0x430 [zfs]
[ 2516.836907] ? dsl_crypto_recv_raw_key_sync+0x440/0x440 [zfs]
[ 2516.836956] ? dsl_crypto_recv_raw_key_check+0x430/0x430 [zfs]
[ 2516.837004] ? dsl_crypto_recv_raw_key_sync+0x440/0x440 [zfs]
[ 2516.837059] dsl_sync_task+0x1a/0x20 [zfs]
[ 2516.837108] dsl_crypto_recv_raw+0x4f/0x70 [zfs]
[ 2516.837154] dmu_recv_stream+0x22d/0x11c0 [zfs]
[ 2516.837208] ? dsl_sync_task+0x1a/0x20 [zfs]
[ 2516.837271] zfs_ioc_recv_impl+0x90e/0x10e0 [zfs]
[ 2516.837337] zfs_ioc_recv_new+0x2ab/0x330 [zfs]
[ 2516.837342] ? spl_kvmalloc+0xc2/0xd0 [spl]
[ 2516.837347] ? spl_kmem_alloc_impl+0x125/0x130 [spl]
[ 2516.837353] ? spl_vmem_alloc+0x2c/0x60 [spl]
[ 2516.837388] ? nv_alloc_sleep_spl+0x1f/0x30 [znvpair]
[ 2516.837393] ? nv_mem_zalloc.isra.0+0x2f/0x40 [znvpair]
[ 2516.837397] ? nvlist_xalloc.part.0+0x50/0xb0 [znvpair]
[ 2516.837460] zfsdev_ioctl_common+0x43e/0x900 [zfs]
[ 2516.837523] zfsdev_ioctl+0x55/0xe0 [zfs]
[ 2516.837580] do_vfs_ioctl+0x407/0x670
[ 2516.837607] ? do_user_addr_fault+0x216/0x450
[ 2516.837610] ksys_ioctl+0x67/0x90
[ 2516.837611] __x64_sys_ioctl+0x1a/0x20
[ 2516.837625] do_syscall_64+0x57/0x190
[ 2516.837628] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 2516.837635] RIP: 0033:0x7f5ac4ce737b
[ 2516.837638] Code: 0f 1e fa 48 8b 05 15 3b 0d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e5 3a 0d 00 f7 d8 64 89 01 48
[ 2516.837639] RSP: 002b:00007ffe255d0988 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 2516.837645] RAX: ffffffffffffffda RBX: 0000000000005a46 RCX: 00007f5ac4ce737b
[ 2516.837645] RDX: 00007ffe255d09b0 RSI: 0000000000005a46 RDI: 0000000000000005
[ 2516.837646] RBP: 00007ffe255d3fa0 R08: 00005564d654b040 R09: 00007f5ac4dbbd00
[ 2516.837647] R10: 00005564d652a010 R11: 0000000000000246 R12: 00007ffe255d4000
[ 2516.837648] R13: 00007ffe255d09b0 R14: 0000000000005a46 R15: 00005564d6537630