This is an automated email from the ASF dual-hosted git repository.
kou 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 e16067a78c GH-49465: [CI][C++] Fix Abseil hang in arrow-flight-test on
ODBC Windows (#50085)
e16067a78c is described below
commit e16067a78ce4e7325a258bb2ae1ef73211cc7d46
Author: tadeja <[email protected]>
AuthorDate: Fri Jun 5 03:02:24 2026 +0200
GH-49465: [CI][C++] Fix Abseil hang in arrow-flight-test on ODBC Windows
(#50085)
### Rationale for this change
`arrow-flight-test` passes all its subtests then intermittently hangs on
exit and ctest kills it at the 300s timeout. The last thread was parked in
Abseil's Windows sync primitive `Win32Waiter` during static destruction inside
statically-linked gRPC. See upstream https://github.com/grpc/grpc/issues/39321
and https://github.com/abseil/abseil-cpp/issues/1877
### What changes are included in this PR?
For the ODBC Windows CI job: build gRPC (via the
`amd64-windows-no-absl-sync-release` vcpkg overlay triplet in `ci/vcpkg`) and
Arrow (via `ARROW_CXXFLAGS`) with `GPR_DISABLE_ABSEIL_SYNC`, so both use native
Windows sync instead of `absl::Mutex`. Remove once fixed upstream.
### Are these changes tested?
Yes, on fork CI the ODBC Windows tests were re-run with `ctest --repeat
until-fail:10` (temporary, not part of this PR) - [All tests exited
successfully there](https://github.com/tadeja/arrow/actions/runs/26851308766)
### Are there any user-facing changes?
No.
* GitHub Issue: #49465
Authored-by: Tadeja Kadunc <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
.github/workflows/cpp_extra.yml | 15 ++++++++++---
ci/vcpkg/amd64-windows-no-absl-sync-release.cmake | 27 +++++++++++++++++++++++
2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml
index 265a6f66b8..5d13d36f83 100644
--- a/.github/workflows/cpp_extra.yml
+++ b/.github/workflows/cpp_extra.yml
@@ -470,7 +470,7 @@ jobs:
- name: Install Dependencies
run: |
brew bundle --file=cpp/Brewfile
-
+
# We want to use bundled RE2 for static linking. If
# Homebrew's RE2 is installed, its header file may be used.
# We uninstall Homebrew's RE2 to ensure using bundled RE2.
@@ -591,10 +591,19 @@ jobs:
ARROW_FLIGHT_SQL_ODBC: ON
ARROW_FLIGHT_SQL_ODBC_INSTALLER: ON
ARROW_HOME: /usr
+ # GH-49465: work around the gRPC/Abseil exit hang on Windows
+ # https://github.com/grpc/grpc/issues/39321
+ # https://github.com/abseil/abseil-cpp/issues/1877
+ # Build Arrow with GPR_DISABLE_ABSEIL_SYNC so grpcpp's Mutex ABI
+ # matches the gRPC rebuilt by the overlay triplet. Remove once fixed
upstream.
+ ARROW_CXXFLAGS: -DGPR_DISABLE_ABSEIL_SYNC
CMAKE_GENERATOR: Ninja
CMAKE_INSTALL_PREFIX: /usr
VCPKG_BINARY_SOURCES: 'clear;nugettimeout,600;nuget,GitHub,readwrite'
- VCPKG_DEFAULT_TRIPLET: x64-windows
+ # GH-49465: custom triplet that rebuilds gRPC with
GPR_DISABLE_ABSEIL_SYNC
+ # (native sync instead of absl::Mutex). See
ci/vcpkg/amd64-windows-no-absl-sync-release.cmake
+ VCPKG_DEFAULT_TRIPLET: amd64-windows-no-absl-sync-release
+ VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/ci/vcpkg
steps:
- name: Disable Crash Dialogs
run: |
@@ -764,7 +773,7 @@ jobs:
dev_msi_name=$(echo ${msi_name} | sed -e "s/win64\.msi$/dev-$(date
+%Y-%m-%d)-win64.msi/")
mv "${msi_name}" "${dev_msi_name}"
cd ..
-
+
tree odbc-installer
- name: Checkout Arrow
uses: actions/checkout@v6
diff --git a/ci/vcpkg/amd64-windows-no-absl-sync-release.cmake
b/ci/vcpkg/amd64-windows-no-absl-sync-release.cmake
new file mode 100644
index 0000000000..97c73e3146
--- /dev/null
+++ b/ci/vcpkg/amd64-windows-no-absl-sync-release.cmake
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# GH-49465: rebuild gRPC with native sync instead of absl::Mutex to avoid the
+# Windows exit hang. See the ODBC Windows job in cpp_extra.yml
+# Dynamic CRT/linkage and release-only to match that job.
+set(VCPKG_TARGET_ARCHITECTURE x64)
+set(VCPKG_CRT_LINKAGE dynamic)
+set(VCPKG_LIBRARY_LINKAGE dynamic)
+set(VCPKG_BUILD_TYPE release)
+
+set(VCPKG_C_FLAGS "/DGPR_DISABLE_ABSEIL_SYNC")
+set(VCPKG_CXX_FLAGS "/DGPR_DISABLE_ABSEIL_SYNC")