Actions
Bug #3909
closed"zfs send -D" does not work
Status:
Closed
Priority:
Urgent
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2013-07-25
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
Description
As reported on the zfs@illumos mailing list:
The send completes (if piped to receive, the receive finishes OK), but the sending process hangs. It should be easy to reproduce:
- zfs create zones/one
- zfs snapshot zones/one@test
- zfs send zones/one@test | zfs receive -v zones/two
receiving full stream of zones/one@test into zones/two@test
received 46.3KB stream in 1 seconds (46.3KB/sec) - zfs destroy -r zones/two
- zfs send -D zones/one@test | zfs receive -v zones/two
receiving full stream of zones/one@test into zones/two@test
received 46.3KB stream in 1 seconds (46.3KB/sec)
^C
Hung!
The problem is that zfs_send() is calling pthread_join() before closing the pipe. The workaround of hitting ^C when it's done should work (at least in this simple case). This bug was introduced by the following commit:
Branch: refs/heads/master
Home: https://github.com/illumos/illumos-gate
Commit: a7a845e4bf22fd1b2a284729ccd95c7370a0438c
https://github.com/illumos/illumos-gate/commit/a7a845e4bf22fd1b2a284729ccd95c7370a0438c
Author: Steven Hartland <smh@freebsd.org>
Date: 2013-06-11 (Tue, 11 Jun 2013)
Changed paths:
M usr/src/cmd/ndmpd/ndmp/ndmpd_chkpnt.c
M usr/src/cmd/zfs/zfs_main.c
M usr/src/cmd/zhack/zhack.c
M usr/src/cmd/ztest/ztest.c
M usr/src/lib/libzfs/common/libzfs.h
M usr/src/lib/libzfs/common/libzfs_dataset.c
M usr/src/lib/libzfs/common/libzfs_sendrecv.c
M usr/src/lib/libzfs_core/common/libzfs_core.c
M usr/src/uts/common/fs/zfs/dsl_destroy.c
M usr/src/uts/common/fs/zfs/dsl_pool.c
M usr/src/uts/common/fs/zfs/dsl_userhold.c
M usr/src/uts/common/fs/zfs/sys/dsl_dataset.h
M usr/src/uts/common/fs/zfs/sys/dsl_userhold.h
M usr/src/uts/common/fs/zfs/zfs_ioctl.c
Log Message:
-----------
3740 Poor ZFS send / receive performance due to snapshot hold / release processing
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Christopher Siden <christopher.siden@delphix.com>
Updated by Christopher Siden almost 9 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 36f7455 Author: Steven Hartland <smh@freebsd.org> Date: Mon Jul 29 12:36:31 2013 3909 "zfs send -D" does not work Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Christopher Siden <christopher.siden@delphix.com>
Actions