sean walmsley
2009-Sep-26 00:28 UTC
[zfs-code] incremental send of top-level zfs FS to a non top-level zfs FS segfaults
keywords: zfs receive incremental segmentation fault 6886002 6696858 The following simple test case segfaults in Sol10 (at least to U7) and Opensolaris up to build b121. The problem does not reproduce in b122. mkfile 64m /Z1 mkfile 64m /Z2 zpool create SRC /Z1 zpool create DST /Z2 zfs create SRC/subfs zfs create DST/subfs touch /SRC/a zfs snapshot -r SRC at A touch /SRC/b zfs snapshot -r SRC at B zfs send -R SRC at A | zfs receive -dFv DST/subfs OK TO HERE zfs send -R -i SRC at A SRC at B | zfs receive -dFv DST/subfs FAILS Note that "top-level to top-level" and "non top-level to non top-level" incrementals both work, it''s just the top-level to non top-level case that doesn''t. We need to do this because we want to incrementally replicate entire pools (more than 1) on one machine to a remote backup machine which has one pool dedicated to these "backups". I filed this as Solaris 10 bug 6886002, but I later found Opensolaris bug 6696858 (fixed in b122) which I think is the same issue. The fix was in libzfs_sendrecv.c as follows: diff b121_libzfs_sendrecv.c b122_libzfs_sendrecv.c 1141a1142> char *s1, *s2;1335a1337,1339> s1 = strrchr(fsname, ''/''); > s2 = strrchr(stream_fsname, ''/''); >1339,1340c1343 < strcmp(strrchr(fsname, ''/''), < strrchr(stream_fsname, ''/'')) != 0) { --->I''m posting this here in the hope that: - others experiencing this problem will find information on it more easily that I did :) - the developers maintaining the ZFS test suite will add this simple test case to prevent regressions in future Now I just have to wait until Sun backports the fix to Sol 10... -- This message posted from opensolaris.org
sean walmsley
2009-Nov-24 19:16 UTC
[zfs-code] incremental send of top-level zfs FS to a non top-level zfs FS segfaults
If you have support, Sun has released the following "Interim Diagnostic Relief (IDR) patches to address this issue on Solaris 10 Update 8: sparc: IDR142977-01 x86: IDR143237-01 No word yet on when these might be released as production patches. -- This message posted from opensolaris.org