You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In osc_ucx_component.c, ompi_osc_ucx_win_attach function : when adding new memory zone attachment to window, the reference counter is not correctly initialized to zero, leading in some case, to take the value of reference counter of an other memory zone previously attached. The code lines doing it (from lines 1042, ompi/mca/osc/ucx/osc_ucx_component.c ) :
Concretely, when inserting a new memory zone in "module->local_dynamic_win_info" array at insert_index, a copy is made from (insert_index : OMPI_OSC_UCX_ATTACH_MAX -2) to (insert_index+1 : OMPI_OSC_UCX_ATTACH_MAX -1), which is correct, but the new entry created at insert_index is not correctly reinitialized for "refcnt" data member of local_dynamic_win_info structure.
A possible fix (and that seems to work well) would be to set refcnt to 0 after moving memory :
This bug may lead to not correctly detach the memory zone, since the refcnt is not reaching 0 as it might, which could make issue when attempting to attach new memory zone to window.
The text was updated successfully, but these errors were encountered:
Background information
What version of Open MPI are you using? (e.g., v4.1.6, v5.0.1, git branch name and hash, etc.)
v5.0.5 head, (0b7c77c)
Details of the problem
In osc_ucx_component.c, ompi_osc_ucx_win_attach function : when adding new memory zone attachment to window, the reference counter is not correctly initialized to zero, leading in some case, to take the value of reference counter of an other memory zone previously attached. The code lines doing it (from lines 1042, ompi/mca/osc/ucx/osc_ucx_component.c ) :
Concretely, when inserting a new memory zone in "module->local_dynamic_win_info" array at insert_index, a copy is made from (insert_index : OMPI_OSC_UCX_ATTACH_MAX -2) to (insert_index+1 : OMPI_OSC_UCX_ATTACH_MAX -1), which is correct, but the new entry created at insert_index is not correctly reinitialized for "refcnt" data member of local_dynamic_win_info structure.
A possible fix (and that seems to work well) would be to set refcnt to 0 after moving memory :
This bug may lead to not correctly detach the memory zone, since the refcnt is not reaching 0 as it might, which could make issue when attempting to attach new memory zone to window.
The text was updated successfully, but these errors were encountered: