Repository navigation
fix(data_plane): close a failed spill's fd before publishing the failure - #5108
Closed
ZhiyuLi-Nvidia wants to merge 1 commit into
Closed
ZhiyuLi-Nvidia wants to merge 1 commit into
ZhiyuLi-Nvidia wants to merge 1 commit into
Conversation
_spill released the unit lock, then closed the partial file's fd. A thread that saw the failed put (io jobs back to 0, blob gone) could count open fds in between and find one extra, which made test_a_failed_write_fails_the_put_and_frees_the_io_area[bug] flaky in CI (95 == 94). Close the fd while still holding the lock. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Zhiyu Li <[email protected]>
Contributor
Author
|
Superseded by #5150 (commits 0819dc8 and 83c9320): the same fd race, fixed by closing the file outside |
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.
What
In
NixlStorageUnit._spill, close the partial file's fd while still holding the unit lock.Why
_spillreleased the lock and then closed the fd. A thread that saw the failed put (_io_jobsback to 0, blob removed) could count open fds in between and find one extra. That madetests/unit/data_plane/nixl/test_ssd_tier.py::test_a_failed_write_fails_the_put_and_frees_the_io_area[bug]fail intermittently in CI (assert 95 == 94,L0_Unit_Tests_Other). The fd was never leaked, only closed a moment late.Change
nemo_rl/data_plane/nixl_storage_unit.py: move the_close(fd)call inside thewith self._mu:block. One line moved, no other behavior change.Testing
Not run locally (no
rayin the authoring environment); syntax-checked only. CIL0_Unit_Tests_Othercovers the test.Note: this commit was briefly pushed to
mainby mistake and reverted (cef159de0,e568ae411); this PR re-applies it for review.🤖 Generated with Claude Code