Skip to content

Commit

Permalink
GH-43130: [C++][ArrowFlight] Crash due to UCS thread mode (#43120)
Browse files Browse the repository at this point in the history
When mode is `UCS_THREAD_MODE_SERIALIZED`, UCX crash due to mpool corruption.    
This happens when buffer is deallocated on a different thread. In such case two threads access UCX memory pool simultaneously.

See discussion on UCX forum: openucx/ucx#9987
* GitHub Issue: #43130

Authored-by: Amir Gonnen <[email protected]>
Signed-off-by: David Li <[email protected]>
  • Loading branch information
amirgon authored Jul 5, 2024
1 parent 3bb988e commit 5a28e18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/arrow/flight/transport/ucx/ucx_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class ClientConnection {
ucp_worker_params_t worker_params;
std::memset(&worker_params, 0, sizeof(worker_params));
worker_params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE;
worker_params.thread_mode = UCS_THREAD_MODE_SERIALIZED;
worker_params.thread_mode = UCS_THREAD_MODE_MULTI;

ucp_worker_h ucp_worker;
status = ucp_worker_create(ucp_context->get(), &worker_params, &ucp_worker);
Expand Down

0 comments on commit 5a28e18

Please sign in to comment.