Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 572820 - sys-fs/zfs 0.6.5.3-r3 "stable" API patches break zfs-backup scripts
Summary: sys-fs/zfs 0.6.5.3-r3 "stable" API patches break zfs-backup scripts
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Richard Yao (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-25 06:12 UTC by James Lee
Modified: 2019-08-18 00:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Lee 2016-01-25 06:12:36 UTC
Patch breaks backup in two ways.  First, this command

  zfs list -t snapshot -H -S creation -o name -d 1 rpool

used to return a sorted list of snapshots of the named dataset, now it returns "cannot open 'rpool': operation not applicable to datasets of this type".

Second, something simple like "zfs send -R rpool@zfs-auto-snap_hourly-2016-01-03-2300" causes a segfault:


Core was generated by `zfs send -R rpool zfs-auto-snap_hourly-2016-01-03-2300'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fa279efe561 in zfs_prop_get_type (prop=prop@entry=4294967295)
    at ../../module/zcommon/zfs_prop.c:592
592     ../../module/zcommon/zfs_prop.c: No such file or directory.
(gdb) bt
#0  0x00007fa279efe561 in zfs_prop_get_type (prop=prop@entry=4294967295)
    at ../../module/zcommon/zfs_prop.c:592
#1  0x00007fa279cb3c76 in send_iterate_prop (zhp=zhp@entry=0x1702860, nv=0x16fe880)
    at libzfs_sendrecv.c:718
#2  0x00007fa279cb3e86 in send_iterate_fs (zhp=zhp@entry=0x1702860, 
    arg=arg@entry=0x7ffc5906cce0) at libzfs_sendrecv.c:776
#3  0x00007fa279cb547a in gather_nvlist (hdl=<optimized out>, 
    fsname=fsname@entry=0x16fa330 "rpool", fromsnap=fromsnap@entry=0x0, 
    tosnap=tosnap@entry=0x7ffc5906f74e "zfs-auto-snap_hourly-2016-01-03-2300", 
    recursive=B_TRUE, nvlp=nvlp@entry=0x7ffc5906cdb0, avlp=0x7ffc5906cdb8)
    at libzfs_sendrecv.c:823
#4  0x00007fa279cb9930 in zfs_send (zhp=zhp@entry=0x16fa320, fromsnap=fromsnap@entry=0x0, 
    tosnap=tosnap@entry=0x7ffc5906f74e "zfs-auto-snap_hourly-2016-01-03-2300", 
    flags=flags@entry=0x7ffc5906d650, outfd=outfd@entry=1, 
    filter_func=filter_func@entry=0x0, cb_arg=0x0, debugnvp=0x0) at libzfs_sendrecv.c:1476
#5  0x0000000000409136 in zfs_do_send (argc=<optimized out>, argv=0x7ffc5906d8f0)
    at zfs_main.c:3844
#6  0x000000000040548c in main (argc=4, argv=0x7ffc5906d8d8) at zfs_main.c:6727


Third (and this is not necessarily related to backups, but a related bug none-the-less), a simple command like "zfs get -r all oldrpool" seems to crash when it encounters a certain property:

...
oldrpool/ROOT/funtoo/portage  rootcontext            none                        default
oldrpool/ROOT/funtoo/portage  relatime               off                         default
oldrpool/ROOT/funtoo/portage  redundant_metadata     all                         default
oldrpool/ROOT/funtoo/portage  overlay                off                         default
zsh: segmentation fault (core dumped)  zfs get -r all oldrpool


That results in a stack trace of:

Core was generated by `zfs get -r all oldrpool'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  nvlist_lookup_common (nvl=0xa4bae0, name=0xa3ba10 "com.sun:auto-snapshot", 
    type=DATA_TYPE_NVLIST, nelem=0x0, data=0x7ffdfcca5ab8)
    at ../../module/nvpair/nvpair.c:1343
1343    ../../module/nvpair/nvpair.c: No such file or directory.
(gdb) bt
#0  nvlist_lookup_common (nvl=0xa4bae0, name=0xa3ba10 "com.sun:auto-snapshot", 
    type=DATA_TYPE_NVLIST, nelem=0x0, data=0x7ffdfcca5ab8)
    at ../../module/nvpair/nvpair.c:1343
#1  0x00007f4b7578534f in nvlist_lookup_common (data=<optimized out>, nelem=0x0, 
    type=DATA_TYPE_NVLIST, name=<optimized out>, nvl=<optimized out>)
    at ../../module/nvpair/nvpair.c:1438
#2  nvlist_lookup_nvlist (nvl=<optimized out>, name=<optimized out>, val=<optimized out>)
    at ../../module/nvpair/nvpair.c:1437
#3  0x0000000000407b1b in get_callback (zhp=0xa49f60, data=0x7ffdfcca7d70)
    at zfs_main.c:1531
#4  0x0000000000405fb9 in zfs_for_each (argc=argc@entry=1, 
    argv=argv@entry=0x7ffdfcca7f38, flags=<optimized out>, 
    types=types@entry=(ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT | ZFS_TYPE_VOLUME), 
    sortcol=<optimized out>, sortcol@entry=0x0, proplist=proplist@entry=0x7ffdfcca7db0, 
    limit=0, callback=0x407840 <get_callback>, data=0x7ffdfcca7d70) at zfs_iter.c:448
#5  0x000000000040b405 in zfs_do_get (argc=1, argv=0x7ffdfcca7f38) at zfs_main.c:1792
#6  0x000000000040548c in main (argc=5, argv=0x7ffdfcca7f18) at zfs_main.c:6727

Reproducible: Always
Comment 1 Georgy Yakovlev archtester gentoo-dev 2019-08-18 00:50:34 UTC
closing this bug, as old versions are gone.