-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Scrub Passes but rm Panics #4083
Comments
if you still have the backtrace from the panic could you post it in to the bug. |
I don't have it, but it is reproducible. You should be able to gather your own by doing what I described above. Does it not trigger the kernel panic for you? |
@gordan-bobic I haven't had a chance to try yet, but I don't doubt it will. I just thought you might have it handy. Thanks for the reproducer. |
Hi, I just played with this and thought I would post the panic
|
I don't know how you managed to get to this point but i guess it may be possible to delete an xattr (dataset with This file here is expected to have an xattr object 67:
Too bad we already deleted it:
When compiled with
This is reproducible on Illumos too:
I'm no ZFS expert and i may be wrong here (haven't studied all the code yet) but if we batch process xattrs separately from files we could probably force xattr deletes to be in a different txg than the actual file deletes. |
@loli10K thanks for looking in to this and the clear analysis. I also don't see how it's possible to get a pool in to this state. During an unlink the xattr directory object id is removed from the file's SAs and added to the unlinked set in the same transaction. That will prevent us from even being able to get in to this inconsistent state... yet this pool clearly exists. Perhaps it was possible in an earlier version of the code. We did address several issues in this area over the last year. The good news is that it should be fairly straight forward to add some error handling code to cleanly handle this case. An ENOENT error can be treated the same way a file with no xattrs is handled. All other error's could be left as fatal, but while we're here we might as well cleanly unwind the function and return them to the caller. |
Adds a test pool which designed to be a minimal reproducer of openzfs/zfs#4083. The pool contains a single filesystem "tank" with only a file "file2" in it. When we try to delete the file we trigger an assertion in zfs_remove(): this is because the file xattr obj was already deleted. This data discrepancy is not detected by a scrub which completes successfully. Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions. |
broken-fs.zfs-send.zip
The text was updated successfully, but these errors were encountered: