-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C++] parquet reader Segfaults with illegal SIMD instruction #31119
Comments
Antoine Pitrou / @pitrou: |
Jonathan Keane / @jonkeane: elseif("${CMAKE_BUILD_TYPE}" STREQUAL "MINSIZEREL")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_FLAGS_MINSIZEREL}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAGS_MINSIZEREL}") to arrow/cpp/cmake_modules/SetupCxxFlags.cmake Lines 633 to 647 in fa69911
|
Yes, if you build arrow with |
Jonathan Keane / @jonkeane: |
Krisztian Szucs / @kszucs: |
Jonathan Keane / @jonkeane: |
Antoine Pitrou / @pitrou: |
Jonathan Keane / @jonkeane: |
Jonathan Keane / @jonkeane: |
Weston Pace / @westonpace: |
When compiling with
-Os
(or with release typeMinRelSize
), and we run parquet tests (in R at least, though I imagine the pyarrow and C++ will have the same issues!) we get a segfault with an illegal opcode on systems that don't have BMI2 available when trying to read parquet files. (It turns out, the github runners for macos don't have BMI2, so this is easily testable there!)Somehow in the optimization combined with the way our runtime detection code works, the runtime detection we normally use for this fails (though it works just fine with
-O2
,-O3
, etc.).When diagnosing this, I created a branch + PR that runs our R tests after installing from brew which can reliably cause this to happen: #12364 other test suites that exercise parquet reading would probably have the same issue (or even C++ tests built with
-Os
.Here's a coredump:
And then a disassembly (where you can see a SHLX that shouldn't be there):
We discovered this because homebrew alters the default build flags and uses
-Os
, though we should include a test that tests this in our CI as well (at least as a nightly) to catch it earlier: Homebrew/homebrew-core#94724Reporter: Jonathan Keane / @jonkeane
Related issues:
Note: This issue was originally created as ARROW-15664. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: