Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UCP: handle a case of a null cm on the worker - v1.10.x #6765

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Fixes in ABI backward compatibility for active message protocol
* Add support for DC full-handshake mode (off by default).
* Fixes in Active Messages short reply protocol.
* Fixes for segmentation fault while listening for connections.

## 1.10.0 (March 9, 2021)
### Features:
Expand Down
4 changes: 4 additions & 0 deletions src/ucp/core/ucp_listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ ucp_listen_on_cm(ucp_listener_h listener, const ucp_listener_params_t *params)

for (i = 0; i < num_cms; ++i) {
ucp_cm = &worker->cms[i];
if (ucp_cm->cm == NULL) {
continue;
}

status = uct_listener_create(ucp_cm->cm, addr,
params->sockaddr.addrlen, &uct_params,
&uct_listeners[listener->num_rscs]);
Expand Down
3 changes: 2 additions & 1 deletion src/ucp/wireup/wireup_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ static int ucp_cm_client_try_fallback_cms(ucp_ep_h ep)
ucp_rsc_index_t next_cm_idx = cm_wireup_ep->cm_idx + 1;
uct_worker_cb_id_t prog_id = UCS_CALLBACKQ_ID_NULL;

if (next_cm_idx >= ucp_worker_num_cm_cmpts(worker)) {
if ((next_cm_idx >= ucp_worker_num_cm_cmpts(worker)) ||
(worker->cms[next_cm_idx].cm == NULL)) {
ucs_debug("reached the end of the cms priority list, no cms left to"
" check (sockaddr_cm=%s, cm_idx=%d).",
ucp_context_cm_name(worker->context, cm_wireup_ep->cm_idx),
Expand Down