-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Panic when running 'zpool split' #7856
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not fully clear on what happens if some of the split vdevs have DTLs. Would that mean that some top-level vdevs in the split pool will end-up lacking data for some txgs? Shouldn't we instead check that there are no DTLs and fail if there are any?
We should put this on hold until we investigate a fix for: #7865 |
I need to double-check. 99% this is another issue. |
This fixes the identical problem we are having. |
what is status of this update? |
Ready to be revisited I believe, and in need of reviewers. @ramzec when you get a moment would to mind rebasing this on master. |
@pzakha good question. By my reading of https://github.com/zfsonlinux/zfs/blob/master/module/zfs/spa.c#L6626L6630 Since the split was determined to be safe it does look like the right thing to do is remove the vdev from the other txg's DTL lists. This is the same procedure employed in https://github.com/zfsonlinux/zfs/blob/master/module/zfs/spa.c#L6336L6345 Additionally, we should probably be setting
|
The original issue that I pointed out was addressed in #7881. This does look like a separate problem, and the fix looks reasonable. |
Added missing remove of detachable VDEV from txg's DTL list to avoid use-after-free for the splitted VDEV Signed-off-by: Roman Strashkin <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #7856 +/- ##
==========================================
+ Coverage 78.52% 78.54% +0.02%
==========================================
Files 380 380
Lines 116324 116327 +3
==========================================
+ Hits 91344 91371 +27
+ Misses 24980 24956 -24
Continue to review full report at Codecov.
|
Motivation and Context
#5565
Description
From an available crash-dump I see that the freed VDEV is accessed, because it is on txg's DTL of synced VDEV, because was transferred by vdev_top_transfer(), that was called by vdev_remove_parent(), that was called by vdev_split().
"detach" does the cleanup, but it seems for "split" this cleanup was not implemented.
How Has This Been Tested?
That is difficult to reproduce the issue, but we have a host, where it can be reproduced very simple:
zpool attach >>> wait for resilvering >>> zpool split
Types of changes
Checklist:
Signed-off-by
.