openucx / ucx

Unified Communication X (mailing list - https://elist.ornl.gov/mailman/listinfo/ucx-group)
http://www.openucx.org
Other
1.11k stars 417 forks source link

Is this state exists such as a conn request has reached but the listener's conn call back function has not been called ? #6991

Closed h2cw2l closed 3 years ago

h2cw2l commented 3 years ago

Hello, ucx team, My doubt is described as the title. Is this condition exists ? If it exists, how can I process this conn request before I destroy listener ?

As I test, I think this condition exists, have you ever met this condition ?

params.field_mask         = UCP_LISTENER_PARAM_FIELD_SOCK_ADDR |
                                          UCP_LISTENER_PARAM_FIELD_CONN_HANDLER;
params.sockaddr.addr      = addr;
params.sockaddr.addrlen   = sizeof(struct sockaddr);
params.conn_handler.cb    = c**bnet_server_cb**;
params.conn_handler.arg   = (void*)psrv;
status = ucp_listener_create(worker->ucp_worker, &params, &psrv->ucp_listener);
yosefe commented 3 years ago

if a conn request is reached but listener is destroyed in same time, it will be rejected and dropped internally, see https://github.com/openucx/ucx/blob/ef4150e61a71156427a5edafafd02271b17ece57/src/ucp/core/ucp_listener.c#L362

h2cw2l commented 3 years ago

if a conn request is reached but listener is destroyed in same time, it will be rejected and dropped internally, see

https://github.com/openucx/ucx/blob/ef4150e61a71156427a5edafafd02271b17ece57/src/ucp/core/ucp_listener.c#L362

Thanks.