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 1779d26127 GH-48637: [C++][FlightRPC] ODBC: Disable `absl` deadlock
detection (#48747)
1779d26127 is described below
commit 1779d261275d14af3b31c765713482f62edd6bc0
Author: Alina (Xi) Li <[email protected]>
AuthorDate: Sun Jan 25 18:11:52 2026 -0800
GH-48637: [C++][FlightRPC] ODBC: Disable `absl` deadlock detection (#48747)
### Rationale for this change
https://github.com/apache/arrow/issues/48637
Arrow Flight SQL ODBC gets `potential deadlock` error during tests because
this error is happening at Arrow Flight SQL (see
https://github.com/apache/arrow/issues/48714). Arrow doesn't use `absl::Mutex`
directly, and `absl::Mutex` is used by upstream projects gRPC/Protobuf, so
Arrow itself likely did not cause the potential deadlock. We can disable the
deadlock detection for now.
### What changes are included in this PR?
- Disable `absl` deadlock detection inside ODBC, so potential deadlock
detection from upstream projects don't get picked up in the tests.
### Are these changes tested?
- Tested locally on MSVC Windows
### Are there any user-facing changes?
N/A
* GitHub Issue: #48637
Authored-by: Alina (Xi) Li <[email protected]>
Signed-off-by: David Li <[email protected]>
---
cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_driver.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_driver.cc
b/cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_driver.cc
index 8b24762bfc..c6a813cfd4 100644
--- a/cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_driver.cc
+++ b/cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_driver.cc
@@ -15,6 +15,8 @@
// specific language governing permissions and limitations
// under the License.
+#include <absl/synchronization/mutex.h>
+
#include "arrow/flight/sql/odbc/odbc_impl/flight_sql_driver.h"
#include "arrow/compute/api.h"
@@ -37,6 +39,8 @@ FlightSqlDriver::FlightSqlDriver()
RegisterComputeKernels();
// Register log after compute kernels check to avoid segfaults
RegisterLog();
+ // GH-48637: Disable Absl Deadlock detection from upstream projects
+ absl::SetMutexDeadlockDetectionMode(absl::OnDeadlockCycle::kIgnore);
}
FlightSqlDriver::~FlightSqlDriver() {