Repository navigation
[core][rdt] nixl: follow-ups to #67389 - #67682
Conversation
…d get test Signed-off-by: BatshevaBlack <[email protected]>
…ansfers A finalizer running on the polling thread could release a handle that _finish_transfers was about to check. Handles released during polling are now released after it ends. Signed-off-by: BatshevaBlack <[email protected]>
…the cache lock Garbage collection can run _cleanup_transfer on a thread that holds the remote agent cache lock, where waiting for an agent lock can deadlock with a thread holding that agent lock. While a thread holds the cache lock, _cleanup_transfer now defers to the release of the lock. Signed-off-by: BatshevaBlack <[email protected]>
295236f to
6565cef
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to defer transfer cleanups and handle releases in nixl_tensor_transport.py to prevent deadlocks when garbage collection runs during lock acquisition. It implements a _cache_guard context manager to defer cleanups while holding the cache lock and updates _finish_transfers to defer handle releases during polling. Additionally, a redundant gc.collect() call is removed from the tests. The review feedback correctly identifies potential robustness issues where exceptions raised during deferred cleanups or handle releases within finally blocks could propagate and interrupt subsequent operations, recommending wrapping these calls in try...except blocks.
…agate Run each deferred cleanup and each deferred handle release best effort, logging errors, so one failure does not skip the rest or fail the fetch that triggered them. Signed-off-by: BatshevaBlack <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 93eb780. Configure here.
Sparks0219
left a comment
There was a problem hiding this comment.
Thanks for the quick follow ups! LGTM 🚢

Changes