Project

General

Profile

Bug #9512

zfs remap poolname@snapname coredumps

Added by Ezomori Nozomu over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2018-04-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

Description

Only filesystems and volumes are valid "zfs remap" parameters: when passed a snapshot name zfs_remap_indirects() does not handle the EINVAL returned from libzfs_core, which results in failing an assertion and consequently crashing.

loli@openindiana:~$ uname -a
SunOS openindiana 5.11 master-0-g862ff6d99c i86pc i386 i86pc
loli@openindiana:~$ zpool list testpool
NAME       SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
testpool   112M    86K   112M         -     0%     0%  1.00x  ONLINE  -
loli@openindiana:~$ sudo zfs remap testpool@snap
internal error: Invalid argument
Abort
loli@openindiana:~$ sudo mdb core
Loading modules: [ libumem.so.1 libc.so.1 libtopo.so.1 libavl.so.1 libnvpair.so.1 ld.so.1 ]
> ::obey
No Language H here
> $C     
08047828 libc.so.1`_lwp_kill+0x15(1, 6, 8f, fef47000, fef47000, 80ed4f0)
08047848 libc.so.1`raise+0x2b(6, 0, 8047860, fee8942b, 0, 0)
08047898 libc.so.1`abort+0x10e(8078120, fedafb02, 80ed4f0, 804791c, 80478d8, fedc1000)
080478c8 libzfs.so.1`zfs_verror+0x96(80ed0c8, 818, fedae3df, 804791c, 80ed0c8, feed9b1d)
08047908 libzfs.so.1`zfs_standard_error_fmt+0x1b5(80ed0c8, 16, fedae3df, 8047940)
08047928 libzfs.so.1`zfs_standard_error+0x28(80ed0c8, 16, 8047940, feca0ba4)
08047d48 libzfs.so.1`zfs_remap_indirects+0x65(80ed0c8, 8047eca, 2d, 8047df8)
08047d68 zfs_do_remap+0x4a(2, 8047dfc, 80778e0, 801, 0, 3)
08047db8 main+0x22c(8047dac, fef54328, 8047dec, 8055d1b, 3, 8047df8)
08047dec _start+0x83(3, 8047ec0, 8047ec4, 8047eca, 0, 8047ed8)
> 

Fix is already available in ZFSonLinux repo, https://github.com/zfsonlinux/zfs/commit/b4555c777a0be3c0dba29662d278c57099c60a87.

History

#1

Updated by Electric Monk over 1 year ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 0b2e8253986c5c761129b58cfdac46d204903de1

commit  0b2e8253986c5c761129b58cfdac46d204903de1
Author: loli10K <ezomori.nozomu@gmail.com>
Date:   2018-05-15T22:59:46.000Z

    9512 zfs remap poolname@snapname coredumps
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: John Wren Kennedy <john.kennedy@delphix.com>
    Reviewed by: Sara Hartse <sara.hartse@delphix.com>
    Approved by: Matt Ahrens <mahrens@delphix.com>

Also available in: Atom PDF