Fix segfault in internode PUT operations for libfabric#37
Open
ryanhankins wants to merge 1 commit intoNVIDIA:develfrom
Open
Fix segfault in internode PUT operations for libfabric#37ryanhankins wants to merge 1 commit intoNVIDIA:develfrom
ryanhankins wants to merge 1 commit intoNVIDIA:develfrom
Conversation
Contributor
|
Good catch Ryan! It looks like local_handle is only used for EFA, so maybe it would be cleaner to initialize local_handle=NULL and local_mr=NULL at the top of the function and assign them inside the if statement on line 635. |
Author
|
Arrg, not fixed right, yet. I'll come back to it. |
5269f7f to
160373d
Compare
Author
|
That's better, thanks for reviewing! |
The bug manifested as segfaults inside fi_write() during internode PUT operations when using libfabric. This occurred because the code was attempting to access a NULL local handle for small operations, leading to invalid memory descriptor usage. The issue can be reproduced by running multinode tests with NVSHMEM_REMOTE_TRANSPORT=libfabric, NVSHMEM_BOOTSTRAP=mpi, FI_PROVIDER=cxi, and NVSHMEM_HEAP_KIND=sysmem, such as a test program that performs intranode PUT operations followed by internode PUT operations across multiple nodes. The fix ensures that the local memory descriptor is only set when a valid local handle exists, preventing NULL pointer dereferences.
Author
|
There we go. Thanks for reviewing, @a-szegel |
Author
|
How does this look @a-szegel? Thank you for taking a look. |
Contributor
|
LGTM 👍, Thank you! |
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.
The bug manifested as segfaults inside fi_write() during internode PUT operations when using libfabric. This occurred because the code was attempting to access a NULL local handle for small operations, leading to invalid memory descriptor usage.
The issue can be reproduced by running multinode tests with NVSHMEM_REMOTE_TRANSPORT=libfabric, NVSHMEM_BOOTSTRAP=mpi, FI_PROVIDER=cxi, and NVSHMEM_HEAP_KIND=sysmem, such as a test program that performs internode PUT operations across multiple nodes.
The fix ensures that the local memory descriptor is only set when a valid local handle exists, preventing NULL pointer dereferences.