Skip to content

GH-49465: [CI][C++] Fix Abseil hang in arrow-flight-test on ODBC Windows#50085

Open
tadeja wants to merge 7 commits into
apache:mainfrom
tadeja:49465-odbc-win-timeout
Open

GH-49465: [CI][C++] Fix Abseil hang in arrow-flight-test on ODBC Windows#50085
tadeja wants to merge 7 commits into
apache:mainfrom
tadeja:49465-odbc-win-timeout

Conversation

@tadeja
Copy link
Copy Markdown
Collaborator

@tadeja tadeja commented Jun 3, 2026

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 grpc/grpc#39321 and abseil/abseil-cpp#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

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the awaiting review Awaiting review label Jun 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

⚠️ GitHub issue #49465 has been automatically assigned in GitHub to PR creator.

@github-actions github-actions Bot added the CI: Extra: C++ Run extra C++ CI label Jun 3, 2026
@tadeja tadeja marked this pull request as ready for review June 3, 2026 13:04
@kou kou requested a review from Copilot June 3, 2026 21:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a temporary CI-only workaround for intermittent hangs at process exit in arrow-flight-test on the Windows ODBC (MSVC) job, by rebuilding gRPC and Arrow with GPR_DISABLE_ABSEIL_SYNC to avoid Abseil sync primitives on Windows.

Changes:

  • Add a custom vcpkg overlay triplet (x64-windows-no-absl-sync) that defines GPR_DISABLE_ABSEIL_SYNC during dependency builds.
  • Update the Windows ODBC CI job to use the new vcpkg triplet and to compile Arrow with the same macro to keep ABI consistent.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ci/vcpkg/overlay-triplets-no-absl-sync/x64-windows-no-absl-sync.cmake New vcpkg triplet to rebuild packages (notably gRPC) with GPR_DISABLE_ABSEIL_SYNC.
.github/workflows/cpp_extra.yml Switch Windows ODBC job to the new triplet and add Arrow compiler flags for the workaround.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# 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
Copy link
Copy Markdown
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! Great!

Comment thread .github/workflows/cpp_extra.yml Outdated
# GH-49465: custom triplet that rebuilds gRPC with GPR_DISABLE_ABSEIL_SYNC
# (native sync instead of absl::Mutex). See ci/vcpkg/overlay-triplets-no-absl-sync.
VCPKG_DEFAULT_TRIPLET: x64-windows-no-absl-sync
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/ci/vcpkg/overlay-triplets-no-absl-sync
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using ci/vcpkg/ not ci/vcpkg/overlay-triplets-no-absl-sync/?
We already have many triplet files in ci/vcpkg/.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, moved to ci/vcpkg/

Comment thread .github/workflows/cpp_extra.yml Outdated
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/overlay-triplets-no-absl-sync.
VCPKG_DEFAULT_TRIPLET: x64-windows-no-absl-sync
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have amd64-windows-static-md-{debug,release}.cmake in ci/vcpkg/.
How about aligning naming convention with them?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, renamed to amd64-windows-no-absl-sync-release

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jun 3, 2026
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting change review Awaiting change review CI: Extra: C++ Run extra C++ CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants