You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "cyb70289 (via GitHub)" <gi...@apache.org> on 2025/10/09 05:57:31 UTC
[PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
cyb70289 opened a new pull request, #47766:
URL: https://github.com/apache/arrow/pull/47766
### Rationale for this change
Mimalloc default generates LSE atomic instructions only work on armv8.1. This causes illegal instruction on armv8.0 platforms like Raspberry4. This PR sets mimalloc build flag -DMI_NO_OPT_ARCH=ON to disable LSE instruction.
Please note even with flag set, compiler and libc will replace the atmoic call with an ifunc that matches hardware best at runtime. That means LSE is used only if the running platform supports it.
### What changes are included in this PR?
Force mimalloc build flag -DMI_NO_OPT_ARCH=ON.
### Are these changes tested?
Manually tested.
### Are there any user-facing changes?
No.
**This PR contains a "Critical Fix".**
Fixes crashes on Armv8.0 platform.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #47766:
URL: https://github.com/apache/arrow/pull/47766#issuecomment-3384240320
:warning: GitHub issue #47229 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #47766:
URL: https://github.com/apache/arrow/pull/47766#discussion_r2415671476
##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -2294,7 +2294,8 @@ if(ARROW_MIMALLOC)
-DMI_LOCAL_DYNAMIC_TLS=ON
-DMI_BUILD_OBJECT=OFF
-DMI_BUILD_SHARED=OFF
- -DMI_BUILD_TESTS=OFF)
+ -DMI_BUILD_TESTS=OFF,
Review Comment:
Remove comma.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47766:
URL: https://github.com/apache/arrow/pull/47766#issuecomment-3384342739
@github-actions crossbow submit *wheel*cp313*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #47766:
URL: https://github.com/apache/arrow/pull/47766#issuecomment-3385970087
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 8496d4e077f8660f7b124010935836c84707cb40.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/52358400794) has more details.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #47766:
URL: https://github.com/apache/arrow/pull/47766#issuecomment-3384357030
Revision: ff8e8c3737bc0fe64eb90809048317d40d8a84f3
Submitted crossbow builds: [ursacomputing/crossbow @ actions-7e9ea384fd](https://github.com/ursacomputing/crossbow/branches/all?query=actions-7e9ea384fd)
|Task|Status|
|----|------|
|wheel-macos-monterey-cp313-cp313-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367834906/job/52324063167)|
|wheel-macos-monterey-cp313-cp313-arm64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835237/job/52324064009)|
|wheel-macos-monterey-cp313-cp313t-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835864/job/52324065690)|
|wheel-macos-monterey-cp313-cp313t-arm64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835029/job/52324063465)|
|wheel-manylinux-2-28-cp313-cp313-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835435/job/52324064538)|
|wheel-manylinux-2-28-cp313-cp313-arm64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367834954/job/52324063241)|
|wheel-manylinux-2-28-cp313-cp313t-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367834952/job/52324063266)|
|wheel-manylinux-2-28-cp313-cp313t-arm64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835021/job/52324063391)|
|wheel-musllinux-1-2-cp313-cp313-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835379/job/52324064306)|
|wheel-musllinux-1-2-cp313-cp313-arm64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367834858/job/52324063155)|
|wheel-musllinux-1-2-cp313-cp313t-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835198/job/52324063844)|
|wheel-musllinux-1-2-cp313-cp313t-arm64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835188/job/52324063845)|
|wheel-windows-cp313-cp313-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835404/job/52324064376)|
|wheel-windows-cp313-cp313t-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835214/job/52324063945)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou merged PR #47766:
URL: https://github.com/apache/arrow/pull/47766
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #47766:
URL: https://github.com/apache/arrow/pull/47766#issuecomment-3384357622
Revision: ff8e8c3737bc0fe64eb90809048317d40d8a84f3
Submitted crossbow builds: [ursacomputing/crossbow @ actions-a989831826](https://github.com/ursacomputing/crossbow/branches/all?query=actions-a989831826)
|Task|Status|
|----|------|
|example-cpp-minimal-build-static|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835609/job/52324064952)|
|example-cpp-minimal-build-static-system-dependency|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835388/job/52324064443)|
|example-cpp-tutorial|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835450/job/52324064516)|
|test-build-cpp-fuzz|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835816/job/52324065449)|
|test-conda-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835849/job/52324065684)|
|test-conda-cpp-valgrind|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835909/job/52324065742)|
|test-cuda-cpp-ubuntu-22.04-cuda-11.7.1|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835263/job/52324064002)|
|test-debian-12-cpp-amd64|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835614/job/52324065192)|
|test-debian-12-cpp-i386|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835955/job/52324065968)|
|test-fedora-42-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835640/job/52324065096)|
|test-ubuntu-22.04-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835897/job/52324065686)|
|test-ubuntu-22.04-cpp-20|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835693/job/52324065170)|
|test-ubuntu-22.04-cpp-bundled|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835517/job/52324064754)|
|test-ubuntu-22.04-cpp-emscripten|[](https://github.com/ursacomputing/crossbow/actions/runs/18367836021/job/52324066179)|
|test-ubuntu-22.04-cpp-no-threading|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835933/job/52324065821)|
|test-ubuntu-24.04-cpp|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835822/job/52324065543)|
|test-ubuntu-24.04-cpp-bundled-offline|[](https://github.com/ursacomputing/crossbow/actions/runs/18367836215/job/52324066862)|
|test-ubuntu-24.04-cpp-gcc-13-bundled|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835711/job/52324065186)|
|test-ubuntu-24.04-cpp-gcc-14|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835513/job/52324064710)|
|test-ubuntu-24.04-cpp-minimal-with-formats|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835829/job/52324065478)|
|test-ubuntu-24.04-cpp-thread-sanitizer|[](https://github.com/ursacomputing/crossbow/actions/runs/18367835592/job/52324064917)|
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #47766:
URL: https://github.com/apache/arrow/pull/47766#discussion_r2415716147
##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -2294,7 +2294,8 @@ if(ARROW_MIMALLOC)
-DMI_LOCAL_DYNAMIC_TLS=ON
-DMI_BUILD_OBJECT=OFF
-DMI_BUILD_SHARED=OFF
- -DMI_BUILD_TESTS=OFF)
+ -DMI_BUILD_TESTS=OFF
+ -DMI_NO_OPT_ARCH=ON)
Review Comment:
Perhaps add an explanatory comment here
```suggestion
# GH-47229: Force mimalloc to generate armv8.0 binary
-DMI_NO_OPT_ARCH=ON)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47766:
URL: https://github.com/apache/arrow/pull/47766#issuecomment-3384271371
Can you check if this patch is still necessary if we apply https://github.com/apache/arrow/pull/47589 ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47766:
URL: https://github.com/apache/arrow/pull/47766#issuecomment-3384341103
@github-actions crossbow submit -g cpp
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-47229: [C++][Arm] Force mimalloc to generate armv8.0 binary [arrow]
Posted by "cyb70289 (via GitHub)" <gi...@apache.org>.
cyb70289 commented on PR #47766:
URL: https://github.com/apache/arrow/pull/47766#issuecomment-3384291193
> Can you check if this patch is still necessary if we apply #47589 ?
Looks necessary for mimalloc 3.1.5. The default setting is still armv8.1-a unless this option is set.
https://github.com/microsoft/mimalloc/blob/v3.1.5/CMakeLists.txt#L153
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org