From eebfebc6465c428e1ff0c29fcf0654ee6ff36122 Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" <96995091+alinaliBQ@users.noreply.github.com> Date: Tue, 7 Apr 2026 13:41:50 -0700 Subject: [PATCH 1/3] Fix ODBC Linux test segmentation fault * Resolve segfault issue on Linux and pass `ARROW_TEST_LINKAGE=static` Pass `ARROW_TEST_LINKAGE=static` * Clean up --- compose.yaml | 2 ++ cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/compose.yaml b/compose.yaml index 17e08ad1173e..e0a4ecc41a2e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -516,6 +516,8 @@ services: ARROW_PARQUET: "OFF" ARROW_S3: "OFF" ARROW_SUBSTRAIT: "OFF" + # GH-49651 Link ODBC tests statically on Linux to fix segfault + ARROW_TEST_LINKAGE: "static" # Register ODBC before running tests command: > /bin/bash -c " diff --git a/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt b/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt index e0e562f2d255..a0e8685b63fc 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt +++ b/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt @@ -42,6 +42,7 @@ set(ARROW_FLIGHT_SQL_ODBC_TEST_SRCS # GH-46889: move protobuf_test_util to a more common location ../../../../engine/substrait/protobuf_test_util.cc) +# GH-49652: TODO support static test linkage on macOS if(ARROW_TEST_LINKAGE STREQUAL "static") set(ARROW_FLIGHT_SQL_ODBC_TEST_LINK_LIBS arrow_flight_sql_odbc_static ${ARROW_TEST_STATIC_LINK_LIBS}) @@ -65,6 +66,13 @@ else() # Unix list(APPEND ARROW_FLIGHT_SQL_ODBC_TEST_STATIC_LINK_LIBS ${ARROW_FLIGHT_SQL_ODBC_TEST_LIBS} ${ARROW_FLIGHT_SQL_ODBC_TEST_LINK_LIBS}) + + if(NOT APPLE) + # Links static dependencies on Linux to support ARROW_TEST_LINKAGE=static + list(APPEND ARROW_FLIGHT_SQL_ODBC_TEST_STATIC_LINK_LIBS arrow_odbc_spi_impl + ${ARROW_PROTOBUF_LIBPROTOBUF}) + endif() + endif() add_arrow_test(flight_sql_odbc_test From e456f1b6582053918fd982100f283f48c61ed136 Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Tue, 14 Apr 2026 09:15:08 -0700 Subject: [PATCH 2/3] apply static test linkage to ODBC only --- compose.yaml | 2 -- cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt | 11 ++++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/compose.yaml b/compose.yaml index e0a4ecc41a2e..17e08ad1173e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -516,8 +516,6 @@ services: ARROW_PARQUET: "OFF" ARROW_S3: "OFF" ARROW_SUBSTRAIT: "OFF" - # GH-49651 Link ODBC tests statically on Linux to fix segfault - ARROW_TEST_LINKAGE: "static" # Register ODBC before running tests command: > /bin/bash -c " diff --git a/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt b/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt index a0e8685b63fc..0f45bfd0c811 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt +++ b/cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt @@ -42,13 +42,14 @@ set(ARROW_FLIGHT_SQL_ODBC_TEST_SRCS # GH-46889: move protobuf_test_util to a more common location ../../../../engine/substrait/protobuf_test_util.cc) -# GH-49652: TODO support static test linkage on macOS -if(ARROW_TEST_LINKAGE STREQUAL "static") - set(ARROW_FLIGHT_SQL_ODBC_TEST_LINK_LIBS arrow_flight_sql_odbc_static - ${ARROW_TEST_STATIC_LINK_LIBS}) -else() +# GH-49651 Link ODBC tests statically on Linux and dynamically on macOS/Windows +if(WIN32 OR APPLE) set(ARROW_FLIGHT_SQL_ODBC_TEST_LINK_LIBS arrow_flight_sql_odbc_shared ${ARROW_TEST_SHARED_LINK_LIBS}) +else() + # GH-49651 Link ODBC tests statically on Linux to fix segfault + set(ARROW_FLIGHT_SQL_ODBC_TEST_LINK_LIBS arrow_flight_sql_odbc_static + ${ARROW_TEST_STATIC_LINK_LIBS}) endif() # On macOS, link `ODBCINST` first to ensure iodbc take precedence over unixodbc From e332839d0eeedeb61663b7c6da4efe0dc72f32f2 Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Thu, 16 Apr 2026 10:41:29 -0700 Subject: [PATCH 3/3] Add ODBC macOS timeout --- .github/workflows/cpp_extra.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml index 5aaad7f39332..a3dcc2b21fc1 100644 --- a/.github/workflows/cpp_extra.yml +++ b/.github/workflows/cpp_extra.yml @@ -414,7 +414,7 @@ jobs: needs.check-labels.outputs.force == 'true' || contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') || contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++') - timeout-minutes: 75 + timeout-minutes: 120 strategy: fail-fast: false matrix: