-
Notifications
You must be signed in to change notification settings - Fork 72
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
Lingering .send-#####-1 holds #173
Comments
It doesn't seem to be illumos #3645 (for which we have ZoL's fix around dump_bytes). |
Oddly, the same hold on several other snapshots did not linger:
and my subsequent by-hand zfs release
and finally
|
Hm, after a series of reboots, full exports and full imports, all while the zfs recv receiver is stable, I'm still seeing this. I'll try to provide a reduced test case. |
It is not all send operations that trigger the automatic holds to be in effect; "doall" and "replicate" has to be on for holds to be used. Ie, -I and -R. Then it makes a list of snapshots to hold, and call This uses the (somewhat) new zfs_onexit_ API to setup callbacks when the The setup is done in
Now in It is possible there is some case we missed for the OSX version, but I don't consider it a release-blocker for the next Installer at this moment. |
This persists in master after the 0.6.3 sync. |
Yeah, we think we may know why the holds are not released. Cleanup is currently per-process not per-open-fd, so if it happens that /dev/zfs is opened, opened, closed, closed, only one of the two cleanups is happening, whereas if it were opened, closed, opened, closed, both would happen. This is not straightforward to fix, but we'll probably need to do something like what Apple does with audit_sdevs: |
Evidence for this is in your paste: Notice:
|
Ok, neat. I have a local workaround that cleans up the stale holds, but will happily test proposed fixes. |
and patch that into zfsdev_minor_alloc(), causing a unique minor to be allocated for each open. We then need to create softstate for ctldev so we can differentiate between ctldev and zvol ioctls. Issue #173
A bit more work went into that, you also need to pull SPL. |
I'm seeing stale holds.
(This is in a pipeline zfs send ... | ssh target zfs recv ... where the snapshot in question succeeds
and that whole incremental send succeeded without error -- I am 80% sure, anyway; the recv host has crashed a couple times in the past ocuple ofdays, and I cannot exclude the possibility that this snapshot was in the range of (one or two) incremental send(s) where the recv went away.
Removing the holds by hand correctly activates a defer_destroy
I'm pretty sure this has hit other zfs implementations in the past too, but perhaps O3X's zfs send cleanup has a local bug rather than inheriting this from upstream.
The text was updated successfully, but these errors were encountered: