Skip to content

ODBC Test Segfault Fix - #54

Merged
alinaliBQ merged 33 commits into
apache-odbcfrom
fix-conn-attr-test-fails
Jun 24, 2025
Merged

ODBC Test Segfault Fix#54
alinaliBQ merged 33 commits into
apache-odbcfrom
fix-conn-attr-test-fails

Conversation

@alinaliBQ

@alinaliBQ alinaliBQ commented Jun 19, 2025

Copy link
Copy Markdown

Seeing ODBC test seg fault error exclusively on GitHub Actions. All tests pass but at the end it says SegFault. Example log. Unable to reproduce it in my local environment with msys2 shell.

the error is seemingly caused by this:

add_arrow_test(test_executable_name
               test_name.cc # test file has `RUN_ALL_TESTS`
               second_test_name.cc
               ...)

solution below solves the issue:

  • Swap the 2nd test file with the 1st in CMakeLists.txt
add_arrow_test(test_executable_name
               second_test_name.cc # swapped with first source file
               test_name.cc
               ...)

The root cause is unclear to me, and also I wasn't seeing this seg fault issue last week until I rebased from arrow's main branch.

@alinaliBQ

Copy link
Copy Markdown
Author

Closing test PR

@alinaliBQ alinaliBQ closed this Jun 19, 2025
alinaliBQ added 16 commits June 19, 2025 14:34
If seg fault issue goes away, the error is likely from connection attribute tests
And enable connection attribute tests again
Only TestSQLSetConnectAttrAsyncDbcEventUnsupported is enabled, see if seg fault occurs
 see if moving test to connection_test resolves the seg fault issue
The ConnectAttr tests are copied without any changes.
add dummy test to see if seg fault is invoked without driver usage; Trying to see if just adding one test in a separate file from connection_test.cc reproduces the issue
@alinaliBQ alinaliBQ reopened this Jun 20, 2025
So connection_test.cc doesn't have same name as test executable
Comment thread cpp/src/arrow/flight/sql/odbc/tests/CMakeLists.txt
@alinaliBQ alinaliBQ changed the title DRAFT Test PR DRAFT ODBC Test Segfault Fix Jun 20, 2025
@alinaliBQ alinaliBQ mentioned this pull request Jun 20, 2025
@alinaliBQ alinaliBQ changed the title DRAFT ODBC Test Segfault Fix ODBC Test Segfault Fix Jun 23, 2025
@alinaliBQ
alinaliBQ marked this pull request as ready for review June 23, 2025 17:01
@alinaliBQ
alinaliBQ merged commit 4b0f367 into apache-odbc Jun 24, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants