fix(ci): increase swap for Linux ARM Python wheels (#5333)

Both Linux aarch64 wheel variants intermittently lose the final
`lancedb-python` rustc process during fat LTO. The affected runners
reported 31 GiB of RAM and 16 GiB of configured swap, and the logged
Docker invocation supplies no explicit memory cap. The same runner image
has also completed wheel builds, so the historical logs leave the source
of SIGKILL undetermined. [Standard wheel
failure](https://github.com/lancedb/lancedb/actions/runs/46692473826/job/142804749599)
· [Free-threaded release
failure](https://github.com/lancedb/lancedb/actions/runs/46648917509/job/142722631114)

Give the two native ARM wheel builds 32 GiB of swap through their shared
composite action. This keeps fat LTO and one codegen unit, which
preserve release wheel size headroom, and keeps the existing manylinux
platform and ABI tags. Record the build container's memory and swap
peaks and OOM counters on exit, with kernel and systemd-oomd logs on
failed native ARM jobs.
This commit is contained in:
Xuanwo
2026-12-02 03:09:15 +08:00
committed by GitHub
parent 5d455e4b4f
commit 108e8183e1
2 changed files with 19 additions and 20 deletions
@@ -74,6 +74,17 @@ runs:
unzip /tmp/protoc.zip -d /usr/local
rm /tmp/protoc.zip
/usr/local/bin/protoc --version
- name: Add swap for native Arm wheel builds
if: ${{ inputs.arm-build == 'true' && runner.arch == 'ARM64' }}
shell: bash
run: |
# Give the final fat-LTO rustc process room to spill beyond host RAM.
swap_file="$RUNNER_TEMP/lancedb-swap"
sudo fallocate --length 32G "$swap_file"
sudo chmod 600 "$swap_file"
sudo mkswap "$swap_file"
sudo swapon "$swap_file"
free -h
- name: Build Arm Manylinux Wheel
if: ${{ inputs.arm-build == 'true' }}
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
@@ -87,9 +98,17 @@ runs:
args: ${{ inputs.args }}
before-script-linux: |
set -e
# Report peak usage and OOM counters before Docker removes the container.
trap 'grep -H . /sys/fs/cgroup/memory.{max,peak,swap.max,swap.peak,events} 2>/dev/null || true' EXIT
yum install -y clang
curl -fsSL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-aarch_64.zip -o /tmp/protoc.zip
echo "${PROTOC_SHA256} /tmp/protoc.zip" | sha256sum -c -
unzip /tmp/protoc.zip -d /usr/local
rm /tmp/protoc.zip
/usr/local/bin/protoc --version
- name: Report host memory failures
if: ${{ failure() && inputs.arm-build == 'true' && runner.arch == 'ARM64' }}
shell: bash
run: |
sudo journalctl -k -b --no-pager --grep='oom-kill|Out of memory|Killed process' || true
sudo journalctl -u systemd-oomd -b --no-pager --grep='Killed' || true
-20
View File
@@ -79,16 +79,6 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Add swap for Arm fat LTO
if: matrix.config.platform == 'aarch64'
shell: bash
run: |
swap_file="$RUNNER_TEMP/lancedb-swap"
sudo fallocate --length 16G "$swap_file"
sudo chmod 600 "$swap_file"
sudo mkswap "$swap_file"
sudo swapon "$swap_file"
free -h
- uses: ./.github/workflows/build_linux_wheel
with:
python-minor-version: 10
@@ -194,16 +184,6 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: "3.15t"
- name: Add swap for Arm fat LTO
if: matrix.config.platform == 'aarch64'
shell: bash
run: |
swap_file="$RUNNER_TEMP/lancedb-swap"
sudo fallocate --length 16G "$swap_file"
sudo chmod 600 "$swap_file"
sudo mkswap "$swap_file"
sudo swapon "$swap_file"
free -h
- uses: ./.github/workflows/build_linux_wheel
with:
python-minor-version: 15