Bug 111221 - btrfs-progs: btrfs send -e option always fails ERROR: unexpected EOF in stream.
Summary: btrfs-progs: btrfs send -e option always fails ERROR: unexpected EOF in stream.
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Josef Bacik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-23 23:41 UTC by Chris Murphy
Modified: 2022-10-04 13:23 UTC (History)
4 users (show)

See Also:
Kernel Version: 4.4.0-1.fc24.x86_64
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Chris Murphy 2016-01-23 23:41:37 UTC
btrfs-progs-4.3.1-1.fc23.x86_64

Summary: Whenever using -e alone to send a sequence of snapshots, it fails with multiple errors:
ERROR: parent determination failed for 0
ERROR: unexpected EOF in stream.


Detail:
It does not matter if -e is used alone with a complete set of related snapshots, i.e.

btrfs send -e testsub.0 testsub.1 testsub.2 testsub.3 testsub.4 | btrfs receive /brick1

Or if the first snapshots is first sent, then subsequent snapshots use -p and -e, such as:

btrfs send testsub.0 | btrfs receive /brick1
btrfs send -p testsub.0 -e testsub.1 testsub.2 testsub.3 testsub.4 | btrfs receive /brick1

Error is the same in both cases:
ERROR: parent determination failed for 0
ERROR: unexpected EOF in stream.


Additional information:

The conventional way to do this works with these snapshots, i.e.

btrfs send testsub.0 | btrfs receive /brick1/
btrfs send -p testsub.0 testsub.1 | btrfs receive /brick1/
btrfs send -p testsub.1 testsub.2 | btrfs receive /brick1/
btrfs send -p testsub.2 testsub.3 | btrfs receive /brick1/
btrfs send -p testsub.3 testsub.4 | btrfs receive /brick1/



Verbose option for send and receive results:

[root@f23s ~]# btrfs send -vvv -e testsub.0 testsub.1 testsub.2 testsub.3 testsub.4 | btrfs receive -vvv /brick1/
At subvol testsub.0
At subvol testsub.0
receiving subvol testsub.0 uuid=76e40d60-3b29-b045-a2d7-909ebdbf46f3, stransid=134474
chown  - uid=0, gid=0
chmod  - mode=0755
utimes 
mkdir o257-134474-0
rename o257-134474-0 -> temp
utimes 
set_xattr temp - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
chown temp - uid=0, gid=0
chmod temp - mode=0755
utimes temp
mkfile o258-134474-0
rename o258-134474-0 -> temp/cockpit-kubernetes-0.91-1.fc23.x86_64.rpm
utimes temp
set_xattr temp/cockpit-kubernetes-0.91-1.fc23.x86_64.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-kubernetes-0.91-1.fc23.x86_64.rpm size=112022
chown temp/cockpit-kubernetes-0.91-1.fc23.x86_64.rpm - uid=0, gid=0
chmod temp/cockpit-kubernetes-0.91-1.fc23.x86_64.rpm - mode=0644
utimes temp/cockpit-kubernetes-0.91-1.fc23.x86_64.rpm
mkfile o259-134474-0
rename o259-134474-0 -> temp/cockpit-ws-0.91-1.fc23.x86_64.rpm
utimes temp
set_xattr temp/cockpit-ws-0.91-1.fc23.x86_64.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-ws-0.91-1.fc23.x86_64.rpm size=453854
chown temp/cockpit-ws-0.91-1.fc23.x86_64.rpm - uid=0, gid=0
chmod temp/cockpit-ws-0.91-1.fc23.x86_64.rpm - mode=0644
utimes temp/cockpit-ws-0.91-1.fc23.x86_64.rpm
mkfile o260-134474-0
rename o260-134474-0 -> temp/cockpit-pcp-0.91-1.fc23.x86_64.rpm
utimes temp
set_xattr temp/cockpit-pcp-0.91-1.fc23.x86_64.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-pcp-0.91-1.fc23.x86_64.rpm size=64270
chown temp/cockpit-pcp-0.91-1.fc23.x86_64.rpm - uid=0, gid=0
chmod temp/cockpit-pcp-0.91-1.fc23.x86_64.rpm - mode=0644
utimes temp/cockpit-pcp-0.91-1.fc23.x86_64.rpm
mkfile o261-134474-0
rename o261-134474-0 -> temp/cockpit-ostree-0.91-1.fc23.x86_64.rpm
utimes temp
set_xattr temp/cockpit-ostree-0.91-1.fc23.x86_64.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-ostree-0.91-1.fc23.x86_64.rpm size=28146
chown temp/cockpit-ostree-0.91-1.fc23.x86_64.rpm - uid=0, gid=0
chmod temp/cockpit-ostree-0.91-1.fc23.x86_64.rpm - mode=0644
utimes temp/cockpit-ostree-0.91-1.fc23.x86_64.rpm
mkfile o262-134474-0
rename o262-134474-0 -> temp/cockpit-docker-0.91-1.fc23.x86_64.rpm
utimes temp
set_xattr temp/cockpit-docker-0.91-1.fc23.x86_64.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-docker-0.91-1.fc23.x86_64.rpm size=45666
chown temp/cockpit-docker-0.91-1.fc23.x86_64.rpm - uid=0, gid=0
chmod temp/cockpit-docker-0.91-1.fc23.x86_64.rpm - mode=0644
utimes temp/cockpit-docker-0.91-1.fc23.x86_64.rpm
mkfile o263-134474-0
rename o263-134474-0 -> temp/cockpit-bridge-0.91-1.fc23.x86_64.rpm
utimes temp
set_xattr temp/cockpit-bridge-0.91-1.fc23.x86_64.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-bridge-0.91-1.fc23.x86_64.rpm size=162666
chown temp/cockpit-bridge-0.91-1.fc23.x86_64.rpm - uid=0, gid=0
chmod temp/cockpit-bridge-0.91-1.fc23.x86_64.rpm - mode=0644
utimes temp/cockpit-bridge-0.91-1.fc23.x86_64.rpm
mkfile o264-134474-0
rename o264-134474-0 -> temp/cockpit-0.91-1.fc23.x86_64.rpm
utimes temp
set_xattr temp/cockpit-0.91-1.fc23.x86_64.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-0.91-1.fc23.x86_64.rpm size=38914
chown temp/cockpit-0.91-1.fc23.x86_64.rpm - uid=0, gid=0
chmod temp/cockpit-0.91-1.fc23.x86_64.rpm - mode=0644
utimes temp/cockpit-0.91-1.fc23.x86_64.rpm
mkfile o265-134474-0
rename o265-134474-0 -> temp/cockpit-doc-0.91-1.fc23.x86_64.rpm
utimes temp
set_xattr temp/cockpit-doc-0.91-1.fc23.x86_64.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-doc-0.91-1.fc23.x86_64.rpm size=82286
chown temp/cockpit-doc-0.91-1.fc23.x86_64.rpm - uid=0, gid=0
chmod temp/cockpit-doc-0.91-1.fc23.x86_64.rpm - mode=0644
utimes temp/cockpit-doc-0.91-1.fc23.x86_64.rpm
mkfile o266-134474-0
rename o266-134474-0 -> temp/cockpit-sosreport-0.91-1.fc23.noarch.rpm
utimes temp
set_xattr temp/cockpit-sosreport-0.91-1.fc23.noarch.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-sosreport-0.91-1.fc23.noarch.rpm size=29510
chown temp/cockpit-sosreport-0.91-1.fc23.noarch.rpm - uid=0, gid=0
chmod temp/cockpit-sosreport-0.91-1.fc23.noarch.rpm - mode=0644
utimes temp/cockpit-sosreport-0.91-1.fc23.noarch.rpm
mkfile o267-134474-0
rename o267-134474-0 -> temp/cockpit-subscriptions-0.91-1.fc23.noarch.rpm
utimes temp
set_xattr temp/cockpit-subscriptions-0.91-1.fc23.noarch.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-subscriptions-0.91-1.fc23.noarch.rpm size=26394
chown temp/cockpit-subscriptions-0.91-1.fc23.noarch.rpm - uid=0, gid=0
chmod temp/cockpit-subscriptions-0.91-1.fc23.noarch.rpm - mode=0644
utimes temp/cockpit-subscriptions-0.91-1.fc23.noarch.rpm
mkfile o268-134474-0
rename o268-134474-0 -> temp/cockpit-storaged-0.91-1.fc23.noarch.rpm
utimes temp
set_xattr temp/cockpit-storaged-0.91-1.fc23.noarch.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-storaged-0.91-1.fc23.noarch.rpm size=44470
chown temp/cockpit-storaged-0.91-1.fc23.noarch.rpm - uid=0, gid=0
chmod temp/cockpit-storaged-0.91-1.fc23.noarch.rpm - mode=0644
utimes temp/cockpit-storaged-0.91-1.fc23.noarch.rpm
mkfile o269-134474-0
rename o269-134474-0 -> temp/cockpit-shell-0.91-1.fc23.noarch.rpm
utimes temp
set_xattr temp/cockpit-shell-0.91-1.fc23.noarch.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-shell-0.91-1.fc23.noarch.rpm size=630666
BTRFS_IOC_SEND returned 0
joining genl thread
At subvol testsub.1
ERROR: parent determination failed for 0
chown temp/cockpit-shell-0.91-1.fc23.noarch.rpm - uid=0, gid=0
chmod temp/cockpit-shell-0.91-1.fc23.noarch.rpm - mode=0644
utimes temp/cockpit-shell-0.91-1.fc23.noarch.rpm
mkfile o270-134474-0
rename o270-134474-0 -> temp/cockpit-networkmanager-0.91-1.fc23.noarch.rpm
utimes temp
set_xattr temp/cockpit-networkmanager-0.91-1.fc23.noarch.rpm - name=security.selinux data_len=38 data=unconfined_u:object_r:admin_home_t:s0
truncate temp/cockpit-networkmanager-0.91-1.fc23.noarch.rpm size=37322
chown temp/cockpit-networkmanager-0.91-1.fc23.noarch.rpm - uid=0, gid=0
chmod temp/cockpit-networkmanager-0.91-1.fc23.noarch.rpm - mode=0644
utimes temp/cockpit-networkmanager-0.91-1.fc23.noarch.rpm
ERROR: unexpected EOF in stream.
Comment 1 Tsutomu Itoh 2016-10-21 03:10:01 UTC
I posted the following patches to Btrfs-ML.

 [PATCH v2 1/3] btrfs-progs: send: remove unnecessary code
 [PATCH 2/3] btrfs-progs: send: fix handling of multiple snapshots (-p option)
 [PATCH 3/3] btrfs-progs: send: fix handling of -c option

If you have test environment, could you apply these patch to btrfs-progs v4.8.1
and test?

Note You need to log in before you can comment on or make changes to this bug.