[Python] macOS Segfault on Import, Both arm64 and x86_64
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the bug, including details regarding any error messages, version, and platform.
The `pyarrow` packages create a segfault on import when compiled on macOS boxes. This happens on macOS `arm64` and `x86_64`, using (at least) version 12.0.0 and 13.0.0.
Context: I am trying to update the MacPorts `apache-arrow` ports at https://github.com/macports/macports-ports/pull/19664 and discovered this issue. MacPorts uses the `apache-arrow` build instructions and approach in [python.rst#build-and-test](https://github.com/apache/arrow/blob/master/docs/source/developers/python.rst#build-and-test) and [python_wheel_macos_build.sh](https://github.com/apache/arrow/blob/main/ci/scripts/python_wheel_macos_build.sh).
Behavior:
```sh
$ port installed py310-pyarrow
The following ports are currently installed:
py310-pyarrow @12.0.0_3 (active)
$ PYTHONFAULTHANDLER=1 python3.10 -c 'import pyarrow'
Fatal Python error: Segmentation fault
Current thread 0x00007ff84d123700 (most recent call first):
File "", line 241 in _call_with_frames_removed
File "", line 1176 in create_module
File "", line 571 in module_from_spec
File "", line 674 in _load_unlocked
File "", line 1006 in _find_and_load_unlocked
File "", line 1027 in _find_and_load
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyarrow/__init__.py", line 65 in
File "", line 241 in _call_with_frames_removed
File "", line 883 in exec_module
File "", line 688 in _load_unlocked
File "", line 1006 in _find_and_load_unlocked
File "", line 1027 in _find_and_load
File "", line 1 in
Segmentation fault: 11
```
### Component(s)
Python
Contributor guide
Assessment
This issue has not been assessed yet.