Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs send/recv - 'invalid backup stream' on multiple receives #386

Closed
dfurphy opened this issue Sep 4, 2011 · 6 comments
Closed

zfs send/recv - 'invalid backup stream' on multiple receives #386

dfurphy opened this issue Sep 4, 2011 · 6 comments
Milestone

Comments

@dfurphy
Copy link

dfurphy commented Sep 4, 2011

Running two or more simultaneous zfs receive operations results in 'invalid backup stream'. A single receive seems to go through without issue, but when a second is run, the first instance errors out with 'cannot receive incremental stream: invalid backup stream' shortly after starting the second instance.

root@testServer:~# zfs send -R testPool/vol1@sshot1 | zfs recv -u testPool/vol1-test
cannot receive new filesystem stream: invalid backup stream

root@testServer:~# zfs send -R testPool/vol2@sshot1 | zfs recv -u testPool/vol2-test
cannot receive: failed to read from stream

@behlendorf
Copy link
Contributor

Interesting, and thanks for the concise test case. Did you happen to try this with OpenIndiana or Solaris Express too? We'll certainly look in to it.

@ghost
Copy link

ghost commented Sep 5, 2011

I can confirm that his bug does not exist in zfs-fuse for linux.

@ghost
Copy link

ghost commented Oct 10, 2011

Gunnar Beutner was able to come up with a patch for this. I tested it on my development device and so far it works exactly as intended. We're doing some more testing later this week; at this point I would consider this ready for official evaluation so that it can be committed and this bug closed. I will post back here if we encounter any problems while we are testing this patch.

https://gunnar-beutner.de/files/0001-Fixed-invalid-resource-re-use-in-file_find.patch

@Rudd-O
Copy link
Contributor

Rudd-O commented Oct 11, 2011

Gunnar gunning bugs down. Hell yeah.

@behlendorf
Copy link
Contributor

Fixed by spl commit openzfs/spl@763b2f3

dajhorn referenced this issue in zfsonlinux/pkg-zfs Oct 12, 2011
File descriptors are a per-process resource. The same descriptor
in different processes can refer to different files. find_file()
incorrectly assumed that file descriptors are globally unique.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes ZFS issue #386
@Rudd-O
Copy link
Contributor

Rudd-O commented Oct 17, 2011

Gunnar, I believe you claim the $ for this one: http://twitter.com/#!/danfuhry/status/123173193564422146

kernelOfTruth pushed a commit to kernelOfTruth/zfs that referenced this issue Mar 1, 2015
The smp_mb__{before,after}_clear_bit functions have been renamed
smp_mb__{before,after}_atomic.  Rather than adding a compatibility
function to handle this the code has been updated to use smp_wmb().

This has the advantage of being a stable functionally equivalent
interface.  On many architectures smp_mb__after_clear_bit() expands
to smp_wmb().  Others might be able to do something slightly more
efficient but this will be safe and correct on all of them.

Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#386
ahrens pushed a commit to ahrens/zfs that referenced this issue Aug 5, 2021
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
sdimitro pushed a commit to sdimitro/zfs that referenced this issue May 23, 2022
If a merge completes when the zettacache is completely empty (no blocks
allocated), we can hit a divide-by-zero in BlockAllocator::flush() when
creating a log message.  This is difficult to hit in practice since we
wouldn't normally initiate a merge if there's nothing allocated.
However, future work will make it possible for this to happen.

This commit avoids the divide-by-zero by incrementing the divisor, which
is typically very large, so the impact on accuracy is negligible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants