GH-49321: [C++][Python] Add ASAN / UBSAN pixi builds for Arrow and PyArrow#49849
GH-49321: [C++][Python] Add ASAN / UBSAN pixi builds for Arrow and PyArrow#49849raulcd wants to merge 22 commits intoapache:mainfrom
Conversation
|
|
|
@github-actions crossbow submit test-pixi-cpp |
|
Revision: a27d06c Submitted crossbow builds: ursacomputing/crossbow @ actions-fd33b1f179
|
|
@github-actions crossbow submit test-pixi-* |
|
Revision: 17bb233 Submitted crossbow builds: ursacomputing/crossbow @ actions-c9de1cf29d
|
|
@github-actions crossbow submit test-pixi-* |
|
Revision: 3f7725b Submitted crossbow builds: ursacomputing/crossbow @ actions-3daa50a309
|
| preview = ["pixi-build"] | ||
|
|
||
| [environments] | ||
| default = [] |
|
@github-actions crossbow submit test-pixi-* |
|
Revision: fafcb99 Submitted crossbow builds: ursacomputing/crossbow @ actions-2d14fbba39
|
|
@github-actions crossbow submit test-pixi-* |
|
Revision: 4757b86 Submitted crossbow builds: ursacomputing/crossbow @ actions-d318220858
|
|
@github-actions crossbow submit test-pixi-python-sanitizer |
|
Revision: ad4a829 Submitted crossbow builds: ursacomputing/crossbow @ actions-c442e4bcac
|
|
@github-actions crossbow submit test-pixi-python-sanitizer |
|
Revision: 9d4dd89 Submitted crossbow builds: ursacomputing/crossbow @ actions-1fd6ac9933
|
|
@github-actions crossbow submit test-pixi-python-sanitizer |
|
Revision: aa462b6 Submitted crossbow builds: ursacomputing/crossbow @ actions-c76613ce90
|
|
I think it works. I was expecting more failures :) |
|
@github-actions crossbow submit test-pixi-* |
|
Revision: 5917506 Submitted crossbow builds: ursacomputing/crossbow @ actions-c352190c2e
|
|
@github-actions crossbow submit test-pixi-* |
|
Revision: f142864 Submitted crossbow builds: ursacomputing/crossbow @ actions-9d972c1253
|
|
@github-actions crossbow submit test-pixi-* |
|
Revision: 1a9c8e7 Submitted crossbow builds: ursacomputing/crossbow @ actions-46cf962c89
|
…dd missing task for pixi-python-sanitizer
|
@github-actions crossbow submit test-pixi-* |
|
Revision: bcaadfa Submitted crossbow builds: ursacomputing/crossbow @ actions-c73780e5d4
|
|
@raulcd nice work! How are you finding the speed for both building the instrumented packages and testing with them? If it doesn't seem slow then maybe you have fixed something on top of what I had in scipy/scipy#24066 ? |
|
Hi @lucascolley ! If we compare with the existing ASAN/UBSAN job for Arrow C++, there's definitely a difference but we are using ccache on that case and using several system dependencies so I don't think the comparison is fair.
What were the build times you were experiencing? |
|
great thanks, I've triggered a new run over at scipy/scipy#24066 to get a new set of timings |
https://github.com/scipy/scipy/actions/runs/25401648241/job/74502497187 on osx-arm64 shows ~12mins to build ASAN CPython and NumPy, ~10mins to build SciPy, and ~60mins to run the ASAN tests. The existing setup using pyenv takes a similar amount of time to build SciPy, but only ~5mins to build ASAN CPython and NumPy, and ~30mins to run the tests: https://github.com/scipy/scipy/actions/runs/25397696452/job/74488793051?pr=24956. I wonder whether extra instrumentation explains both the slower build and test times? On Linux, I'm seeing ~16mins to build ASAN CPython and NumPy, ~20mins to build SciPy, and (still going) >60mins to run the tests: https://github.com/scipy/scipy/actions/runs/25401648241/job/74502497188?pr=24066. |
Rationale for this change
There has been discussions and appettite in the past to run Address and Undefined Behaviour Sanitizers on PyArrow.
In order to runn Sanitizers we have to instrument our build to build CPython and Numpy with Sanitizer flags too.
What changes are included in this PR?
This PR takes inspiration from other tools that have started intrumenting their sanitizer builds with Pixi like:
We add 4 new jobs and docker builds for:
For
pixi-python-sanitizer: Use CPython and Numpy pixi.toml(s) upstream and Arrow CPP with sanitizers pixi.toml to instrument everythin.Are these changes tested?
Yes, I've tested the changes and I created interim tests both on Python C++ side and Cython that where expected to run OOB and raise the sanitizer errors.
Are there any user-facing changes?
No