Repository navigation
DAOS-19956 bio: fix deadlock of concurrent bio_copy_prep() - #19638
Open
liuxuezhao wants to merge 2 commits into
Open
liuxuezhao wants to merge 2 commits into
liuxuezhao wants to merge 2 commits into
Conversation
bio_copy_prep() held the DMA buffer of the source while waiting for other active IODs to get the buffer of the destination. VOS aggregation runs such copies concurrently, one per container: when their sources hold all the DMA chunks and the buffer cannot grow, they wait for each other forever and block all later I/O of the xstream which needs a DMA buffer. A copy must not yield while it holds only one of its two buffers: prepare the destination first, which doesn't load anything, then the source without waiting nor yielding in between. If the source can't get its buffer, release the destination buffer, wait for an active IOD to complete and start over. Add VOS439, with all the DMA chunks held but the ones for the copies: a copy with one free chunk waits without holding it and completes once there are two; three copies with two free chunks all complete. The fail_loc DAOS_NVME_COPY_YIELD simulates the time to load the source, to interleave the copies as in a server. Signed-off-by: Xuezhao Liu <xuezhao.liu@hpe.com>
|
Ticket title is 'Aurora daos_user: Rebuild is getting stuck when excluded the rank to fix the bad DRAM memory' |
The only caller checks bdb_active_iods > 0 just before the call and nothing yields in between, so the check for no active IOD in copy_wait_iods() can never be true. Replace it with an assertion, the wait relies on an active IOD to be woken up. Signed-off-by: Xuezhao Liu <xuezhao.liu@hpe.com>
NiuYawei
approved these changes
Nov 27, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bio_copy_prep() held the DMA buffer of the source while waiting for other active IODs to get the buffer of the destination. VOS aggregation runs such copies concurrently, one per container: when their sources hold all the DMA chunks and the buffer cannot grow, they wait for each other forever and block all later I/O of the xstream which needs a DMA buffer.
A copy must not yield while it holds only one of its two buffers: prepare the destination first, which doesn't load anything, then the source without waiting nor yielding in between. If the source can't get its buffer, release the destination buffer, wait for an active IOD to complete and start over.
Add VOS439, with all the DMA chunks held but the ones for the copies: a copy with one free chunk waits without holding it and completes once there are two; three copies with two free chunks all complete. The fail_loc DAOS_NVME_COPY_YIELD simulates the time to load the source, to interleave the copies as in a server.
Steps for the author:
After all prior steps are complete: