You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by li...@apache.org on 2024/07/05 04:57:33 UTC
(arrow) branch main updated: GH-43130: [C++][ArrowFlight] Crash due to UCS thread mode (#43120)
This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 5a28e180f0 GH-43130: [C++][ArrowFlight] Crash due to UCS thread mode (#43120)
5a28e180f0 is described below
commit 5a28e180f0a078d0b1a970310d5c03ea6a351ffe
Author: Amir Gonnen <am...@gmail.com>
AuthorDate: Fri Jul 5 07:57:26 2024 +0300
GH-43130: [C++][ArrowFlight] Crash due to UCS thread mode (#43120)
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: https://github.com/openucx/ucx/discussions/9987
* GitHub Issue: #43130
Authored-by: Amir Gonnen <am...@gmail.com>
Signed-off-by: David Li <li...@gmail.com>
---
cpp/src/arrow/flight/transport/ucx/ucx_client.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp/src/arrow/flight/transport/ucx/ucx_client.cc b/cpp/src/arrow/flight/transport/ucx/ucx_client.cc
index 32c2fd776f..946ac2d176 100644
--- a/cpp/src/arrow/flight/transport/ucx/ucx_client.cc
+++ b/cpp/src/arrow/flight/transport/ucx/ucx_client.cc
@@ -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);